Lines Matching refs:port
23 void ksz_update_port_member(struct ksz_device *dev, int port)
29 if (i == port || i == dev->cpu_port)
43 static void port_r_cnt(struct ksz_device *dev, int port)
45 struct ksz_port_mib *mib = &dev->ports[port].mib;
50 dev->dev_ops->r_mib_cnt(dev, port, mib->cnt_ptr,
60 dev->dev_ops->r_mib_pkt(dev, port, mib->cnt_ptr,
83 /* Only read MIB counters when the port is told to do.
132 void ksz_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode,
136 struct ksz_port *p = &dev->ports[port];
146 int ksz_sset_count(struct dsa_switch *ds, int port, int sset)
157 void ksz_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *buf)
159 const struct dsa_port *dp = dsa_to_port(ds, port);
163 mib = &dev->ports[port].mib;
169 port_r_cnt(dev, port);
175 int ksz_port_bridge_join(struct dsa_switch *ds, int port,
181 dev->br_member |= (1 << port);
184 /* port_stp_state_set() will be called after to put the port in
192 void ksz_port_bridge_leave(struct dsa_switch *ds, int port,
198 dev->br_member &= ~(1 << port);
199 dev->member &= ~(1 << port);
202 /* port_stp_state_set() will be called after to put the port in
208 void ksz_port_fast_age(struct dsa_switch *ds, int port)
212 dev->dev_ops->flush_dyn_mac_table(dev, port);
216 int ksz_port_vlan_prepare(struct dsa_switch *ds, int port,
225 int ksz_port_fdb_dump(struct dsa_switch *ds, int port, dsa_fdb_dump_cb_t *cb,
242 if (!ret && (member & BIT(port))) {
256 int ksz_port_mdb_prepare(struct dsa_switch *ds, int port,
264 void ksz_port_mdb_add(struct dsa_switch *ds, int port,
296 alu.port_forward |= BIT(port);
307 int ksz_port_mdb_del(struct dsa_switch *ds, int port,
328 /* clear port */
329 alu.port_forward &= ~BIT(port);
339 int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
343 if (!dsa_is_user_port(ds, port))
346 /* setup slave port */
347 dev->dev_ops->port_setup(dev, port, false);
349 /* port_stp_state_set() will be called after to enable the port so
386 struct device_node *port, *ports;
420 /* Host port interface will be self detected, or specifically set in
431 for_each_available_child_of_node(ports, port) {
432 if (of_property_read_u32(port, "reg",
437 of_get_phy_mode(port,