Lines Matching refs:port

79 						   int port,
82 dev_dbg(ds->dev, "%s: port: %d\n", __func__, port);
106 static int dsa_loop_get_sset_count(struct dsa_switch *ds, int port, int sset)
114 static void dsa_loop_get_strings(struct dsa_switch *ds, int port,
125 ps->ports[port].mib[i].name, ETH_GSTRING_LEN);
128 static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,
135 data[i] = ps->ports[port].mib[i].val;
138 static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)
144 ret = mdiobus_read_nested(bus, ps->port_base + port, regnum);
146 ps->ports[port].mib[DSA_LOOP_PHY_READ_ERR].val++;
148 ps->ports[port].mib[DSA_LOOP_PHY_READ_OK].val++;
153 static int dsa_loop_phy_write(struct dsa_switch *ds, int port,
160 ret = mdiobus_write_nested(bus, ps->port_base + port, regnum, value);
162 ps->ports[port].mib[DSA_LOOP_PHY_WRITE_ERR].val++;
164 ps->ports[port].mib[DSA_LOOP_PHY_WRITE_OK].val++;
169 static int dsa_loop_port_bridge_join(struct dsa_switch *ds, int port,
172 dev_dbg(ds->dev, "%s: port: %d, bridge: %s\n",
173 __func__, port, bridge->name);
178 static void dsa_loop_port_bridge_leave(struct dsa_switch *ds, int port,
181 dev_dbg(ds->dev, "%s: port: %d, bridge: %s\n",
182 __func__, port, bridge->name);
185 static void dsa_loop_port_stp_state_set(struct dsa_switch *ds, int port,
188 dev_dbg(ds->dev, "%s: port: %d, state: %d\n",
189 __func__, port, state);
192 static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,
196 dev_dbg(ds->dev, "%s: port: %d, vlan_filtering: %d\n",
197 __func__, port, vlan_filtering);
203 dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
209 dev_dbg(ds->dev, "%s: port: %d, vlan: %d-%d",
210 __func__, port, vlan->vid_begin, vlan->vid_end);
213 mdiobus_read(bus, ps->port_base + port, MII_BMSR);
221 static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,
232 mdiobus_read(bus, ps->port_base + port, MII_BMSR);
237 vl->members |= BIT(port);
239 vl->untagged |= BIT(port);
241 vl->untagged &= ~BIT(port);
243 dev_dbg(ds->dev, "%s: port: %d vlan: %d, %stagged, pvid: %d\n",
244 __func__, port, vid, untagged ? "un" : "", pvid);
248 ps->ports[port].pvid = vid;
251 static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
258 u16 vid, pvid = ps->ports[port].pvid;
261 mdiobus_read(bus, ps->port_base + port, MII_BMSR);
266 vl->members &= ~BIT(port);
268 vl->untagged &= ~BIT(port);
273 dev_dbg(ds->dev, "%s: port: %d vlan: %d, %stagged, pvid: %d\n",
274 __func__, port, vid, untagged ? "un" : "", pvid);
276 ps->ports[port].pvid = pvid;
281 static int dsa_loop_port_change_mtu(struct dsa_switch *ds, int port,
286 priv->ports[port].mtu = new_mtu;
291 static int dsa_loop_port_max_mtu(struct dsa_switch *ds, int port)