Home
last modified time | relevance | path

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

12

/drivers/net/phy/
Dicplus.c105 int bmcr; in ip1xx_reset() local
108 bmcr = phy_read(phydev, MII_BMCR); in ip1xx_reset()
109 if (bmcr < 0) in ip1xx_reset()
110 return bmcr; in ip1xx_reset()
111 bmcr |= BMCR_RESET; in ip1xx_reset()
112 bmcr = phy_write(phydev, MII_BMCR, bmcr); in ip1xx_reset()
113 if (bmcr < 0) in ip1xx_reset()
114 return bmcr; in ip1xx_reset()
117 bmcr = phy_read(phydev, MII_BMCR); in ip1xx_reset()
118 if (bmcr < 0) in ip1xx_reset()
[all …]
Dfixed.c51 u16 bmcr = 0; in fixed_phy_update_regs() local
56 bmcr |= BMCR_FULLDPLX; in fixed_phy_update_regs()
61 bmcr |= BMCR_SPEED1000; in fixed_phy_update_regs()
66 bmcr |= BMCR_SPEED100; in fixed_phy_update_regs()
81 bmcr |= BMCR_SPEED1000; in fixed_phy_update_regs()
86 bmcr |= BMCR_SPEED100; in fixed_phy_update_regs()
112 fp->regs[MII_BMCR] = bmcr; in fixed_phy_update_regs()
Dlxt.c219 int bmcr = phy_read(phydev, MII_BMCR); in lxt973a2_read_status() local
221 if (bmcr < 0) in lxt973a2_read_status()
222 return bmcr; in lxt973a2_read_status()
224 if (bmcr & BMCR_FULLDPLX) in lxt973a2_read_status()
229 if (bmcr & BMCR_SPEED1000) in lxt973a2_read_status()
231 else if (bmcr & BMCR_SPEED100) in lxt973a2_read_status()
Dmarvell.c203 int bmcr; in marvell_config_aneg() local
210 bmcr = phy_read(phydev, MII_BMCR); in marvell_config_aneg()
211 if (bmcr < 0) in marvell_config_aneg()
212 return bmcr; in marvell_config_aneg()
214 err = phy_write(phydev, MII_BMCR, bmcr | BMCR_RESET); in marvell_config_aneg()
767 int bmcr = phy_read(phydev, MII_BMCR); in marvell_read_status() local
769 if (bmcr < 0) in marvell_read_status()
770 return bmcr; in marvell_read_status()
772 if (bmcr & BMCR_FULLDPLX) in marvell_read_status()
777 if (bmcr & BMCR_SPEED1000) in marvell_read_status()
[all …]
Dnational.c99 int bmcr = phy_read(phydev, MII_BMCR); in ns_giga_speed_fallback() local
101 phy_write(phydev, MII_BMCR, (bmcr | BMCR_PDOWN)); in ns_giga_speed_fallback()
107 phy_write(phydev, MII_BMCR, (bmcr & ~BMCR_PDOWN)); in ns_giga_speed_fallback()
Dat803x.c56 u16 bmcr; member
68 context->bmcr = phy_read(phydev, MII_BMCR); in at803x_context_save()
80 phy_write(phydev, MII_BMCR, context->bmcr); in at803x_context_restore()
Dphy_device.c1014 int bmcr = phy_read(phydev, MII_BMCR); in genphy_read_status() local
1016 if (bmcr < 0) in genphy_read_status()
1017 return bmcr; in genphy_read_status()
1019 if (bmcr & BMCR_FULLDPLX) in genphy_read_status()
1024 if (bmcr & BMCR_SPEED1000) in genphy_read_status()
1026 else if (bmcr & BMCR_SPEED100) in genphy_read_status()
/drivers/net/
Dmii.c58 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()
169 u32 bmcr, advert, tmp; in mii_ethtool_sset() local
200 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_sset()
201 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in mii_ethtool_sset()
[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/ethernet/dlink/
Ddl2k.c1455 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media() local
1456 switch (bmcr & (BMCR_SPEED100 | BMCR_SPEED1000)) { in mii_get_media()
1466 if (bmcr & BMCR_FULLDPLX) { in mii_get_media()
1488 __u16 bmcr; in mii_set_media() local
1524 bmcr = BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET; in mii_set_media()
1525 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1535 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media()
1536 bmcr |= BMCR_RESET; in mii_set_media()
1537 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1540 bmcr = 0x1940; /* must be 0x1940 */ in mii_set_media()
[all …]
/drivers/net/ethernet/smsc/
Dsmc911x.c745 int bmcr; in smc911x_phy_fixed() local
750 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed()
751 bmcr |= BMCR_PDOWN; in smc911x_phy_fixed()
752 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed()
758 bmcr &= ~BMCR_ANENABLE; in smc911x_phy_fixed()
760 bmcr |= BMCR_FULLDPLX; in smc911x_phy_fixed()
763 bmcr |= BMCR_SPEED100; in smc911x_phy_fixed()
766 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed()
769 bmcr &= ~BMCR_PDOWN; in smc911x_phy_fixed()
770 SMC_SET_PHY_BMCR(lp, phyaddr, bmcr); in smc911x_phy_fixed()
[all …]
Dsmc91x.c911 int bmcr, cfg1; in smc_phy_fixed() local
924 bmcr = 0; in smc_phy_fixed()
927 bmcr |= BMCR_FULLDPLX; in smc_phy_fixed()
930 bmcr |= BMCR_SPEED100; in smc_phy_fixed()
933 smc_phy_write(dev, phyaddr, MII_BMCR, bmcr); in smc_phy_fixed()
959 unsigned int bmcr; in smc_phy_reset() local
969 bmcr = smc_phy_read(dev, phy, MII_BMCR); in smc_phy_reset()
970 if (!(bmcr & BMCR_RESET)) in smc_phy_reset()
974 return bmcr & BMCR_RESET; in smc_phy_reset()
986 unsigned int bmcr; in smc_phy_powerdown() local
[all …]
/drivers/net/ethernet/ibm/emac/
Dphy.c258 int bmcr = phy_read(phy, MII_BMCR); in genmii_read_link() local
259 if (bmcr < 0) in genmii_read_link()
260 return bmcr; in genmii_read_link()
262 if (bmcr & BMCR_FULLDPLX) in genmii_read_link()
266 if (bmcr & BMCR_SPEED1000) in genmii_read_link()
268 else if (bmcr & BMCR_SPEED100) in genmii_read_link()
/drivers/net/ethernet/
Djme.c427 u32 phylink, cnt = JME_SPDRSV_TIMEOUT, bmcr; in jme_check_link() local
446 bmcr = jme_mdio_read(jme->dev, in jme_check_link()
450 phylink |= ((bmcr & BMCR_SPEED1000) && in jme_check_link()
451 (bmcr & BMCR_SPEED100) == 0) ? in jme_check_link()
453 (bmcr & BMCR_SPEED100) ? in jme_check_link()
457 phylink |= (bmcr & BMCR_FULLDPLX) ? in jme_check_link()
1643 u32 bmcr; in jme_restart_an() local
1646 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an()
1647 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in jme_restart_an()
1648 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr); in jme_restart_an()
[all …]
/drivers/net/ethernet/broadcom/
Dbnx2.c1161 u32 bmcr, local_adv, remote_adv, common; in bnx2_5706s_linkup() local
1166 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_5706s_linkup()
1167 if (bmcr & BMCR_FULLDPLX) { in bnx2_5706s_linkup()
1174 if (!(bmcr & BMCR_ANENABLE)) { in bnx2_5706s_linkup()
1198 u32 bmcr; in bnx2_copper_linkup() local
1202 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_copper_linkup()
1203 if (bmcr & BMCR_ANENABLE) { in bnx2_copper_linkup()
1246 if (bmcr & BMCR_SPEED100) { in bnx2_copper_linkup()
1252 if (bmcr & BMCR_FULLDPLX) { in bnx2_copper_linkup()
1442 u32 uninitialized_var(bmcr); in bnx2_enable_forced_2g5()
[all …]
Db44.c479 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()
1818 u32 bmcr; in b44_nway_reset() local
1822 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset()
1823 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset()
1825 if (bmcr & BMCR_ANENABLE) { in b44_nway_reset()
[all …]
Dtg3.c4445 u32 bmcr, orig_bmcr; in tg3_phy_copper_begin() local
4458 bmcr = 0; in tg3_phy_copper_begin()
4465 bmcr |= BMCR_SPEED100; in tg3_phy_copper_begin()
4469 bmcr |= BMCR_SPEED1000; in tg3_phy_copper_begin()
4474 bmcr |= BMCR_FULLDPLX; in tg3_phy_copper_begin()
4477 (bmcr != orig_bmcr)) { in tg3_phy_copper_begin()
4491 tg3_writephy(tp, MII_BMCR, bmcr); in tg3_phy_copper_begin()
4889 u32 aux_stat, bmcr; in tg3_setup_copper_phy() local
4903 bmcr = 0; in tg3_setup_copper_phy()
4905 tg3_readphy(tp, MII_BMCR, &bmcr); in tg3_setup_copper_phy()
[all …]
/drivers/net/usb/
Drtl8150.c798 short lpa, bmcr; in rtl8150_get_settings() local
809 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_settings()
811 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_settings()
824 ethtool_cmd_speed_set(ecmd, ((bmcr & BMCR_SPEED100) ? in rtl8150_get_settings()
826 ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_settings()
/drivers/net/ethernet/xilinx/
Dxilinx_emaclite.c921 u32 bmcr; in xemaclite_open() local
943 bmcr = phy_read(lp->phy_dev, MII_BMCR); in xemaclite_open()
944 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in xemaclite_open()
945 phy_write(lp->phy_dev, MII_BMCR, bmcr); in xemaclite_open()
/drivers/net/ethernet/nuvoton/
Dw90p910_ether.c209 unsigned int bmsr, bmcr, lpa, speed, duplex; in update_linkspeed() local
224 bmcr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMCR); in update_linkspeed()
226 if (bmcr & BMCR_ANENABLE) { in update_linkspeed()
243 speed = (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10; in update_linkspeed()
244 duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; in update_linkspeed()
/drivers/net/ethernet/nvidia/
Dforcedeth.c3307 u32 bmcr; in nv_update_linkspeed() local
3316 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_update_linkspeed()
3317 if (bmcr & BMCR_LOOPBACK) { in nv_update_linkspeed()
4389 int adv, bmcr; in nv_set_settings() local
4420 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_set_settings()
4422 bmcr |= BMCR_ANENABLE; in nv_set_settings()
4425 if (phy_reset(dev, bmcr)) { in nv_set_settings()
4430 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in nv_set_settings()
4431 mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); in nv_set_settings()
4434 int adv, bmcr; in nv_set_settings() local
[all …]
/drivers/net/ethernet/intel/
De100.c1466 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init() local
1471 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1474 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init()
1506 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init()
1508 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1518 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1541 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1542 bmcr |= BMCR_RESET; in e100_phy_init()
1543 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); in e100_phy_init()
/drivers/net/ethernet/amd/
Dpcnet32.c2135 u16 bmcr; in pcnet32_open() local
2171 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open()
2175 bmcr & ~BMCR_ISOLATE); in pcnet32_open()
2178 bmcr | BMCR_ISOLATE); in pcnet32_open()
2745 u16 bmcr; in pcnet32_check_otherphy() local
2759 bmcr = in pcnet32_check_otherphy()
2762 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy()
2765 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy()
2767 bmcr & ~BMCR_ISOLATE); in pcnet32_check_otherphy()
/drivers/net/ethernet/sun/
Dniu.c1096 int bmsr, advert, ctrl1000, stat1000, lpa, bmcr, estatus; in link_status_mii() local
1102 bmcr = err; in link_status_mii()
1157 if (bmcr & BMCR_ANENABLE) { in link_status_mii()
1184 if ((bmcr & BMCR_SPEED1000) && !(bmcr & BMCR_SPEED100)) in link_status_mii()
1186 else if (bmcr & BMCR_SPEED100) in link_status_mii()
1191 if (bmcr & BMCR_FULLDPLX) in link_status_mii()
1674 u16 bmcr, bmsr, estat; in xcvr_init_1g_rgmii() local
1697 bmcr = 0; in xcvr_init_1g_rgmii()
1698 err = mii_write(np, np->phy_addr, MII_BMCR, bmcr); in xcvr_init_1g_rgmii()
1712 bmcr = (BMCR_SPEED1000 | BMCR_FULLDPLX); in xcvr_init_1g_rgmii()
[all …]
/drivers/net/ethernet/silan/
Dsc92031.c1315 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()

12