Lines Matching refs:ds

79 static int _mv88e6xxx_reg_read(struct dsa_switch *ds, int addr, int reg)  in _mv88e6xxx_reg_read()  argument
81 struct mii_bus *bus = dsa_host_dev_to_mii_bus(ds->master_dev); in _mv88e6xxx_reg_read()
87 ret = __mv88e6xxx_reg_read(bus, ds->pd->sw_addr, addr, reg); in _mv88e6xxx_reg_read()
91 dev_dbg(ds->master_dev, "<- addr: 0x%.2x reg: 0x%.2x val: 0x%.4x\n", in _mv88e6xxx_reg_read()
97 int mv88e6xxx_reg_read(struct dsa_switch *ds, int addr, int reg) in mv88e6xxx_reg_read() argument
99 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_reg_read()
103 ret = _mv88e6xxx_reg_read(ds, addr, reg); in mv88e6xxx_reg_read()
142 static int _mv88e6xxx_reg_write(struct dsa_switch *ds, int addr, int reg, in _mv88e6xxx_reg_write() argument
145 struct mii_bus *bus = dsa_host_dev_to_mii_bus(ds->master_dev); in _mv88e6xxx_reg_write()
150 dev_dbg(ds->master_dev, "-> addr: 0x%.2x reg: 0x%.2x val: 0x%.4x\n", in _mv88e6xxx_reg_write()
153 return __mv88e6xxx_reg_write(bus, ds->pd->sw_addr, addr, reg, val); in _mv88e6xxx_reg_write()
156 int mv88e6xxx_reg_write(struct dsa_switch *ds, int addr, int reg, u16 val) in mv88e6xxx_reg_write() argument
158 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_reg_write()
162 ret = _mv88e6xxx_reg_write(ds, addr, reg, val); in mv88e6xxx_reg_write()
168 int mv88e6xxx_config_prio(struct dsa_switch *ds) in mv88e6xxx_config_prio() argument
186 int mv88e6xxx_set_addr_direct(struct dsa_switch *ds, u8 *addr) in mv88e6xxx_set_addr_direct() argument
195 int mv88e6xxx_set_addr_indirect(struct dsa_switch *ds, u8 *addr) in mv88e6xxx_set_addr_indirect() argument
221 static int _mv88e6xxx_phy_read(struct dsa_switch *ds, int addr, int regnum) in _mv88e6xxx_phy_read() argument
224 return mv88e6xxx_reg_read(ds, addr, regnum); in _mv88e6xxx_phy_read()
229 static int _mv88e6xxx_phy_write(struct dsa_switch *ds, int addr, int regnum, in _mv88e6xxx_phy_write() argument
233 return mv88e6xxx_reg_write(ds, addr, regnum, val); in _mv88e6xxx_phy_write()
238 static int mv88e6xxx_ppu_disable(struct dsa_switch *ds) in mv88e6xxx_ppu_disable() argument
259 static int mv88e6xxx_ppu_enable(struct dsa_switch *ds) in mv88e6xxx_ppu_enable() argument
285 struct dsa_switch *ds = ((struct dsa_switch *)ps) - 1; in mv88e6xxx_ppu_reenable_work() local
287 if (mv88e6xxx_ppu_enable(ds) == 0) in mv88e6xxx_ppu_reenable_work()
300 static int mv88e6xxx_ppu_access_get(struct dsa_switch *ds) in mv88e6xxx_ppu_access_get() argument
302 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_ppu_access_get()
313 ret = mv88e6xxx_ppu_disable(ds); in mv88e6xxx_ppu_access_get()
327 static void mv88e6xxx_ppu_access_put(struct dsa_switch *ds) in mv88e6xxx_ppu_access_put() argument
329 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_ppu_access_put()
336 void mv88e6xxx_ppu_state_init(struct dsa_switch *ds) in mv88e6xxx_ppu_state_init() argument
338 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_ppu_state_init()
347 int mv88e6xxx_phy_read_ppu(struct dsa_switch *ds, int addr, int regnum) in mv88e6xxx_phy_read_ppu() argument
351 ret = mv88e6xxx_ppu_access_get(ds); in mv88e6xxx_phy_read_ppu()
353 ret = mv88e6xxx_reg_read(ds, addr, regnum); in mv88e6xxx_phy_read_ppu()
354 mv88e6xxx_ppu_access_put(ds); in mv88e6xxx_phy_read_ppu()
360 int mv88e6xxx_phy_write_ppu(struct dsa_switch *ds, int addr, in mv88e6xxx_phy_write_ppu() argument
365 ret = mv88e6xxx_ppu_access_get(ds); in mv88e6xxx_phy_write_ppu()
367 ret = mv88e6xxx_reg_write(ds, addr, regnum, val); in mv88e6xxx_phy_write_ppu()
368 mv88e6xxx_ppu_access_put(ds); in mv88e6xxx_phy_write_ppu()
375 void mv88e6xxx_poll_link(struct dsa_switch *ds) in mv88e6xxx_poll_link() argument
387 dev = ds->ports[i]; in mv88e6xxx_poll_link()
393 port_status = mv88e6xxx_reg_read(ds, REG_PORT(i), in mv88e6xxx_poll_link()
437 static bool mv88e6xxx_6352_family(struct dsa_switch *ds) in mv88e6xxx_6352_family() argument
439 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_6352_family()
450 static int mv88e6xxx_stats_wait(struct dsa_switch *ds) in mv88e6xxx_stats_wait() argument
464 static int mv88e6xxx_stats_snapshot(struct dsa_switch *ds, int port) in mv88e6xxx_stats_snapshot() argument
468 if (mv88e6xxx_6352_family(ds)) in mv88e6xxx_stats_snapshot()
477 ret = mv88e6xxx_stats_wait(ds); in mv88e6xxx_stats_snapshot()
484 static void mv88e6xxx_stats_read(struct dsa_switch *ds, int stat, u32 *val) in mv88e6xxx_stats_read() argument
491 ret = mv88e6xxx_reg_write(ds, REG_GLOBAL, GLOBAL_STATS_OP, in mv88e6xxx_stats_read()
497 ret = mv88e6xxx_stats_wait(ds); in mv88e6xxx_stats_read()
501 ret = mv88e6xxx_reg_read(ds, REG_GLOBAL, GLOBAL_STATS_COUNTER_32); in mv88e6xxx_stats_read()
507 ret = mv88e6xxx_reg_read(ds, REG_GLOBAL, GLOBAL_STATS_COUNTER_01); in mv88e6xxx_stats_read()
552 static bool have_sw_in_discards(struct dsa_switch *ds) in have_sw_in_discards() argument
554 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in have_sw_in_discards()
568 static void _mv88e6xxx_get_strings(struct dsa_switch *ds, in _mv88e6xxx_get_strings() argument
581 static void _mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds, in _mv88e6xxx_get_ethtool_stats() argument
586 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in _mv88e6xxx_get_ethtool_stats()
592 ret = mv88e6xxx_stats_snapshot(ds, port); in _mv88e6xxx_get_ethtool_stats()
605 ret = mv88e6xxx_reg_read(ds, REG_PORT(port), in _mv88e6xxx_get_ethtool_stats()
611 ret = mv88e6xxx_reg_read(ds, REG_PORT(port), in _mv88e6xxx_get_ethtool_stats()
620 mv88e6xxx_stats_read(ds, s->reg, &low); in _mv88e6xxx_get_ethtool_stats()
622 mv88e6xxx_stats_read(ds, s->reg + 1, &high); in _mv88e6xxx_get_ethtool_stats()
632 mv88e6xxx_get_strings(struct dsa_switch *ds, int port, uint8_t *data) in mv88e6xxx_get_strings() argument
634 if (have_sw_in_discards(ds)) in mv88e6xxx_get_strings()
635 _mv88e6xxx_get_strings(ds, ARRAY_SIZE(mv88e6xxx_hw_stats), in mv88e6xxx_get_strings()
638 _mv88e6xxx_get_strings(ds, ARRAY_SIZE(mv88e6xxx_hw_stats) - 3, in mv88e6xxx_get_strings()
642 int mv88e6xxx_get_sset_count(struct dsa_switch *ds) in mv88e6xxx_get_sset_count() argument
644 if (have_sw_in_discards(ds)) in mv88e6xxx_get_sset_count()
650 mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds, in mv88e6xxx_get_ethtool_stats() argument
653 if (have_sw_in_discards(ds)) in mv88e6xxx_get_ethtool_stats()
655 ds, ARRAY_SIZE(mv88e6xxx_hw_stats), in mv88e6xxx_get_ethtool_stats()
659 ds, ARRAY_SIZE(mv88e6xxx_hw_stats) - 3, in mv88e6xxx_get_ethtool_stats()
663 int mv88e6xxx_get_regs_len(struct dsa_switch *ds, int port) in mv88e6xxx_get_regs_len() argument
668 void mv88e6xxx_get_regs(struct dsa_switch *ds, int port, in mv88e6xxx_get_regs() argument
681 ret = mv88e6xxx_reg_read(ds, REG_PORT(port), i); in mv88e6xxx_get_regs()
689 int mv88e6xxx_get_temp(struct dsa_switch *ds, int *temp) in mv88e6xxx_get_temp() argument
691 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_get_temp()
699 ret = _mv88e6xxx_phy_write(ds, 0x0, 0x16, 0x6); in mv88e6xxx_get_temp()
704 ret = _mv88e6xxx_phy_read(ds, 0x0, 0x1a); in mv88e6xxx_get_temp()
708 ret = _mv88e6xxx_phy_write(ds, 0x0, 0x1a, ret | (1 << 5)); in mv88e6xxx_get_temp()
715 val = _mv88e6xxx_phy_read(ds, 0x0, 0x1a); in mv88e6xxx_get_temp()
722 ret = _mv88e6xxx_phy_write(ds, 0x0, 0x1a, ret & ~(1 << 5)); in mv88e6xxx_get_temp()
729 _mv88e6xxx_phy_write(ds, 0x0, 0x16, 0x0); in mv88e6xxx_get_temp()
735 static int mv88e6xxx_wait(struct dsa_switch *ds, int reg, int offset, u16 mask) in mv88e6xxx_wait() argument
751 int mv88e6xxx_phy_wait(struct dsa_switch *ds) in mv88e6xxx_phy_wait() argument
753 return mv88e6xxx_wait(ds, REG_GLOBAL2, GLOBAL2_SMI_OP, in mv88e6xxx_phy_wait()
757 int mv88e6xxx_eeprom_load_wait(struct dsa_switch *ds) in mv88e6xxx_eeprom_load_wait() argument
759 return mv88e6xxx_wait(ds, REG_GLOBAL2, GLOBAL2_EEPROM_OP, in mv88e6xxx_eeprom_load_wait()
763 int mv88e6xxx_eeprom_busy_wait(struct dsa_switch *ds) in mv88e6xxx_eeprom_busy_wait() argument
765 return mv88e6xxx_wait(ds, REG_GLOBAL2, GLOBAL2_EEPROM_OP, in mv88e6xxx_eeprom_busy_wait()
770 static int _mv88e6xxx_wait(struct dsa_switch *ds, int reg, int offset, u16 mask) in _mv88e6xxx_wait() argument
777 ret = _mv88e6xxx_reg_read(ds, reg, offset); in _mv88e6xxx_wait()
789 static int _mv88e6xxx_atu_wait(struct dsa_switch *ds) in _mv88e6xxx_atu_wait() argument
791 return _mv88e6xxx_wait(ds, REG_GLOBAL, GLOBAL_ATU_OP, in _mv88e6xxx_atu_wait()
796 static int _mv88e6xxx_phy_read_indirect(struct dsa_switch *ds, int addr, in _mv88e6xxx_phy_read_indirect() argument
804 ret = mv88e6xxx_phy_wait(ds); in _mv88e6xxx_phy_read_indirect()
812 static int _mv88e6xxx_phy_write_indirect(struct dsa_switch *ds, int addr, in _mv88e6xxx_phy_write_indirect() argument
819 return mv88e6xxx_phy_wait(ds); in _mv88e6xxx_phy_write_indirect()
822 int mv88e6xxx_get_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e) in mv88e6xxx_get_eee() argument
824 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_get_eee()
829 reg = _mv88e6xxx_phy_read_indirect(ds, port, 16); in mv88e6xxx_get_eee()
836 reg = mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_STATUS); in mv88e6xxx_get_eee()
848 int mv88e6xxx_set_eee(struct dsa_switch *ds, int port, in mv88e6xxx_set_eee() argument
851 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_set_eee()
857 ret = _mv88e6xxx_phy_read_indirect(ds, port, 16); in mv88e6xxx_set_eee()
867 ret = _mv88e6xxx_phy_write_indirect(ds, port, 16, reg); in mv88e6xxx_set_eee()
874 static int _mv88e6xxx_atu_cmd(struct dsa_switch *ds, int fid, u16 cmd) in _mv88e6xxx_atu_cmd() argument
878 ret = _mv88e6xxx_reg_write(ds, REG_GLOBAL, 0x01, fid); in _mv88e6xxx_atu_cmd()
882 ret = _mv88e6xxx_reg_write(ds, REG_GLOBAL, GLOBAL_ATU_OP, cmd); in _mv88e6xxx_atu_cmd()
886 return _mv88e6xxx_atu_wait(ds); in _mv88e6xxx_atu_cmd()
889 static int _mv88e6xxx_flush_fid(struct dsa_switch *ds, int fid) in _mv88e6xxx_flush_fid() argument
893 ret = _mv88e6xxx_atu_wait(ds); in _mv88e6xxx_flush_fid()
897 return _mv88e6xxx_atu_cmd(ds, fid, GLOBAL_ATU_OP_FLUSH_NON_STATIC_DB); in _mv88e6xxx_flush_fid()
900 static int mv88e6xxx_set_port_state(struct dsa_switch *ds, int port, u8 state) in mv88e6xxx_set_port_state() argument
902 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_set_port_state()
908 reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_CONTROL); in mv88e6xxx_set_port_state()
922 ret = _mv88e6xxx_flush_fid(ds, ps->fid[port]); in mv88e6xxx_set_port_state()
927 ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_CONTROL, in mv88e6xxx_set_port_state()
937 static int _mv88e6xxx_update_port_config(struct dsa_switch *ds, int port) in _mv88e6xxx_update_port_config() argument
939 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in _mv88e6xxx_update_port_config()
943 if (dsa_is_cpu_port(ds, port)) in _mv88e6xxx_update_port_config()
944 reg |= ds->phys_port_mask; in _mv88e6xxx_update_port_config()
947 (1 << dsa_upstream_port(ds))) & ~(1 << port); in _mv88e6xxx_update_port_config()
949 return _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_BASE_VLAN, reg); in _mv88e6xxx_update_port_config()
953 static int _mv88e6xxx_update_bridge_config(struct dsa_switch *ds, int fid) in _mv88e6xxx_update_bridge_config() argument
955 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in _mv88e6xxx_update_bridge_config()
960 mask = ds->phys_port_mask; in _mv88e6xxx_update_bridge_config()
967 ret = _mv88e6xxx_update_port_config(ds, port); in _mv88e6xxx_update_bridge_config()
972 return _mv88e6xxx_flush_fid(ds, fid); in _mv88e6xxx_update_bridge_config()
977 int mv88e6xxx_join_bridge(struct dsa_switch *ds, int port, u32 br_port_mask) in mv88e6xxx_join_bridge() argument
979 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_join_bridge()
994 netdev_err(ds->ports[port], in mv88e6xxx_join_bridge()
1007 ret = _mv88e6xxx_update_bridge_config(ds, fid); in mv88e6xxx_join_bridge()
1015 int mv88e6xxx_leave_bridge(struct dsa_switch *ds, int port, u32 br_port_mask) in mv88e6xxx_leave_bridge() argument
1017 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_leave_bridge()
1024 netdev_err(ds->ports[port], in mv88e6xxx_leave_bridge()
1045 ret = _mv88e6xxx_update_bridge_config(ds, fid); in mv88e6xxx_leave_bridge()
1047 ret = _mv88e6xxx_update_bridge_config(ds, newfid); in mv88e6xxx_leave_bridge()
1054 int mv88e6xxx_port_stp_update(struct dsa_switch *ds, int port, u8 state) in mv88e6xxx_port_stp_update() argument
1056 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_port_stp_update()
1076 netdev_dbg(ds->ports[port], "port state %d [%d]\n", state, stp_state); in mv88e6xxx_port_stp_update()
1088 static int __mv88e6xxx_write_addr(struct dsa_switch *ds, in __mv88e6xxx_write_addr() argument
1095 ds, REG_GLOBAL, GLOBAL_ATU_MAC_01 + i, in __mv88e6xxx_write_addr()
1104 static int __mv88e6xxx_read_addr(struct dsa_switch *ds, unsigned char *addr) in __mv88e6xxx_read_addr() argument
1109 ret = _mv88e6xxx_reg_read(ds, REG_GLOBAL, in __mv88e6xxx_read_addr()
1120 static int __mv88e6xxx_port_fdb_cmd(struct dsa_switch *ds, int port, in __mv88e6xxx_port_fdb_cmd() argument
1123 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in __mv88e6xxx_port_fdb_cmd()
1127 ret = _mv88e6xxx_atu_wait(ds); in __mv88e6xxx_port_fdb_cmd()
1131 ret = __mv88e6xxx_write_addr(ds, addr); in __mv88e6xxx_port_fdb_cmd()
1135 ret = _mv88e6xxx_reg_write(ds, REG_GLOBAL, GLOBAL_ATU_DATA, in __mv88e6xxx_port_fdb_cmd()
1140 ret = _mv88e6xxx_atu_cmd(ds, fid, GLOBAL_ATU_OP_LOAD_DB); in __mv88e6xxx_port_fdb_cmd()
1145 int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port, in mv88e6xxx_port_fdb_add() argument
1151 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_port_fdb_add()
1155 ret = __mv88e6xxx_port_fdb_cmd(ds, port, addr, state); in mv88e6xxx_port_fdb_add()
1161 int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port, in mv88e6xxx_port_fdb_del() argument
1164 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_port_fdb_del()
1168 ret = __mv88e6xxx_port_fdb_cmd(ds, port, addr, in mv88e6xxx_port_fdb_del()
1175 static int __mv88e6xxx_port_getnext(struct dsa_switch *ds, int port, in __mv88e6xxx_port_getnext() argument
1178 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in __mv88e6xxx_port_getnext()
1182 ret = _mv88e6xxx_atu_wait(ds); in __mv88e6xxx_port_getnext()
1186 ret = __mv88e6xxx_write_addr(ds, addr); in __mv88e6xxx_port_getnext()
1191 ret = _mv88e6xxx_atu_cmd(ds, fid, GLOBAL_ATU_OP_GET_NEXT_DB); in __mv88e6xxx_port_getnext()
1195 ret = _mv88e6xxx_reg_read(ds, REG_GLOBAL, GLOBAL_ATU_DATA); in __mv88e6xxx_port_getnext()
1203 ret = __mv88e6xxx_read_addr(ds, addr); in __mv88e6xxx_port_getnext()
1215 int mv88e6xxx_port_fdb_getnext(struct dsa_switch *ds, int port, in mv88e6xxx_port_fdb_getnext() argument
1218 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_port_fdb_getnext()
1222 ret = __mv88e6xxx_port_getnext(ds, port, addr, is_static); in mv88e6xxx_port_fdb_getnext()
1231 struct dsa_switch *ds; in mv88e6xxx_bridge_work() local
1235 ds = ((struct dsa_switch *)ps) - 1; in mv88e6xxx_bridge_work()
1240 mv88e6xxx_set_port_state(ds, port, ps->port_state[port]); in mv88e6xxx_bridge_work()
1244 int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port) in mv88e6xxx_setup_port_common() argument
1246 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_setup_port_common()
1254 ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_CONTROL_1, 0x0000); in mv88e6xxx_setup_port_common()
1267 if (!dsa_is_cpu_port(ds, port)) in mv88e6xxx_setup_port_common()
1270 ret = _mv88e6xxx_update_port_config(ds, port); in mv88e6xxx_setup_port_common()
1277 ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_DEFAULT_VLAN, in mv88e6xxx_setup_port_common()
1284 int mv88e6xxx_setup_common(struct dsa_switch *ds) in mv88e6xxx_setup_common() argument
1286 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_setup_common()
1301 int mv88e6xxx_switch_reset(struct dsa_switch *ds, bool ppu_active) in mv88e6xxx_switch_reset() argument
1303 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_switch_reset()
1341 int mv88e6xxx_phy_page_read(struct dsa_switch *ds, int port, int page, int reg) in mv88e6xxx_phy_page_read() argument
1343 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_page_read()
1347 ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page); in mv88e6xxx_phy_page_read()
1350 ret = _mv88e6xxx_phy_read_indirect(ds, port, reg); in mv88e6xxx_phy_page_read()
1352 _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0); in mv88e6xxx_phy_page_read()
1357 int mv88e6xxx_phy_page_write(struct dsa_switch *ds, int port, int page, in mv88e6xxx_phy_page_write() argument
1360 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_page_write()
1364 ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page); in mv88e6xxx_phy_page_write()
1368 ret = _mv88e6xxx_phy_write_indirect(ds, port, reg, val); in mv88e6xxx_phy_page_write()
1370 _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0); in mv88e6xxx_phy_page_write()
1375 static int mv88e6xxx_port_to_phy_addr(struct dsa_switch *ds, int port) in mv88e6xxx_port_to_phy_addr() argument
1377 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_port_to_phy_addr()
1385 mv88e6xxx_phy_read(struct dsa_switch *ds, int port, int regnum) in mv88e6xxx_phy_read() argument
1387 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_read()
1388 int addr = mv88e6xxx_port_to_phy_addr(ds, port); in mv88e6xxx_phy_read()
1395 ret = _mv88e6xxx_phy_read(ds, addr, regnum); in mv88e6xxx_phy_read()
1401 mv88e6xxx_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val) in mv88e6xxx_phy_write() argument
1403 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_write()
1404 int addr = mv88e6xxx_port_to_phy_addr(ds, port); in mv88e6xxx_phy_write()
1411 ret = _mv88e6xxx_phy_write(ds, addr, regnum, val); in mv88e6xxx_phy_write()
1417 mv88e6xxx_phy_read_indirect(struct dsa_switch *ds, int port, int regnum) in mv88e6xxx_phy_read_indirect() argument
1419 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_read_indirect()
1420 int addr = mv88e6xxx_port_to_phy_addr(ds, port); in mv88e6xxx_phy_read_indirect()
1427 ret = _mv88e6xxx_phy_read_indirect(ds, addr, regnum); in mv88e6xxx_phy_read_indirect()
1433 mv88e6xxx_phy_write_indirect(struct dsa_switch *ds, int port, int regnum, in mv88e6xxx_phy_write_indirect() argument
1436 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); in mv88e6xxx_phy_write_indirect()
1437 int addr = mv88e6xxx_port_to_phy_addr(ds, port); in mv88e6xxx_phy_write_indirect()
1444 ret = _mv88e6xxx_phy_write_indirect(ds, addr, regnum, val); in mv88e6xxx_phy_write_indirect()