Home
last modified time | relevance | path

Searched full:bmcr (Results 1 – 25 of 38) sorted by relevance

12

/linux/drivers/net/ethernet/chelsio/cxgb3/
H A 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 …]
/linux/include/linux/
H A Dmii.h550 * mii_bmcr_encode_fixed - encode fixed speed/duplex settings to a BMCR value
554 * Encode the speed and duplex to a BMCR value. 2500, 1000, 100 and 10 Mbps are
560 u16 bmcr; in mii_bmcr_encode_fixed() local
565 bmcr = BMCR_SPEED1000; in mii_bmcr_encode_fixed()
569 bmcr = BMCR_SPEED100; in mii_bmcr_encode_fixed()
574 bmcr = BMCR_SPEED10; in mii_bmcr_encode_fixed()
579 bmcr |= BMCR_FULLDPLX; in mii_bmcr_encode_fixed()
581 return bmcr; in mii_bmcr_encode_fixed()
/linux/drivers/net/dsa/mv88e6xxx/
H A Dpcs-6352.c193 u16 bmcr; in marvell_c22_pcs_config() local
199 bmcr = neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED ? BMCR_ANENABLE : 0; in marvell_c22_pcs_config()
211 bmcr); in marvell_c22_pcs_config()
239 u16 bmcr; in marvell_c22_pcs_link_up() local
245 bmcr = mii_bmcr_encode_fixed(speed, duplex); in marvell_c22_pcs_link_up()
248 BMCR_FULLDPLX | BMCR_SPEED1000, bmcr); in marvell_c22_pcs_link_up()
H A Dpcs-639x.c306 u16 val, bmcr; in mv88e639x_sgmii_pcs_config() local
328 bmcr = val | BMCR_ANENABLE; in mv88e639x_sgmii_pcs_config()
330 bmcr = val & ~BMCR_ANENABLE; in mv88e639x_sgmii_pcs_config()
333 if (bmcr == val) in mv88e639x_sgmii_pcs_config()
336 return mv88e639x_write(mpcs, MV88E6390_SGMII_BMCR, bmcr); in mv88e639x_sgmii_pcs_config()
353 u16 bmcr; in mv88e639x_sgmii_pcs_link_up() local
359 bmcr = mii_bmcr_encode_fixed(speed, duplex); in mv88e639x_sgmii_pcs_link_up()
363 bmcr); in mv88e639x_sgmii_pcs_link_up()
367 "BMCR", ERR_PTR(err)); in mv88e639x_sgmii_pcs_link_up()
/linux/drivers/net/pcs/
H A Dpcs-mtk-lynxi.c19 /* BMCR (low 16) BMSR (high 16) */
170 unsigned int rgc3, sgm_mode, bmcr; in mtk_pcs_lynxi_config() local
194 bmcr = BMCR_ANENABLE; in mtk_pcs_lynxi_config()
196 bmcr = 0; in mtk_pcs_lynxi_config()
242 /* Update the BMCR */ in mtk_pcs_lynxi_config()
244 BMCR_ANENABLE, bmcr); in mtk_pcs_lynxi_config()
/linux/drivers/net/ethernet/
H A Djme.c414 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()
1601 u32 bmcr; in jme_restart_an() local
1604 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an()
1605 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in jme_restart_an()
1606 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr); in jme_restart_an()
[all …]
/linux/drivers/net/phy/
H A Das21xxx.c636 static int as21xxx_read_link(struct phy_device *phydev, int *bmcr) in as21xxx_read_link() argument
640 /* Normal C22 BMCR report inconsistent data, use in as21xxx_read_link()
643 *bmcr = phy_read_mmd(phydev, MDIO_MMD_AN, in as21xxx_read_link()
645 if (*bmcr < 0) in as21xxx_read_link()
646 return *bmcr; in as21xxx_read_link()
651 if (*bmcr & BMCR_ANRESTART) { in as21xxx_read_link()
699 int bmcr, old_link = phydev->link; in as21xxx_read_status() local
702 ret = as21xxx_read_link(phydev, &bmcr); in as21xxx_read_status()
750 if (bmcr & BMCR_FULLDPLX) in as21xxx_read_status()
H A Ddp83869.c71 /* This is the same bit mask as the BMCR so re-use the BMCR default */
653 int bmcr; in dp83869_configure_fiber() local
672 bmcr = phy_read(phydev, MII_BMCR); in dp83869_configure_fiber()
673 if (bmcr < 0) in dp83869_configure_fiber()
674 return bmcr; in dp83869_configure_fiber()
680 if (bmcr & BMCR_ANENABLE) { in dp83869_configure_fiber()
H A Dphy_device.c1312 * published in 2008, a PHY reset may take up to 0.5 seconds. The MII BMCR
1322 * standard phy_init_hw() which will zero all the other bits in the BMCR
2301 * __genphy_config_aneg - restart auto-negotiation or write BMCR
2307 * enabled, then we write the BMCR. in __genphy_config_aneg()
2358 * genphy_c37_config_aneg - restart auto-negotiation or write BMCR
2363 * enabled, then we write the BMCR. This function is intended in genphy_c37_config_aneg()
2431 int status = 0, bmcr; in genphy_update_link()
2433 bmcr = phy_read(phydev, MII_BMCR); in genphy_update_link()
2434 if (bmcr < 0) in genphy_update_link()
2435 return bmcr; in genphy_update_link()
2425 int status = 0, bmcr; genphy_update_link() local
2524 int bmcr = phy_read(phydev, MII_BMCR); genphy_read_status_fixed() local
2645 int bmcr = phy_read(phydev, MII_BMCR); genphy_c37_read_status() local
[all...]
H A Dmotorcomm.c1524 * yt8521_modify_bmcr_paged - bits modify a PHY's BMCR register of one page
1530 * NOTE: Convenience function which allows a PHY's BMCR register to be in yt8521_modify_bmcr_paged()
1571 * yt8521_modify_utp_fiber_bmcr - bits modify a PHY's BMCR register
1576 * NOTE: Convenience function which allows a PHY's BMCR register to be in yt8521_modify_utp_fiber_bmcr()
2041 int bmcr;
2058 bmcr = __phy_read(phydev, MII_BMCR); in ytphy_setup_master_slave()
2059 if (bmcr < 0) in ytphy_setup_master_slave()
2060 return bmcr; in ytphy_setup_master_slave()
2062 /* When it is coming from fiber forced mode, add bmcr power down in ytphy_setup_master_slave()
2065 if (!(bmcr in ytphy_setup_master_slave()
1994 int bmcr; yt8521_fiber_config_aneg() local
[all...]
/linux/drivers/net/ethernet/ibm/emac/
H A 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()
/linux/drivers/net/ethernet/broadcom/
H A Dbnx2.c1193 u32 bmcr, local_adv, remote_adv, common; in bnx2_5706s_linkup()
1198 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_5706s_linkup()
1199 if (bmcr & BMCR_FULLDPLX) { in bnx2_5706s_linkup()
1206 if (!(bmcr & BMCR_ANENABLE)) { in bnx2_5706s_linkup()
1230 u32 bmcr; in bnx2_copper_linkup()
1234 bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); in bnx2_copper_linkup()
1235 if (bmcr & BMCR_ANENABLE) { in bnx2_copper_linkup()
1278 if (bmcr & BMCR_SPEED100) { in bnx2_copper_linkup()
1284 if (bmcr & BMCR_FULLDPLX) { in bnx2_copper_linkup()
1474 u32 bmcr; in bnx2_enable_forced_2g5()
1177 u32 bmcr, local_adv, remote_adv, common; bnx2_5706s_linkup() local
1214 u32 bmcr; bnx2_copper_linkup() local
1458 u32 bmcr; bnx2_enable_forced_2g5() local
1502 u32 bmcr; bnx2_disable_forced_2g5() local
1615 u32 bmcr; bnx2_set_link() local
1759 u32 adv, bmcr; bnx2_setup_serdes_phy() local
2077 u32 bmcr, adv_reg, new_adv = 0; bnx2_setup_copper_phy() local
6078 u32 bmcr; bnx2_5706_serdes_timer() local
6100 u32 bmcr; bnx2_5706_serdes_timer() local
6145 u32 bmcr; bnx2_5708_serdes_timer() local
7140 u32 bmcr; bnx2_nway_reset() local
[all...]
H A Db44.c457 u32 bmcr; in b44_setup_phy() local
459 if ((err = b44_readphy(bp, MII_BMCR, &bmcr)) != 0) in b44_setup_phy()
461 bmcr &= ~(BMCR_FULLDPLX | BMCR_ANENABLE | BMCR_SPEED100); in b44_setup_phy()
463 bmcr |= BMCR_SPEED100; in b44_setup_phy()
465 bmcr |= BMCR_FULLDPLX; in b44_setup_phy()
466 if ((err = b44_writephy(bp, MII_BMCR, bmcr)) != 0) in b44_setup_phy()
1790 u32 bmcr; in b44_nway_reset() local
1797 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset()
1798 b44_readphy(bp, MII_BMCR, &bmcr); in b44_nway_reset()
1800 if (bmcr in b44_nway_reset()
[all...]
H A Dtg3.c4441 u32 bmcr, orig_bmcr; in tg3_phy_copper_begin() local
4454 bmcr = 0; in tg3_phy_copper_begin()
4461 bmcr |= BMCR_SPEED100; in tg3_phy_copper_begin()
4465 bmcr |= BMCR_SPEED1000; in tg3_phy_copper_begin()
4470 bmcr |= BMCR_FULLDPLX; in tg3_phy_copper_begin()
4473 (bmcr != orig_bmcr)) { in tg3_phy_copper_begin()
4487 tg3_writephy(tp, MII_BMCR, bmcr); in tg3_phy_copper_begin()
4885 u32 aux_stat, bmcr; in tg3_setup_copper_phy() local
4899 bmcr = 0; in tg3_setup_copper_phy()
4901 tg3_readphy(tp, MII_BMCR, &bmcr); in tg3_setup_copper_phy()
[all …]
/linux/drivers/net/usb/
H A Drtl8150.c33 #define BMCR 0x0140 macro
804 short bmcr = 0; in rtl8150_get_link_ksettings() local
815 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_link_ksettings()
817 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_link_ksettings()
830 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings()
832 ecmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_link_ksettings()
H A Dsmsc75xx.c815 int bmcr, ret, timeout = 0; in smsc75xx_phy_initialize() local
831 bmcr = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); in smsc75xx_phy_initialize()
832 if (bmcr < 0) { in smsc75xx_phy_initialize()
834 return bmcr; in smsc75xx_phy_initialize()
837 } while ((bmcr & BMCR_RESET) && (timeout < 100)); in smsc75xx_phy_initialize()
/linux/rust/kernel/net/phy/
H A Dreg.rs32 /// // read C22 BMCR register
33 /// dev.read(C22::BMCR);
62 pub const BMCR: Self = C22(0x00);
60 pub const BMCR: Self = C22(0x00); global() constant
/linux/drivers/net/ethernet/smsc/
H A Dsmc91x.c899 int bmcr, cfg1; in smc_phy_fixed() local
912 bmcr = 0; in smc_phy_fixed()
915 bmcr |= BMCR_FULLDPLX; in smc_phy_fixed()
918 bmcr |= BMCR_SPEED100; in smc_phy_fixed()
921 smc_phy_write(dev, phyaddr, MII_BMCR, bmcr); in smc_phy_fixed()
947 unsigned int bmcr; in smc_phy_reset() local
957 bmcr = smc_phy_read(dev, phy, MII_BMCR); in smc_phy_reset()
958 if (!(bmcr & BMCR_RESET)) in smc_phy_reset()
962 return bmcr & BMCR_RESET; in smc_phy_reset()
974 unsigned int bmcr; in smc_phy_powerdown() local
[all …]
/linux/drivers/net/ethernet/nvidia/
H A Dforcedeth.c1462 * (certain phys need bmcr to be setup with reset) in phy_init()
3375 u32 bmcr; in nv_update_linkspeed() local
3384 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_update_linkspeed()
3385 if (bmcr & BMCR_LOOPBACK) { in nv_update_linkspeed()
4464 int adv, bmcr; in nv_set_link_ksettings() local
4495 bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); in nv_set_link_ksettings()
4497 bmcr |= BMCR_ANENABLE; in nv_set_link_ksettings()
4500 if (phy_reset(dev, bmcr)) { in nv_set_link_ksettings()
4505 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); in nv_set_link_ksettings()
4506 mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); in nv_set_link_ksettings()
[all …]
/linux/drivers/net/ethernet/sun/
H A Dniu.c1116 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()
1300 netdev_err(np->dev, "Port %u PHY will not reset (bmcr=%04x)\n", in bcm8704_reset()
1664 netdev_err(np->dev, "Port %u MII would not reset, bmcr[%04x]\n", in mii_reset()
1676 u16 bmcr, bmsr, estat; in xcvr_init_1g_rgmii() local
1699 bmcr = 0; in xcvr_init_1g_rgmii()
[all …]
H A Dsunbmac.h310 unsigned short sw_bmcr; /* SW copy of PHY BMCR */
/linux/drivers/net/ethernet/intel/
H A De100.c1439 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init()
1444 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1447 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init()
1479 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init()
1481 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1487 * other phy_id's) using bmcr value from addr discovery loop above. in e100_phy_init()
1491 bmcr & ~BMCR_ISOLATE); in e100_phy_init()
1514 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1515 bmcr | in e100_phy_init()
1436 u16 bmcr, stat, id_lo, id_hi, cong; e100_phy_init() local
[all...]
/linux/drivers/net/ethernet/silan/
H A 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()
/linux/drivers/net/ethernet/amd/
H A Dpcnet32.c2196 u16 bmcr; in pcnet32_open() local
2232 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open()
2236 bmcr & ~BMCR_ISOLATE); in pcnet32_open()
2239 bmcr | BMCR_ISOLATE); in pcnet32_open()
2804 u16 bmcr; in pcnet32_check_otherphy() local
2818 bmcr = in pcnet32_check_otherphy()
2821 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy()
2824 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy()
2826 bmcr & ~BMCR_ISOLATE); in pcnet32_check_otherphy()
H A Damd8111e.c182 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()

12