Home
last modified time | relevance | path

Searched refs:bmcr (Results 1 – 25 of 33) sorted by relevance

12

/drivers/net/
Dmii.c56 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/ethernet/chelsio/cxgb3/
Dvsc8211.c133 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/
Dserdes.c142 u16 adv, bmcr, val; in mv88e6352_serdes_pcs_config() local
176 bmcr = val | BMCR_ANENABLE; in mv88e6352_serdes_pcs_config()
178 bmcr = val & ~BMCR_ANENABLE; in mv88e6352_serdes_pcs_config()
180 if (bmcr == val) in mv88e6352_serdes_pcs_config()
183 return mv88e6352_serdes_write(chip, MII_BMCR, bmcr); in mv88e6352_serdes_pcs_config()
216 u16 bmcr; in mv88e6352_serdes_pcs_an_restart() local
219 err = mv88e6352_serdes_read(chip, MII_BMCR, &bmcr); in mv88e6352_serdes_pcs_an_restart()
223 return mv88e6352_serdes_write(chip, MII_BMCR, bmcr | BMCR_ANRESTART); in mv88e6352_serdes_pcs_an_restart()
229 u16 val, bmcr; in mv88e6352_serdes_pcs_link_up() local
236 bmcr = val & ~(BMCR_SPEED100 | BMCR_FULLDPLX | BMCR_SPEED1000); in mv88e6352_serdes_pcs_link_up()
[all …]
/drivers/net/ethernet/dlink/
Ddl2k.c1547 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media() local
1548 switch (bmcr & (BMCR_SPEED100 | BMCR_SPEED1000)) { in mii_get_media()
1558 if (bmcr & BMCR_FULLDPLX) { in mii_get_media()
1580 __u16 bmcr; in mii_set_media() local
1616 bmcr = BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET; in mii_set_media()
1617 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1627 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media()
1628 bmcr |= BMCR_RESET; in mii_set_media()
1629 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1632 bmcr = 0x1940; /* must be 0x1940 */ in mii_set_media()
[all …]
/drivers/net/phy/
Dnational.c123 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()
Ddp83822.c386 int bmcr; in dp83822_config_init() local
436 bmcr = phy_read(phydev, MII_BMCR); in dp83822_config_init()
437 if (bmcr < 0) in dp83822_config_init()
438 return bmcr; in dp83822_config_init()
440 if (bmcr & BMCR_ANENABLE) { in dp83822_config_init()
Dphy_device.c2267 int status = 0, bmcr; in genphy_update_link() local
2269 bmcr = phy_read(phydev, MII_BMCR); in genphy_update_link()
2270 if (bmcr < 0) in genphy_update_link()
2271 return bmcr; in genphy_update_link()
2276 if (bmcr & BMCR_ANRESTART) in genphy_update_link()
2366 int bmcr = phy_read(phydev, MII_BMCR); in genphy_read_status_fixed() local
2368 if (bmcr < 0) in genphy_read_status_fixed()
2369 return bmcr; in genphy_read_status_fixed()
2371 if (bmcr & BMCR_FULLDPLX) in genphy_read_status_fixed()
2376 if (bmcr & BMCR_SPEED1000) in genphy_read_status_fixed()
[all …]
Ddp83869.c639 int bmcr; in dp83869_configure_fiber() local
659 bmcr = phy_read(phydev, MII_BMCR); in dp83869_configure_fiber()
660 if (bmcr < 0) in dp83869_configure_fiber()
661 return bmcr; in dp83869_configure_fiber()
667 if (bmcr & BMCR_ANENABLE) { in dp83869_configure_fiber()
Dat803x.c201 u16 bmcr; member
305 context->bmcr = phy_read(phydev, MII_BMCR); in at803x_context_save()
317 phy_write(phydev, MII_BMCR, context->bmcr); in at803x_context_restore()
/drivers/net/ethernet/smsc/
Dsmc911x.c740 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 …]
Dsmc91x.c906 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/
Dphy.c259 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/
Djme.c413 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()
1602 u32 bmcr; in jme_restart_an() local
1605 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an()
1606 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in jme_restart_an()
1607 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr); in jme_restart_an()
[all …]
/drivers/net/ethernet/broadcom/
Dbnx2.c1177 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 …]
Db44.c478 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 …]
Dtg3.c4450 u32 bmcr, orig_bmcr; in tg3_phy_copper_begin() local
4463 bmcr = 0; in tg3_phy_copper_begin()
4470 bmcr |= BMCR_SPEED100; in tg3_phy_copper_begin()
4474 bmcr |= BMCR_SPEED1000; in tg3_phy_copper_begin()
4479 bmcr |= BMCR_FULLDPLX; in tg3_phy_copper_begin()
4482 (bmcr != orig_bmcr)) { in tg3_phy_copper_begin()
4496 tg3_writephy(tp, MII_BMCR, bmcr); in tg3_phy_copper_begin()
4894 u32 aux_stat, bmcr; in tg3_setup_copper_phy() local
4908 bmcr = 0; in tg3_setup_copper_phy()
4910 tg3_readphy(tp, MII_BMCR, &bmcr); in tg3_setup_copper_phy()
[all …]
/drivers/net/usb/
Drtl8150.c781 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()
Dsmsc75xx.c822 int bmcr, ret, timeout = 0; in smsc75xx_phy_initialize() local
838 bmcr = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); in smsc75xx_phy_initialize()
839 if (bmcr < 0) { in smsc75xx_phy_initialize()
841 return bmcr; in smsc75xx_phy_initialize()
844 } while ((bmcr & BMCR_RESET) && (timeout < 100)); in smsc75xx_phy_initialize()
/drivers/net/ethernet/nvidia/
Dforcedeth.c3389 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/
De100.c1438 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init() local
1443 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1446 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init()
1478 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init()
1480 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1490 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1513 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1514 bmcr |= BMCR_RESET; in e100_phy_init()
1515 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); in e100_phy_init()
/drivers/net/ethernet/silan/
Dsc92031.c1316 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/
Dpcnet32.c2183 u16 bmcr; in pcnet32_open() local
2219 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open()
2223 bmcr & ~BMCR_ISOLATE); in pcnet32_open()
2226 bmcr | BMCR_ISOLATE); in pcnet32_open()
2789 u16 bmcr; in pcnet32_check_otherphy() local
2803 bmcr = in pcnet32_check_otherphy()
2806 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy()
2809 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy()
2811 bmcr & ~BMCR_ISOLATE); in pcnet32_check_otherphy()
Damd8111e.c182 u32 bmcr, advert, tmp; in amd8111e_set_ext_phy() local
211 bmcr = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_BMCR); in amd8111e_set_ext_phy()
212 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in amd8111e_set_ext_phy()
213 amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_BMCR, bmcr); in amd8111e_set_ext_phy()
/drivers/net/ethernet/sun/
Dniu.c1097 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 …]
/drivers/net/ethernet/oki-semi/pch_gbe/
Dpch_gbe_main.c588 u16 bmcr, stat; in pch_gbe_init_phy() local
593 bmcr = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMCR); in pch_gbe_init_phy()
596 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in pch_gbe_init_phy()
609 bmcr = pch_gbe_mdio_read(netdev, addr, MII_BMCR); in pch_gbe_init_phy()
611 bmcr & ~BMCR_ISOLATE); in pch_gbe_init_phy()

12