Lines Matching +full:in +full:- +full:masks
1 // SPDX-License-Identifier: GPL-2.0
6 * - KSZ8863, KSZ8873 aka KSZ88X3
7 * - KSZ8895, KSZ8864 aka KSZ8895 family
8 * - KSZ8794, KSZ8795, KSZ8765 aka KSZ87XX
10 * - KSZ8563, KSZ8567 - see KSZ9477 driver
23 #include <linux/platform_data/microchip-ksz.h>
49 * ksz8_ind_write8 - EEE/ACL/PME indirect register write
56 * PME switch functionalities. Both 8-bit registers 110 and 111 are
68 regs = dev->info->regs; in ksz8_ind_write8()
70 mutex_lock(&dev->alu_mutex); in ksz8_ind_write8()
77 mutex_unlock(&dev->alu_mutex); in ksz8_ind_write8()
83 * ksz8_ind_read8 - EEE/ACL/PME indirect register read
90 * PME switch functionalities. Both 8-bit registers 110 and 111 are
102 regs = dev->info->regs; in ksz8_ind_read8()
104 mutex_lock(&dev->alu_mutex); in ksz8_ind_read8()
111 mutex_unlock(&dev->alu_mutex); in ksz8_ind_read8()
187 if (!dsa_is_cpu_port(dev->ds, port)) in ksz8_change_mtu()
192 switch (dev->chip_id) { in ksz8_change_mtu()
203 return -EOPNOTSUPP; in ksz8_change_mtu()
237 * moved to appropriate place in the future. in ksz8_port_queue_split()
260 struct dsa_switch *ds = dev->ds; in ksz8_all_queues_split()
264 int ret = ksz8_port_queue_split(dev, dp->index, queues); in ksz8_all_queues_split()
275 const u32 *masks; in ksz8_r_mib_cnt() local
282 masks = dev->info->masks; in ksz8_r_mib_cnt()
283 regs = dev->info->regs; in ksz8_r_mib_cnt()
285 ctrl_addr = addr + dev->info->reg_mib_cnt * port; in ksz8_r_mib_cnt()
288 mutex_lock(&dev->alu_mutex); in ksz8_r_mib_cnt()
294 for (loop = 2; loop > 0; loop--) { in ksz8_r_mib_cnt()
297 if (check & masks[MIB_COUNTER_VALID]) { in ksz8_r_mib_cnt()
299 if (check & masks[MIB_COUNTER_OVERFLOW]) in ksz8_r_mib_cnt()
305 mutex_unlock(&dev->alu_mutex); in ksz8_r_mib_cnt()
311 const u32 *masks; in ksz8795_r_mib_pkt() local
318 masks = dev->info->masks; in ksz8795_r_mib_pkt()
319 regs = dev->info->regs; in ksz8795_r_mib_pkt()
321 addr -= dev->info->reg_mib_cnt; in ksz8795_r_mib_pkt()
322 ctrl_addr = (KSZ8795_MIB_TOTAL_RX_1 - KSZ8795_MIB_TOTAL_RX_0) * port; in ksz8795_r_mib_pkt()
326 mutex_lock(&dev->alu_mutex); in ksz8795_r_mib_pkt()
332 for (loop = 2; loop > 0; loop--) { in ksz8795_r_mib_pkt()
335 if (check & masks[MIB_COUNTER_VALID]) { in ksz8795_r_mib_pkt()
344 if (check & masks[MIB_COUNTER_OVERFLOW]) { in ksz8795_r_mib_pkt()
350 if (check & masks[MIB_COUNTER_OVERFLOW]) in ksz8795_r_mib_pkt()
357 mutex_unlock(&dev->alu_mutex); in ksz8795_r_mib_pkt()
369 regs = dev->info->regs; in ksz8863_r_mib_pkt()
371 addr -= dev->info->reg_mib_cnt; in ksz8863_r_mib_pkt()
377 mutex_lock(&dev->alu_mutex); in ksz8863_r_mib_pkt()
380 mutex_unlock(&dev->alu_mutex); in ksz8863_r_mib_pkt()
388 data -= cur; in ksz8863_r_mib_pkt()
419 struct ksz_port_mib *mib = &dev->ports[port].mib; in ksz8_port_init_cnt()
430 mib->cnt_ptr = 0; in ksz8_port_init_cnt()
433 while (mib->cnt_ptr < dev->info->reg_mib_cnt) { in ksz8_port_init_cnt()
434 dev->dev_ops->r_mib_cnt(dev, port, mib->cnt_ptr, in ksz8_port_init_cnt()
435 &mib->counters[mib->cnt_ptr]); in ksz8_port_init_cnt()
436 ++mib->cnt_ptr; in ksz8_port_init_cnt()
439 /* last one in storage */ in ksz8_port_init_cnt()
440 dropped = &mib->counters[dev->info->mib_cnt]; in ksz8_port_init_cnt()
443 while (mib->cnt_ptr < dev->info->mib_cnt) { in ksz8_port_init_cnt()
444 dev->dev_ops->r_mib_pkt(dev, port, mib->cnt_ptr, in ksz8_port_init_cnt()
445 dropped, &mib->counters[mib->cnt_ptr]); in ksz8_port_init_cnt()
446 ++mib->cnt_ptr; in ksz8_port_init_cnt()
456 regs = dev->info->regs; in ksz8_r_table()
460 mutex_lock(&dev->alu_mutex); in ksz8_r_table()
467 mutex_unlock(&dev->alu_mutex); in ksz8_r_table()
478 regs = dev->info->regs; in ksz8_w_table()
482 mutex_lock(&dev->alu_mutex); in ksz8_w_table()
489 mutex_unlock(&dev->alu_mutex); in ksz8_w_table()
497 const u32 *masks; in ksz8_valid_dyn_entry() local
501 masks = dev->info->masks; in ksz8_valid_dyn_entry()
502 regs = dev->info->regs; in ksz8_valid_dyn_entry()
509 timeout--; in ksz8_valid_dyn_entry()
510 } while ((*data & masks[DYNAMIC_MAC_TABLE_NOT_READY]) && timeout); in ksz8_valid_dyn_entry()
513 if (*data & masks[DYNAMIC_MAC_TABLE_NOT_READY]) in ksz8_valid_dyn_entry()
514 return -ETIMEDOUT; in ksz8_valid_dyn_entry()
525 const u32 *masks; in ksz8_r_dyn_mac_table() local
533 shifts = dev->info->shifts; in ksz8_r_dyn_mac_table()
534 masks = dev->info->masks; in ksz8_r_dyn_mac_table()
535 regs = dev->info->regs; in ksz8_r_dyn_mac_table()
539 mutex_lock(&dev->alu_mutex); in ksz8_r_dyn_mac_table()
548 if (data & masks[DYNAMIC_MAC_TABLE_MAC_EMPTY]) { in ksz8_r_dyn_mac_table()
560 /* Check out how many valid entry in the table. */ in ksz8_r_dyn_mac_table()
561 cnt = data & masks[DYNAMIC_MAC_TABLE_ENTRIES_H]; in ksz8_r_dyn_mac_table()
563 cnt |= (data_hi & masks[DYNAMIC_MAC_TABLE_ENTRIES]) >> in ksz8_r_dyn_mac_table()
567 *fid = (data_hi & masks[DYNAMIC_MAC_TABLE_FID]) >> in ksz8_r_dyn_mac_table()
569 *src_port = (data_hi & masks[DYNAMIC_MAC_TABLE_SRC_PORT]) >> in ksz8_r_dyn_mac_table()
581 mutex_unlock(&dev->alu_mutex); in ksz8_r_dyn_mac_table()
591 const u32 *masks; in ksz8_r_sta_mac_table() local
595 shifts = dev->info->shifts; in ksz8_r_sta_mac_table()
596 masks = dev->info->masks; in ksz8_r_sta_mac_table()
605 if (!(data_hi & (masks[STATIC_MAC_TABLE_VALID] | in ksz8_r_sta_mac_table()
606 masks[STATIC_MAC_TABLE_OVERRIDE]))) { in ksz8_r_sta_mac_table()
611 alu->mac[5] = (u8)data_lo; in ksz8_r_sta_mac_table()
612 alu->mac[4] = (u8)(data_lo >> 8); in ksz8_r_sta_mac_table()
613 alu->mac[3] = (u8)(data_lo >> 16); in ksz8_r_sta_mac_table()
614 alu->mac[2] = (u8)(data_lo >> 24); in ksz8_r_sta_mac_table()
615 alu->mac[1] = (u8)data_hi; in ksz8_r_sta_mac_table()
616 alu->mac[0] = (u8)(data_hi >> 8); in ksz8_r_sta_mac_table()
617 alu->port_forward = in ksz8_r_sta_mac_table()
618 (data_hi & masks[STATIC_MAC_TABLE_FWD_PORTS]) >> in ksz8_r_sta_mac_table()
620 alu->is_override = (data_hi & masks[STATIC_MAC_TABLE_OVERRIDE]) ? 1 : 0; in ksz8_r_sta_mac_table()
628 alu->is_static = true; in ksz8_r_sta_mac_table()
629 alu->is_use_fid = (data_hi & masks[STATIC_MAC_TABLE_USE_FID]) ? 1 : 0; in ksz8_r_sta_mac_table()
630 alu->fid = (data_hi & masks[STATIC_MAC_TABLE_FID]) >> in ksz8_r_sta_mac_table()
643 const u32 *masks; in ksz8_w_sta_mac_table() local
646 shifts = dev->info->shifts; in ksz8_w_sta_mac_table()
647 masks = dev->info->masks; in ksz8_w_sta_mac_table()
649 data_lo = ((u32)alu->mac[2] << 24) | in ksz8_w_sta_mac_table()
650 ((u32)alu->mac[3] << 16) | in ksz8_w_sta_mac_table()
651 ((u32)alu->mac[4] << 8) | alu->mac[5]; in ksz8_w_sta_mac_table()
652 data_hi = ((u32)alu->mac[0] << 8) | alu->mac[1]; in ksz8_w_sta_mac_table()
653 data_hi |= (u32)alu->port_forward << shifts[STATIC_MAC_FWD_PORTS]; in ksz8_w_sta_mac_table()
655 if (alu->is_override) in ksz8_w_sta_mac_table()
656 data_hi |= masks[STATIC_MAC_TABLE_OVERRIDE]; in ksz8_w_sta_mac_table()
657 if (alu->is_use_fid) { in ksz8_w_sta_mac_table()
658 data_hi |= masks[STATIC_MAC_TABLE_USE_FID]; in ksz8_w_sta_mac_table()
659 data_hi |= (u32)alu->fid << shifts[STATIC_MAC_FID]; in ksz8_w_sta_mac_table()
661 if (alu->is_static) in ksz8_w_sta_mac_table()
662 data_hi |= masks[STATIC_MAC_TABLE_VALID]; in ksz8_w_sta_mac_table()
664 data_hi &= ~masks[STATIC_MAC_TABLE_OVERRIDE]; in ksz8_w_sta_mac_table()
675 const u32 *masks; in ksz8_from_vlan() local
677 shifts = dev->info->shifts; in ksz8_from_vlan()
678 masks = dev->info->masks; in ksz8_from_vlan()
680 *fid = vlan & masks[VLAN_TABLE_FID]; in ksz8_from_vlan()
681 *member = (vlan & masks[VLAN_TABLE_MEMBERSHIP]) >> in ksz8_from_vlan()
683 *valid = !!(vlan & masks[VLAN_TABLE_VALID]); in ksz8_from_vlan()
690 const u32 *masks; in ksz8_to_vlan() local
692 shifts = dev->info->shifts; in ksz8_to_vlan()
693 masks = dev->info->masks; in ksz8_to_vlan()
698 *vlan |= masks[VLAN_TABLE_VALID]; in ksz8_to_vlan()
707 shifts = dev->info->shifts; in ksz8_r_vlan_entries()
712 dev->vlan_cache[addr + i].table[0] = (u16)data; in ksz8_r_vlan_entries()
743 dev->vlan_cache[vid].table[0] = vlan; in ksz8_w_vlan_table()
748 * ksz879x_get_loopback - KSZ879x specific function to get loopback
776 * ksz879x_set_loopback - KSZ879x specific function to set loopback mode for
799 * ksz8_r_phy_ctrl - Translates and reads from the SMI interface to a MIIM PHY
813 const u16 *regs = dev->info->regs; in ksz8_r_phy_ctrl()
843 * ksz8_r_phy_bmcr - Translates and reads from the SMI interface to a MIIM PHY
854 * -------------------------------------------------------------------
856 * ----------------------------+-----------------------------+----------------
857 * Bit 15 - Soft Reset | 0xF/4 | Not supported
858 * Bit 14 - Loopback | 0xD/0 (MAC), 0xF/7 (PHY) ~ 0xD/0 (PHY)
859 * Bit 13 - Force 100 | 0xC/6 = 0xC/6
860 * Bit 12 - AN Enable | 0xC/7 (reverse logic) ~ 0xC/7
861 * Bit 11 - Power Down | 0xD/3 = 0xD/3
862 * Bit 10 - PHY Isolate | 0xF/5 | Not supported
863 * Bit 9 - Restart AN | 0xD/5 = 0xD/5
864 * Bit 8 - Force Full-Duplex | 0xC/5 = 0xC/5
865 * Bit 7 - Collision Test/Res. | Not supported | Not supported
866 * Bit 6 - Reserved | Not supported | Not supported
867 * Bit 5 - Hp_mdix | 0x9/7 ~ 0xF/7
868 * Bit 4 - Force MDI | 0xD/1 = 0xD/1
869 * Bit 3 - Disable MDIX | 0xD/2 = 0xD/2
870 * Bit 2 - Disable Far-End F. | ???? | 0xD/4
871 * Bit 1 - Disable Transmit | 0xD/6 = 0xD/6
872 * Bit 0 - Disable LED | 0xD/7 = 0xD/7
873 * -------------------------------------------------------------------
879 const u16 *regs = dev->info->regs; in ksz8_r_phy_bmcr()
951 regs = dev->info->regs; in ksz8_r_phy()
1058 * ksz8_w_phy_ctrl - Translates and writes to the SMI interface from a MIIM PHY
1090 * ksz8_w_phy_bmcr - Translates and writes to the SMI interface from a MIIM PHY
1101 * -------------------------------------------------------------------
1103 * ----------------------------+-----------------------------+----------------
1104 * Bit 15 - Soft Reset | 0xF/4 | Not supported
1105 * Bit 14 - Loopback | 0xD/0 (MAC), 0xF/7 (PHY) ~ 0xD/0 (PHY)
1106 * Bit 13 - Force 100 | 0xC/6 = 0xC/6
1107 * Bit 12 - AN Enable | 0xC/7 (reverse logic) ~ 0xC/7
1108 * Bit 11 - Power Down | 0xD/3 = 0xD/3
1109 * Bit 10 - PHY Isolate | 0xF/5 | Not supported
1110 * Bit 9 - Restart AN | 0xD/5 = 0xD/5
1111 * Bit 8 - Force Full-Duplex | 0xC/5 = 0xC/5
1112 * Bit 7 - Collision Test/Res. | Not supported | Not supported
1113 * Bit 6 - Reserved | Not supported | Not supported
1114 * Bit 5 - Hp_mdix | 0x9/7 ~ 0xF/7
1115 * Bit 4 - Force MDI | 0xD/1 = 0xD/1
1116 * Bit 3 - Disable MDIX | 0xD/2 = 0xD/2
1117 * Bit 2 - Disable Far-End F. | ???? | 0xD/4
1118 * Bit 1 - Disable Transmit | 0xD/6 = 0xD/6
1119 * Bit 0 - Disable LED | 0xD/7 = 0xD/7
1120 * -------------------------------------------------------------------
1127 const u16 *regs = dev->info->regs; in ksz8_w_phy_bmcr()
1150 /* Fiber port does not support auto-negotiation. */ in ksz8_w_phy_bmcr()
1151 if (dev->ports[port].fiber) in ksz8_w_phy_bmcr()
1213 regs = dev->info->regs; in ksz8_w_phy()
1272 data |= (member & dev->port_mask); in ksz8_cfg_port_member()
1282 regs = dev->info->regs; in ksz8_flush_dyn_mac_table()
1284 if ((uint)port < dev->info->port_cnt) { in ksz8_flush_dyn_mac_table()
1290 cnt = dev->info->port_cnt; in ksz8_flush_dyn_mac_table()
1340 for (index = 0; index < dev->info->num_statics; index++) { in ksz8_add_sta_mac()
1358 if (index == dev->info->num_statics && !empty) in ksz8_add_sta_mac()
1359 return -ENOSPC; in ksz8_add_sta_mac()
1362 if (index == dev->info->num_statics) { in ksz8_add_sta_mac()
1363 index = empty - 1; in ksz8_add_sta_mac()
1385 for (index = 0; index < dev->info->num_statics; index++) { in ksz8_del_sta_mac()
1399 if (index == dev->info->num_statics) in ksz8_del_sta_mac()
1413 return ksz8_add_sta_mac(dev, port, mdb->addr, mdb->vid); in ksz8_mdb_add()
1419 return ksz8_del_sta_mac(dev, port, mdb->addr, mdb->vid); in ksz8_mdb_del()
1438 return -ENOTSUPP; in ksz8_port_vlan_filtering()
1444 for (port = 0; port < dev->phy_port_cnt; ++port) in ksz8_port_vlan_filtering()
1455 0x03 << (4 - 2 * port), state); in ksz8_port_enable_pvid()
1465 bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; in ksz8_port_vlan_add()
1466 struct ksz_port *p = &dev->ports[port]; in ksz8_port_vlan_add()
1471 return -ENOTSUPP; in ksz8_port_vlan_add()
1478 if (untagged != p->remove_tag && vlan->vid != 0 && in ksz8_port_vlan_add()
1479 port != dev->cpu_port) { in ksz8_port_vlan_add()
1486 for (vid = 1; vid < dev->info->num_vlans; ++vid) { in ksz8_port_vlan_add()
1488 if (vid == vlan->vid) in ksz8_port_vlan_add()
1491 ksz8_from_vlan(dev, dev->vlan_cache[vid].table[0], in ksz8_port_vlan_add()
1494 return -EINVAL; in ksz8_port_vlan_add()
1498 p->remove_tag = untagged; in ksz8_port_vlan_add()
1501 ksz8_r_vlan_table(dev, vlan->vid, &data); in ksz8_port_vlan_add()
1513 ksz8_w_vlan_table(dev, vlan->vid, data); in ksz8_port_vlan_add()
1516 if (vlan->flags & BRIDGE_VLAN_INFO_PVID) in ksz8_port_vlan_add()
1517 new_pvid = vlan->vid; in ksz8_port_vlan_add()
1540 return -ENOTSUPP; in ksz8_port_vlan_del()
1545 ksz8_r_vlan_table(dev, vlan->vid, &data); in ksz8_port_vlan_del()
1557 ksz8_w_vlan_table(dev, vlan->vid, data); in ksz8_port_vlan_del()
1559 if (pvid == vlan->vid) in ksz8_port_vlan_del()
1571 dev->mirror_rx |= BIT(port); in ksz8_port_mirror_add()
1574 dev->mirror_tx |= BIT(port); in ksz8_port_mirror_add()
1580 if (dev->mirror_rx || dev->mirror_tx) in ksz8_port_mirror_add()
1581 ksz_port_cfg(dev, mirror->to_local_port, P_MIRROR_CTRL, in ksz8_port_mirror_add()
1592 if (mirror->ingress) { in ksz8_port_mirror_del()
1594 dev->mirror_rx &= ~BIT(port); in ksz8_port_mirror_del()
1597 dev->mirror_tx &= ~BIT(port); in ksz8_port_mirror_del()
1602 if (!dev->mirror_rx && !dev->mirror_tx) in ksz8_port_mirror_del()
1603 ksz_port_cfg(dev, mirror->to_local_port, P_MIRROR_CTRL, in ksz8_port_mirror_del()
1609 struct ksz_port *p = &dev->ports[port]; in ksz8795_cpu_interface_select()
1614 if (!p->interface && dev->compat_interface) { in ksz8795_cpu_interface_select()
1615 dev_warn(dev->dev, in ksz8795_cpu_interface_select()
1616 "Using legacy switch \"phy-mode\" property, because it is missing on port %d node. " in ksz8795_cpu_interface_select()
1619 p->interface = dev->compat_interface; in ksz8795_cpu_interface_select()
1625 const u16 *regs = dev->info->regs; in ksz8_port_setup()
1626 struct dsa_switch *ds = dev->ds; in ksz8_port_setup()
1627 const u32 *masks; in ksz8_port_setup() local
1631 masks = dev->info->masks; in ksz8_port_setup()
1642 queues = dev->info->num_tx_queues; in ksz8_port_setup()
1648 masks[PORT_802_1P_REMAPPING], false); in ksz8_port_setup()
1667 struct dsa_port *cpu_dp = dsa_to_port(dev->ds, dev->cpu_port); in ksz88x3_config_rmii_clk()
1673 rmii_clk_internal = of_property_read_bool(cpu_dp->dn, in ksz88x3_config_rmii_clk()
1674 "microchip,rmii-clk-internal"); in ksz88x3_config_rmii_clk()
1682 struct ksz_device *dev = ds->priv; in ksz8_config_cpu_port()
1684 const u32 *masks; in ksz8_config_cpu_port() local
1689 masks = dev->info->masks; in ksz8_config_cpu_port()
1690 regs = dev->info->regs; in ksz8_config_cpu_port()
1692 ksz_cfg(dev, regs[S_TAIL_TAG_CTRL], masks[SW_TAIL_TAG_ENABLE], true); in ksz8_config_cpu_port()
1694 ksz8_port_setup(dev, dev->cpu_port, true); in ksz8_config_cpu_port()
1696 ksz8795_cpu_interface_select(dev, dev->cpu_port); in ksz8_config_cpu_port()
1699 for (i = 0; i < dev->phy_port_cnt; i++) { in ksz8_config_cpu_port()
1702 for (i = 0; i < dev->phy_port_cnt; i++) { in ksz8_config_cpu_port()
1703 p = &dev->ports[i]; in ksz8_config_cpu_port()
1709 p->fiber = 1; in ksz8_config_cpu_port()
1711 if (p->fiber) in ksz8_config_cpu_port()
1721 * ksz8_phy_port_link_up - Configures ports with integrated PHYs
1732 * According to the KSZ8873 datasheet, the PORT_FORCE_FLOW_CTRL bit in the
1735 * "1 = will always enable full-duplex flow control on the port, regardless
1737 * 0 = full-duplex flow control is enabled based on AN result."
1740 * - If PORT_FORCE_FLOW_CTRL is set to 1, the switch will ignore AN results and
1742 * - If PORT_FORCE_FLOW_CTRL is set to 0, the switch will enable or disable
1745 * However, there is a potential limitation in this configuration. It is
1754 const u16 *regs = dev->info->regs; in ksz8_phy_port_link_up()
1760 * control - both TX and RX pause will be either enabled or disabled in ksz8_phy_port_link_up()
1763 * If auto-negotiation is enabled, we usually allow the flow control to in ksz8_phy_port_link_up()
1764 * be determined by the auto-negotiation process based on the in ksz8_phy_port_link_up()
1767 * ignoring the auto-negotiation result. Thus, even in auto-negotiation in ksz8_phy_port_link_up()
1771 * In the absence of pause auto-negotiation, we will enforce symmetric in ksz8_phy_port_link_up()
1772 * pause control for both variants of switches - KSZ8873 and KSZ8795. in ksz8_phy_port_link_up()
1782 if (dev->ports[port].manual_flow && tx_pause) in ksz8_phy_port_link_up()
1789 * ksz8_cpu_port_link_up - Configures the CPU port of the switch.
1804 const u16 *regs = dev->info->regs; in ksz8_cpu_port_link_up()
1833 struct ksz_device *dev = dp->ds->priv; in ksz8_phylink_mac_link_up()
1834 int port = dp->index; in ksz8_phylink_mac_link_up()
1839 if (dev->cpu_port == port) in ksz8_phylink_mac_link_up()
1841 else if (dev->info->internal_phy[port]) in ksz8_phylink_mac_link_up()
1847 struct ksz_device *dev = ds->priv; in ksz8_handle_global_errata()
1853 * KSZ879x/KSZ877x/KSZ876x and some EEE link partners may result in in ksz8_handle_global_errata()
1856 if (dev->info->ksz87xx_eee_link_erratum) in ksz8_handle_global_errata()
1871 alu.port_forward = dev->info->cpu_ports; in ksz8_enable_stp_addr()
1878 struct ksz_device *dev = ds->priv; in ksz8_setup()
1879 const u16 *regs = dev->info->regs; in ksz8_setup()
1882 ds->mtu_enforcement_ingress = true; in ksz8_setup()
1887 ds->untag_bridge_pvid = true; in ksz8_setup()
1892 ds->vlan_filtering_is_global = true; in ksz8_setup()
1897 /* Enable aggressive back off algorithm in half duplex mode. */ in ksz8_setup()
1916 for (i = 0; i < (dev->info->num_vlans / 4); i++) in ksz8_setup()
1939 config->mac_capabilities = MAC_10 | MAC_100; in ksz8_get_caps()
1947 config->mac_capabilities |= MAC_SYM_PAUSE; in ksz8_get_caps()
1951 config->mac_capabilities |= MAC_ASYM_PAUSE; in ksz8_get_caps()
1961 dev->cpu_port = fls(dev->info->cpu_ports) - 1; in ksz8_switch_init()
1962 dev->phy_port_cnt = dev->info->port_cnt - 1; in ksz8_switch_init()
1963 dev->port_mask = (BIT(dev->phy_port_cnt) - 1) | dev->info->cpu_ports; in ksz8_switch_init()