| /linux/drivers/net/ethernet/chelsio/cxgb3/ |
| H A 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/include/linux/ |
| H A D | mii.h | 550 * 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 D | pcs-6352.c | 193 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 D | pcs-639x.c | 306 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 D | pcs-mtk-lynxi.c | 19 /* BMCR (low 16) BMSR (high 16) */ 173 unsigned int rgc3, sgm_mode, bmcr; in mtk_pcs_lynxi_config() local 197 bmcr = BMCR_ANENABLE; in mtk_pcs_lynxi_config() 199 bmcr = 0; in mtk_pcs_lynxi_config() 245 /* Update the BMCR */ in mtk_pcs_lynxi_config() 247 BMCR_ANENABLE, bmcr); in mtk_pcs_lynxi_config()
|
| /linux/drivers/net/ethernet/ |
| H A 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() 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/ethernet/ibm/emac/ |
| H A 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/drivers/net/phy/ |
| H A D | as21xxx.c | 636 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 D | dp83869.c | 71 /* 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 D | phy_device.c | 1312 * 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. 2358 * genphy_c37_config_aneg - restart auto-negotiation or write BMCR 2363 * enabled, then we write the BMCR. This function is intended 2431 int status = 0, bmcr; in genphy_update_link() local 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() [all …]
|
| H A D | motorcomm.c | 1537 * yt8521_modify_bmcr_paged - bits modify a PHY's BMCR register of one page 1543 * NOTE: Convenience function which allows a PHY's BMCR register to be 1584 * yt8521_modify_utp_fiber_bmcr - bits modify a PHY's BMCR register 1589 * NOTE: Convenience function which allows a PHY's BMCR register to be 2054 int bmcr; in yt8521_fiber_config_aneg() local 2071 bmcr = __phy_read(phydev, MII_BMCR); in yt8521_fiber_config_aneg() 2072 if (bmcr < 0) in yt8521_fiber_config_aneg() 2073 return bmcr; in yt8521_fiber_config_aneg() 2075 /* When it is coming from fiber forced mode, add bmcr power down in yt8521_fiber_config_aneg() 2078 if (!(bmcr & BMCR_ANENABLE)) { in yt8521_fiber_config_aneg() [all …]
|
| H A D | marvell.c | 684 * marvell_config_aneg_fiber - restart auto-negotiation or write BMCR 689 * enabled, then we write the BMCR. Adapted for fiber link in 724 * through the Fibre page BMCR ANENABLE bit. in m88e1111_inband_caps() 736 u16 extsr, bmcr; in m88e1111_config_inband() local 749 bmcr = 0; in m88e1111_config_inband() 751 bmcr = BMCR_ANENABLE; in m88e1111_config_inband() 759 BMCR_ANENABLE, bmcr); in m88e1111_config_inband() 1010 * it was previously disabled in the Fiber BMCR! in m88e1111_config_init_1000basex() 2364 int bmcr, bmsr, ret; in marvell_cable_test_start_common() local 2369 bmcr = phy_read(phydev, MII_BMCR); in marvell_cable_test_start_common() [all …]
|
| H A D | microchip_t1.c | 783 int bmcr, bmsr, ret; in microchip_cable_test_start_common() local 788 bmcr = phy_read(phydev, MII_BMCR); in microchip_cable_test_start_common() 789 if (bmcr < 0) in microchip_cable_test_start_common() 790 return bmcr; in microchip_cable_test_start_common() 797 if (bmcr & BMCR_ANENABLE) { in microchip_cable_test_start_common()
|
| /linux/drivers/net/usb/ |
| H A D | rtl8150.c | 33 #define BMCR 0x0140 macro 806 short bmcr = 0; in rtl8150_get_link_ksettings() local 817 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_link_ksettings() 819 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_link_ksettings() 832 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings() 834 ecmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_link_ksettings()
|
| H A D | smsc75xx.c | 815 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 D | reg.rs | 32 /// // 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 D | smc91x.c | 899 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/sun/ |
| H A 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() 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 …]
|
| /linux/drivers/net/ethernet/broadcom/ |
| H A D | tg3.c | 4441 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/ethernet/silan/ |
| H A 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()
|
| /linux/drivers/net/phy/qcom/ |
| H A D | at803x.c | 171 u16 bmcr; member 241 context->bmcr = phy_read(phydev, MII_BMCR); in at803x_context_save() 253 phy_write(phydev, MII_BMCR, context->bmcr); in at803x_context_restore()
|
| /linux/drivers/net/ethernet/amd/ |
| H A D | pcnet32.c | 2196 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 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()
|
| /linux/drivers/net/ethernet/oki-semi/pch_gbe/ |
| H A D | pch_gbe_main.c | 592 u16 bmcr, stat; in pch_gbe_init_phy() local 597 bmcr = pch_gbe_mdio_read(netdev, adapter->mii.phy_id, MII_BMCR); in pch_gbe_init_phy() 600 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in pch_gbe_init_phy() 613 bmcr = pch_gbe_mdio_read(netdev, addr, MII_BMCR); in pch_gbe_init_phy() 615 bmcr & ~BMCR_ISOLATE); in pch_gbe_init_phy()
|
| /linux/drivers/net/ethernet/via/ |
| H A D | via-velocity.c | 1187 u16 BMCR; in mii_init() local 1251 velocity_mii_read(vptr->mac_regs, MII_BMCR, &BMCR); in mii_init() 1252 if (BMCR & BMCR_ISOLATE) { in mii_init() 1253 BMCR &= ~BMCR_ISOLATE; in mii_init() 1254 velocity_mii_write(vptr->mac_regs, MII_BMCR, BMCR); in mii_init()
|