| /Linux-v5.4/drivers/net/ |
| D | mii.c | 58 u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0; in mii_ethtool_gset() local 81 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_gset() 87 if (bmcr & BMCR_ANENABLE) { in mii_ethtool_gset() 122 ((bmcr & BMCR_SPEED1000 && in mii_ethtool_gset() 123 (bmcr & BMCR_SPEED100) == 0) ? in mii_ethtool_gset() 125 ((bmcr & BMCR_SPEED100) ? in mii_ethtool_gset() 127 ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; in mii_ethtool_gset() 149 u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0; in mii_ethtool_get_link_ksettings() local 168 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_get_link_ksettings() 174 if (bmcr & BMCR_ANENABLE) { in mii_ethtool_get_link_ksettings() [all …]
|
| /Linux-v5.4/drivers/net/phy/ |
| D | icplus.c | 121 int bmcr; in ip1xx_reset() local 124 bmcr = phy_read(phydev, MII_BMCR); in ip1xx_reset() 125 if (bmcr < 0) in ip1xx_reset() 126 return bmcr; in ip1xx_reset() 127 bmcr |= BMCR_RESET; in ip1xx_reset() 128 bmcr = phy_write(phydev, MII_BMCR, bmcr); in ip1xx_reset() 129 if (bmcr < 0) in ip1xx_reset() 130 return bmcr; in ip1xx_reset() 133 bmcr = phy_read(phydev, MII_BMCR); in ip1xx_reset() 134 if (bmcr < 0) in ip1xx_reset() [all …]
|
| D | lxt.c | 198 int bmcr = phy_read(phydev, MII_BMCR); in lxt973a2_read_status() local 200 if (bmcr < 0) in lxt973a2_read_status() 201 return bmcr; in lxt973a2_read_status() 203 if (bmcr & BMCR_FULLDPLX) in lxt973a2_read_status() 208 if (bmcr & BMCR_SPEED1000) in lxt973a2_read_status() 210 else if (bmcr & BMCR_SPEED100) in lxt973a2_read_status()
|
| D | national.c | 94 int bmcr = phy_read(phydev, MII_BMCR); in ns_giga_speed_fallback() local 96 phy_write(phydev, MII_BMCR, (bmcr | BMCR_PDOWN)); in ns_giga_speed_fallback() 102 phy_write(phydev, MII_BMCR, (bmcr & ~BMCR_PDOWN)); in ns_giga_speed_fallback()
|
| D | phy_device.c | 1744 int status = 0, bmcr; in genphy_update_link() local 1746 bmcr = phy_read(phydev, MII_BMCR); in genphy_update_link() 1747 if (bmcr < 0) in genphy_update_link() 1748 return bmcr; in genphy_update_link() 1753 if (bmcr & BMCR_ANRESTART) in genphy_update_link() 1867 int bmcr = phy_read(phydev, MII_BMCR); in genphy_read_status() local 1869 if (bmcr < 0) in genphy_read_status() 1870 return bmcr; in genphy_read_status() 1872 if (bmcr & BMCR_FULLDPLX) in genphy_read_status() 1877 if (bmcr & BMCR_SPEED1000) in genphy_read_status() [all …]
|
| D | at803x.c | 79 u16 bmcr; member 143 context->bmcr = phy_read(phydev, MII_BMCR); in at803x_context_save() 155 phy_write(phydev, MII_BMCR, context->bmcr); in at803x_context_restore()
|
| D | marvell.c | 1289 int bmcr = phy_read(phydev, MII_BMCR); in marvell_read_status_page_fixed() local 1291 if (bmcr < 0) in marvell_read_status_page_fixed() 1292 return bmcr; in marvell_read_status_page_fixed() 1294 if (bmcr & BMCR_FULLDPLX) in marvell_read_status_page_fixed() 1299 if (bmcr & BMCR_SPEED1000) in marvell_read_status_page_fixed() 1301 else if (bmcr & BMCR_SPEED100) in marvell_read_status_page_fixed()
|
| /Linux-v5.4/drivers/net/ethernet/chelsio/cxgb3/ |
| D | vsc8211.c | 133 unsigned int bmcr, status, lpa, adv; in vsc8211_get_link_status() local 136 err = t3_mdio_read(cphy, MDIO_DEVAD_NONE, MII_BMCR, &bmcr); in vsc8211_get_link_status() 154 if (!(bmcr & BMCR_ANENABLE)) { in vsc8211_get_link_status() 155 dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; in vsc8211_get_link_status() 156 if (bmcr & BMCR_SPEED1000) in vsc8211_get_link_status() 158 else if (bmcr & BMCR_SPEED100) in vsc8211_get_link_status() 209 unsigned int bmcr, status, lpa, adv; in vsc8211_get_link_status_fiber() local 212 err = t3_mdio_read(cphy, MDIO_DEVAD_NONE, MII_BMCR, &bmcr); in vsc8211_get_link_status_fiber() 230 if (!(bmcr & BMCR_ANENABLE)) { in vsc8211_get_link_status_fiber() 231 dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; in vsc8211_get_link_status_fiber() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/dlink/ |
| D | dl2k.c | 1555 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media() local 1556 switch (bmcr & (BMCR_SPEED100 | BMCR_SPEED1000)) { in mii_get_media() 1566 if (bmcr & BMCR_FULLDPLX) { in mii_get_media() 1588 __u16 bmcr; in mii_set_media() local 1624 bmcr = BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET; in mii_set_media() 1625 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media() 1635 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media() 1636 bmcr |= BMCR_RESET; in mii_set_media() 1637 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media() 1640 bmcr = 0x1940; /* must be 0x1940 */ in mii_set_media() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/ibm/emac/ |
| D | phy.c | 259 int bmcr = phy_read(phy, MII_BMCR); in genmii_read_link() local 260 if (bmcr < 0) in genmii_read_link() 261 return bmcr; in genmii_read_link() 263 if (bmcr & BMCR_FULLDPLX) in genmii_read_link() 267 if (bmcr & BMCR_SPEED1000) in genmii_read_link() 269 else if (bmcr & BMCR_SPEED100) in genmii_read_link()
|
| /Linux-v5.4/drivers/net/ethernet/smsc/ |
| D | smc911x.c | 737 int bmcr; in smc911x_phy_fixed() local 742 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 743 bmcr |= BMCR_PDOWN; in smc911x_phy_fixed() 744 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 750 bmcr &= ~BMCR_ANENABLE; in smc911x_phy_fixed() 752 bmcr |= BMCR_FULLDPLX; in smc911x_phy_fixed() 755 bmcr |= BMCR_SPEED100; in smc911x_phy_fixed() 758 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 761 bmcr &= ~BMCR_PDOWN; in smc911x_phy_fixed() 762 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() [all …]
|
| D | smc91x.c | 905 int bmcr, cfg1; in smc_phy_fixed() local 918 bmcr = 0; in smc_phy_fixed() 921 bmcr |= BMCR_FULLDPLX; in smc_phy_fixed() 924 bmcr |= BMCR_SPEED100; in smc_phy_fixed() 927 smc_phy_write(dev, phyaddr, MII_BMCR, bmcr); in smc_phy_fixed() 953 unsigned int bmcr; in smc_phy_reset() local 963 bmcr = smc_phy_read(dev, phy, MII_BMCR); in smc_phy_reset() 964 if (!(bmcr & BMCR_RESET)) in smc_phy_reset() 968 return bmcr & BMCR_RESET; in smc_phy_reset() 980 unsigned int bmcr; in smc_phy_powerdown() local [all …]
|
| /Linux-v5.4/drivers/net/ethernet/broadcom/genet/ |
| D | bcmmii.c | 184 int bmcr = -1; in bcmgenet_mii_config() local 195 bmcr = ret; in bcmgenet_mii_config() 197 bmcr | BMCR_ISOLATE); in bcmgenet_mii_config() 248 if (bmcr >= 0) in bcmgenet_mii_config() 249 phy_write(phydev, MII_BMCR, bmcr); in bcmgenet_mii_config()
|
| /Linux-v5.4/drivers/net/ethernet/ |
| D | jme.c | 413 u32 phylink, cnt = JME_SPDRSV_TIMEOUT, bmcr; in jme_check_link() local 432 bmcr = jme_mdio_read(jme->dev, in jme_check_link() 436 phylink |= ((bmcr & BMCR_SPEED1000) && in jme_check_link() 437 (bmcr & BMCR_SPEED100) == 0) ? in jme_check_link() 439 (bmcr & BMCR_SPEED100) ? in jme_check_link() 443 phylink |= (bmcr & BMCR_FULLDPLX) ? in jme_check_link() 1611 u32 bmcr; in jme_restart_an() local 1614 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an() 1615 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in jme_restart_an() 1616 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr); in jme_restart_an() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/broadcom/ |
| D | bnx2.c | 1183 u32 bmcr, local_adv, remote_adv, common; in bnx2_5706s_linkup() local 1188 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_5706s_linkup() 1189 if (bmcr & BMCR_FULLDPLX) { in bnx2_5706s_linkup() 1196 if (!(bmcr & BMCR_ANENABLE)) { in bnx2_5706s_linkup() 1220 u32 bmcr; in bnx2_copper_linkup() local 1224 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_copper_linkup() 1225 if (bmcr & BMCR_ANENABLE) { in bnx2_copper_linkup() 1268 if (bmcr & BMCR_SPEED100) { in bnx2_copper_linkup() 1274 if (bmcr & BMCR_FULLDPLX) { in bnx2_copper_linkup() 1464 u32 uninitialized_var(bmcr); in bnx2_enable_forced_2g5() [all …]
|
| D | b44.c | 479 u32 bmcr; in b44_setup_phy() local 481 if ((err = b44_readphy(bp, MII_BMCR, &bmcr)) != 0) in b44_setup_phy() 483 bmcr &= ~(BMCR_FULLDPLX | BMCR_ANENABLE | BMCR_SPEED100); in b44_setup_phy() 485 bmcr |= BMCR_SPEED100; in b44_setup_phy() 487 bmcr |= BMCR_FULLDPLX; in b44_setup_phy() 488 if ((err = b44_writephy(bp, MII_BMCR, bmcr)) != 0) in b44_setup_phy() 1812 u32 bmcr; in b44_nway_reset() local 1816 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset() 1817 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset() 1819 if (bmcr & BMCR_ANENABLE) { in b44_nway_reset() [all …]
|
| D | tg3.c | 4461 u32 bmcr, orig_bmcr; in tg3_phy_copper_begin() local 4474 bmcr = 0; in tg3_phy_copper_begin() 4481 bmcr |= BMCR_SPEED100; in tg3_phy_copper_begin() 4485 bmcr |= BMCR_SPEED1000; in tg3_phy_copper_begin() 4490 bmcr |= BMCR_FULLDPLX; in tg3_phy_copper_begin() 4493 (bmcr != orig_bmcr)) { in tg3_phy_copper_begin() 4507 tg3_writephy(tp, MII_BMCR, bmcr); in tg3_phy_copper_begin() 4905 u32 aux_stat, bmcr; in tg3_setup_copper_phy() local 4919 bmcr = 0; in tg3_setup_copper_phy() 4921 tg3_readphy(tp, MII_BMCR, &bmcr); in tg3_setup_copper_phy() [all …]
|
| /Linux-v5.4/drivers/net/usb/ |
| D | rtl8150.c | 793 short lpa, bmcr; in rtl8150_get_link_ksettings() local 804 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_link_ksettings() 806 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_link_ksettings() 819 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings() 821 ecmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_link_ksettings()
|
| /Linux-v5.4/drivers/net/ethernet/xilinx/ |
| D | xilinx_emaclite.c | 926 u32 bmcr; in xemaclite_open() local 947 bmcr = phy_read(lp->phy_dev, MII_BMCR); in xemaclite_open() 948 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in xemaclite_open() 949 phy_write(lp->phy_dev, MII_BMCR, bmcr); in xemaclite_open()
|
| /Linux-v5.4/drivers/net/ethernet/nvidia/ |
| D | forcedeth.c | 3355 u32 bmcr; in nv_update_linkspeed() local 3364 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_update_linkspeed() 3365 if (bmcr & BMCR_LOOPBACK) { in nv_update_linkspeed() 4444 int adv, bmcr; in nv_set_link_ksettings() local 4475 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_set_link_ksettings() 4477 bmcr |= BMCR_ANENABLE; in nv_set_link_ksettings() 4480 if (phy_reset(dev, bmcr)) { in nv_set_link_ksettings() 4485 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in nv_set_link_ksettings() 4486 mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); in nv_set_link_ksettings() 4489 int adv, bmcr; in nv_set_link_ksettings() local [all …]
|
| /Linux-v5.4/drivers/net/ethernet/intel/ |
| D | e100.c | 1441 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init() local 1446 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1449 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init() 1481 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init() 1483 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1493 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1516 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1517 bmcr |= BMCR_RESET; in e100_phy_init() 1518 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); in e100_phy_init()
|
| /Linux-v5.4/drivers/net/ethernet/silan/ |
| D | sc92031.c | 1315 u16 bmcr; in sc92031_ethtool_nway_reset() local 1319 bmcr = _sc92031_mii_read(port_base, MII_BMCR); in sc92031_ethtool_nway_reset() 1320 if (!(bmcr & BMCR_ANENABLE)) { in sc92031_ethtool_nway_reset() 1325 _sc92031_mii_write(port_base, MII_BMCR, bmcr | BMCR_ANRESTART); in sc92031_ethtool_nway_reset()
|
| /Linux-v5.4/drivers/net/ethernet/amd/ |
| D | pcnet32.c | 2199 u16 bmcr; in pcnet32_open() local 2235 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open() 2239 bmcr & ~BMCR_ISOLATE); in pcnet32_open() 2242 bmcr | BMCR_ISOLATE); in pcnet32_open() 2806 u16 bmcr; in pcnet32_check_otherphy() local 2820 bmcr = in pcnet32_check_otherphy() 2823 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy() 2826 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy() 2828 bmcr & ~BMCR_ISOLATE); in pcnet32_check_otherphy()
|
| /Linux-v5.4/drivers/net/ethernet/sun/ |
| D | niu.c | 1097 int bmsr, advert, ctrl1000, stat1000, lpa, bmcr, estatus; in link_status_mii() local 1103 bmcr = err; in link_status_mii() 1158 if (bmcr & BMCR_ANENABLE) { in link_status_mii() 1185 if ((bmcr & BMCR_SPEED1000) && !(bmcr & BMCR_SPEED100)) in link_status_mii() 1187 else if (bmcr & BMCR_SPEED100) in link_status_mii() 1192 if (bmcr & BMCR_FULLDPLX) in link_status_mii() 1657 u16 bmcr, bmsr, estat; in xcvr_init_1g_rgmii() local 1680 bmcr = 0; in xcvr_init_1g_rgmii() 1681 err = mii_write(np, np->phy_addr, MII_BMCR, bmcr); in xcvr_init_1g_rgmii() 1695 bmcr = (BMCR_SPEED1000 | BMCR_FULLDPLX); in xcvr_init_1g_rgmii() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/oki-semi/pch_gbe/ |
| D | pch_gbe_main.c | 607 u16 bmcr, stat; in pch_gbe_init_phy() local 612 bmcr = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMCR); in pch_gbe_init_phy() 615 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in pch_gbe_init_phy() 628 bmcr = pch_gbe_mdio_read(netdev, addr, MII_BMCR); in pch_gbe_init_phy() 630 bmcr & ~BMCR_ISOLATE); in pch_gbe_init_phy()
|