/drivers/net/ |
D | mii.c | 56 u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0; in mii_ethtool_gset() local 79 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_gset() 91 if (bmcr & BMCR_ANENABLE) { in mii_ethtool_gset() 121 ((bmcr & BMCR_SPEED1000 && in mii_ethtool_gset() 122 (bmcr & BMCR_SPEED100) == 0) ? in mii_ethtool_gset() 124 ((bmcr & BMCR_SPEED100) ? in mii_ethtool_gset() 126 ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; in mii_ethtool_gset() 146 u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0; in mii_ethtool_get_link_ksettings() local 165 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_get_link_ksettings() 176 if (bmcr & BMCR_ANENABLE) { in mii_ethtool_get_link_ksettings() [all …]
|
/drivers/net/pcs/ |
D | pcs-altera-tse.c | 64 u16 bmcr; in tse_pcs_reset() local 67 bmcr = tse_pcs_read(tse_pcs, MII_BMCR); in tse_pcs_reset() 68 bmcr |= BMCR_RESET; in tse_pcs_reset() 69 tse_pcs_write(tse_pcs, MII_BMCR, bmcr); in tse_pcs_reset() 136 u16 bmcr; in alt_tse_pcs_an_restart() local 138 bmcr = tse_pcs_read(tse_pcs, MII_BMCR); in alt_tse_pcs_an_restart() 139 bmcr |= BMCR_ANRESTART; in alt_tse_pcs_an_restart() 140 tse_pcs_write(tse_pcs, MII_BMCR, bmcr); in alt_tse_pcs_an_restart()
|
/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 …]
|
/drivers/net/dsa/mv88e6xxx/ |
D | serdes.c | 150 u16 adv, bmcr, val; in mv88e6352_serdes_pcs_config() local 184 bmcr = val | BMCR_ANENABLE; in mv88e6352_serdes_pcs_config() 186 bmcr = val & ~BMCR_ANENABLE; in mv88e6352_serdes_pcs_config() 188 if (bmcr == val) in mv88e6352_serdes_pcs_config() 191 return mv88e6352_serdes_write(chip, MII_BMCR, bmcr); in mv88e6352_serdes_pcs_config() 224 u16 bmcr; in mv88e6352_serdes_pcs_an_restart() local 227 err = mv88e6352_serdes_read(chip, MII_BMCR, &bmcr); in mv88e6352_serdes_pcs_an_restart() 231 return mv88e6352_serdes_write(chip, MII_BMCR, bmcr | BMCR_ANRESTART); in mv88e6352_serdes_pcs_an_restart() 237 u16 val, bmcr; in mv88e6352_serdes_pcs_link_up() local 244 bmcr = val & ~(BMCR_SPEED100 | BMCR_FULLDPLX | BMCR_SPEED1000); in mv88e6352_serdes_pcs_link_up() [all …]
|
/drivers/net/ethernet/dlink/ |
D | dl2k.c | 1546 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media() local 1547 switch (bmcr & (BMCR_SPEED100 | BMCR_SPEED1000)) { in mii_get_media() 1557 if (bmcr & BMCR_FULLDPLX) { in mii_get_media() 1579 __u16 bmcr; in mii_set_media() local 1615 bmcr = BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET; in mii_set_media() 1616 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media() 1626 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media() 1627 bmcr |= BMCR_RESET; in mii_set_media() 1628 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media() 1631 bmcr = 0x1940; /* must be 0x1940 */ in mii_set_media() [all …]
|
/drivers/net/phy/ |
D | national.c | 123 int bmcr = phy_read(phydev, MII_BMCR); in ns_giga_speed_fallback() local 125 phy_write(phydev, MII_BMCR, (bmcr | BMCR_PDOWN)); in ns_giga_speed_fallback() 131 phy_write(phydev, MII_BMCR, (bmcr & ~BMCR_PDOWN)); in ns_giga_speed_fallback()
|
D | dp83822.c | 387 int bmcr; in dp83822_config_init() local 443 bmcr = phy_read(phydev, MII_BMCR); in dp83822_config_init() 444 if (bmcr < 0) in dp83822_config_init() 445 return bmcr; in dp83822_config_init() 447 if (bmcr & BMCR_ANENABLE) { in dp83822_config_init()
|
D | phy_device.c | 2281 int status = 0, bmcr; in genphy_update_link() local 2283 bmcr = phy_read(phydev, MII_BMCR); in genphy_update_link() 2284 if (bmcr < 0) in genphy_update_link() 2285 return bmcr; in genphy_update_link() 2290 if (bmcr & BMCR_ANRESTART) in genphy_update_link() 2380 int bmcr = phy_read(phydev, MII_BMCR); in genphy_read_status_fixed() local 2382 if (bmcr < 0) in genphy_read_status_fixed() 2383 return bmcr; in genphy_read_status_fixed() 2385 if (bmcr & BMCR_FULLDPLX) in genphy_read_status_fixed() 2390 if (bmcr & BMCR_SPEED1000) in genphy_read_status_fixed() [all …]
|
D | microchip_t1.c | 520 int bmcr, bmsr, ret; in microchip_cable_test_start_common() local 525 bmcr = phy_read(phydev, MII_BMCR); in microchip_cable_test_start_common() 526 if (bmcr < 0) in microchip_cable_test_start_common() 527 return bmcr; in microchip_cable_test_start_common() 534 if (bmcr & BMCR_ANENABLE) { in microchip_cable_test_start_common()
|
D | dp83869.c | 640 int bmcr; in dp83869_configure_fiber() local 660 bmcr = phy_read(phydev, MII_BMCR); in dp83869_configure_fiber() 661 if (bmcr < 0) in dp83869_configure_fiber() 662 return bmcr; in dp83869_configure_fiber() 668 if (bmcr & BMCR_ANENABLE) { in dp83869_configure_fiber()
|
/drivers/net/ethernet/smsc/ |
D | smc911x.c | 740 int bmcr; in smc911x_phy_fixed() local 745 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 746 bmcr |= BMCR_PDOWN; in smc911x_phy_fixed() 747 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 753 bmcr &= ~BMCR_ANENABLE; in smc911x_phy_fixed() 755 bmcr |= BMCR_FULLDPLX; in smc911x_phy_fixed() 758 bmcr |= BMCR_SPEED100; in smc911x_phy_fixed() 761 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() 764 bmcr &= ~BMCR_PDOWN; in smc911x_phy_fixed() 765 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed() [all …]
|
D | smc91x.c | 906 int bmcr, cfg1; in smc_phy_fixed() local 919 bmcr = 0; in smc_phy_fixed() 922 bmcr |= BMCR_FULLDPLX; in smc_phy_fixed() 925 bmcr |= BMCR_SPEED100; in smc_phy_fixed() 928 smc_phy_write(dev, phyaddr, MII_BMCR, bmcr); in smc_phy_fixed() 954 unsigned int bmcr; in smc_phy_reset() local 964 bmcr = smc_phy_read(dev, phy, MII_BMCR); in smc_phy_reset() 965 if (!(bmcr & BMCR_RESET)) in smc_phy_reset() 969 return bmcr & BMCR_RESET; in smc_phy_reset() 981 unsigned int bmcr; in smc_phy_powerdown() local [all …]
|
/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()
|
/drivers/net/ethernet/ |
D | jme.c | 414 u32 phylink, cnt = JME_SPDRSV_TIMEOUT, bmcr; in jme_check_link() local 433 bmcr = jme_mdio_read(jme->dev, in jme_check_link() 437 phylink |= ((bmcr & BMCR_SPEED1000) && in jme_check_link() 438 (bmcr & BMCR_SPEED100) == 0) ? in jme_check_link() 440 (bmcr & BMCR_SPEED100) ? in jme_check_link() 444 phylink |= (bmcr & BMCR_FULLDPLX) ? in jme_check_link() 1603 u32 bmcr; in jme_restart_an() local 1606 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an() 1607 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in jme_restart_an() 1608 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr); in jme_restart_an() [all …]
|
/drivers/net/ethernet/broadcom/ |
D | bnx2.c | 1177 u32 bmcr, local_adv, remote_adv, common; in bnx2_5706s_linkup() local 1182 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_5706s_linkup() 1183 if (bmcr & BMCR_FULLDPLX) { in bnx2_5706s_linkup() 1190 if (!(bmcr & BMCR_ANENABLE)) { in bnx2_5706s_linkup() 1214 u32 bmcr; in bnx2_copper_linkup() local 1218 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_copper_linkup() 1219 if (bmcr & BMCR_ANENABLE) { in bnx2_copper_linkup() 1262 if (bmcr & BMCR_SPEED100) { in bnx2_copper_linkup() 1268 if (bmcr & BMCR_FULLDPLX) { in bnx2_copper_linkup() 1458 u32 bmcr; in bnx2_enable_forced_2g5() local [all …]
|
D | b44.c | 478 u32 bmcr; in b44_setup_phy() local 480 if ((err = b44_readphy(bp, MII_BMCR, &bmcr)) != 0) in b44_setup_phy() 482 bmcr &= ~(BMCR_FULLDPLX | BMCR_ANENABLE | BMCR_SPEED100); in b44_setup_phy() 484 bmcr |= BMCR_SPEED100; in b44_setup_phy() 486 bmcr |= BMCR_FULLDPLX; in b44_setup_phy() 487 if ((err = b44_writephy(bp, MII_BMCR, bmcr)) != 0) in b44_setup_phy() 1811 u32 bmcr; in b44_nway_reset() local 1815 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset() 1816 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset() 1818 if (bmcr & BMCR_ANENABLE) { in b44_nway_reset() [all …]
|
D | tg3.c | 4451 u32 bmcr, orig_bmcr; in tg3_phy_copper_begin() local 4464 bmcr = 0; in tg3_phy_copper_begin() 4471 bmcr |= BMCR_SPEED100; in tg3_phy_copper_begin() 4475 bmcr |= BMCR_SPEED1000; in tg3_phy_copper_begin() 4480 bmcr |= BMCR_FULLDPLX; in tg3_phy_copper_begin() 4483 (bmcr != orig_bmcr)) { in tg3_phy_copper_begin() 4497 tg3_writephy(tp, MII_BMCR, bmcr); in tg3_phy_copper_begin() 4895 u32 aux_stat, bmcr; in tg3_setup_copper_phy() local 4909 bmcr = 0; in tg3_setup_copper_phy() 4911 tg3_readphy(tp, MII_BMCR, &bmcr); in tg3_setup_copper_phy() [all …]
|
/drivers/net/usb/ |
D | rtl8150.c | 781 short lpa, bmcr; in rtl8150_get_link_ksettings() local 792 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_link_ksettings() 794 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_link_ksettings() 807 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings() 809 ecmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_link_ksettings()
|
/drivers/net/ethernet/nvidia/ |
D | forcedeth.c | 3389 u32 bmcr; in nv_update_linkspeed() local 3398 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_update_linkspeed() 3399 if (bmcr & BMCR_LOOPBACK) { in nv_update_linkspeed() 4478 int adv, bmcr; in nv_set_link_ksettings() local 4509 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_set_link_ksettings() 4511 bmcr |= BMCR_ANENABLE; in nv_set_link_ksettings() 4514 if (phy_reset(dev, bmcr)) { in nv_set_link_ksettings() 4519 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in nv_set_link_ksettings() 4520 mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); in nv_set_link_ksettings() 4523 int adv, bmcr; in nv_set_link_ksettings() local [all …]
|
/drivers/net/ethernet/intel/ |
D | e100.c | 1437 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init() local 1442 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1445 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init() 1477 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init() 1479 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1489 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1512 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1513 bmcr |= BMCR_RESET; in e100_phy_init() 1514 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); in e100_phy_init()
|
/drivers/net/ethernet/silan/ |
D | sc92031.c | 1316 u16 bmcr; in sc92031_ethtool_nway_reset() local 1320 bmcr = _sc92031_mii_read(port_base, MII_BMCR); in sc92031_ethtool_nway_reset() 1321 if (!(bmcr & BMCR_ANENABLE)) { in sc92031_ethtool_nway_reset() 1326 _sc92031_mii_write(port_base, MII_BMCR, bmcr | BMCR_ANRESTART); in sc92031_ethtool_nway_reset()
|
/drivers/net/ethernet/amd/ |
D | pcnet32.c | 2193 u16 bmcr; in pcnet32_open() local 2229 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open() 2233 bmcr & ~BMCR_ISOLATE); in pcnet32_open() 2236 bmcr | BMCR_ISOLATE); in pcnet32_open() 2799 u16 bmcr; in pcnet32_check_otherphy() local 2813 bmcr = in pcnet32_check_otherphy() 2816 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy() 2819 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy() 2821 bmcr & ~BMCR_ISOLATE); in pcnet32_check_otherphy()
|
D | amd8111e.c | 182 u32 bmcr, advert, tmp; in amd8111e_set_ext_phy() local 210 bmcr = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_BMCR); in amd8111e_set_ext_phy() 211 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in amd8111e_set_ext_phy() 212 amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_BMCR, bmcr); in amd8111e_set_ext_phy()
|
/drivers/net/ethernet/sun/ |
D | niu.c | 1116 int bmsr, advert, ctrl1000, stat1000, lpa, bmcr, estatus; in link_status_mii() local 1122 bmcr = err; in link_status_mii() 1177 if (bmcr & BMCR_ANENABLE) { in link_status_mii() 1204 if ((bmcr & BMCR_SPEED1000) && !(bmcr & BMCR_SPEED100)) in link_status_mii() 1206 else if (bmcr & BMCR_SPEED100) in link_status_mii() 1211 if (bmcr & BMCR_FULLDPLX) in link_status_mii() 1676 u16 bmcr, bmsr, estat; in xcvr_init_1g_rgmii() local 1699 bmcr = 0; in xcvr_init_1g_rgmii() 1700 err = mii_write(np, np->phy_addr, MII_BMCR, bmcr); in xcvr_init_1g_rgmii() 1714 bmcr = (BMCR_SPEED1000 | BMCR_FULLDPLX); in xcvr_init_1g_rgmii() [all …]
|
/drivers/net/ethernet/oki-semi/pch_gbe/ |
D | pch_gbe_main.c | 583 u16 bmcr, stat; in pch_gbe_init_phy() local 588 bmcr = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMCR); in pch_gbe_init_phy() 591 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in pch_gbe_init_phy() 604 bmcr = pch_gbe_mdio_read(netdev, addr, MII_BMCR); in pch_gbe_init_phy() 606 bmcr & ~BMCR_ISOLATE); in pch_gbe_init_phy()
|