| /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 | 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()
|
| /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/pcs/ |
| H A D | pcs-mtk-lynxi.c | 167 unsigned int rgc3, sgm_mode, bmcr; in mtk_pcs_lynxi_config() local 191 bmcr = BMCR_ANENABLE; in mtk_pcs_lynxi_config() 193 bmcr = 0; in mtk_pcs_lynxi_config() 241 BMCR_ANENABLE, bmcr); in mtk_pcs_lynxi_config()
|
| /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 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 | 652 int bmcr; in dp83869_configure_fiber() local 671 bmcr = phy_read(phydev, MII_BMCR); in dp83869_configure_fiber() 672 if (bmcr < 0) in dp83869_configure_fiber() 673 return bmcr; in dp83869_configure_fiber() 679 if (bmcr & BMCR_ANENABLE) { in dp83869_configure_fiber()
|
| H A D | phy_device.c | 2455 int status = 0, bmcr; in genphy_update_link() local 2457 bmcr = phy_read(phydev, MII_BMCR); in genphy_update_link() 2458 if (bmcr < 0) in genphy_update_link() 2459 return bmcr; in genphy_update_link() 2464 if (bmcr & BMCR_ANRESTART) in genphy_update_link() 2554 int bmcr = phy_read(phydev, MII_BMCR); in genphy_read_status_fixed() local 2556 if (bmcr < 0) in genphy_read_status_fixed() 2557 return bmcr; in genphy_read_status_fixed() 2559 if (bmcr & BMCR_FULLDPLX) in genphy_read_status_fixed() 2564 if (bmcr & BMCR_SPEED1000) in genphy_read_status_fixed() [all …]
|
| H A D | motorcomm.c | 1994 int bmcr; in yt8521_fiber_config_aneg() local 2011 bmcr = __phy_read(phydev, MII_BMCR); in yt8521_fiber_config_aneg() 2012 if (bmcr < 0) in yt8521_fiber_config_aneg() 2013 return bmcr; in yt8521_fiber_config_aneg() 2018 if (!(bmcr & BMCR_ANENABLE)) { in yt8521_fiber_config_aneg()
|
| /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/broadcom/ |
| H A 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 …]
|
| H A D | b44.c | 457 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 & BMCR_ANENABLE) in b44_nway_reset() [all …]
|
| 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/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/usb/ |
| H A D | rtl8150.c | 794 short bmcr = 0; in rtl8150_get_link_ksettings() local 805 get_registers(dev, BMCR, 2, &bmcr); in rtl8150_get_link_ksettings() 807 if (bmcr & BMCR_ANENABLE) { in rtl8150_get_link_ksettings() 820 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings() 822 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/drivers/net/ethernet/nvidia/ |
| H A D | forcedeth.c | 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() 4509 int adv, bmcr; in nv_set_link_ksettings() local [all …]
|
| /linux/drivers/net/ethernet/intel/ |
| H A D | e100.c | 1436 u16 bmcr, stat, id_lo, id_hi, cong; in e100_phy_init() local 1441 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1444 if (!((bmcr == 0xFFFF) || ((stat == 0) && (bmcr == 0)))) in e100_phy_init() 1476 bmcr = mdio_read(netdev, addr, MII_BMCR); in e100_phy_init() 1478 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1488 bmcr & ~BMCR_ISOLATE); in e100_phy_init() 1511 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init() 1512 bmcr |= BMCR_RESET; in e100_phy_init() 1513 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr); in e100_phy_init()
|
| /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/ethernet/amd/ |
| H A D | pcnet32.c | 2194 u16 bmcr; in pcnet32_open() local 2230 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_open() 2234 bmcr & ~BMCR_ISOLATE); in pcnet32_open() 2237 bmcr | BMCR_ISOLATE); in pcnet32_open() 2802 u16 bmcr; in pcnet32_check_otherphy() local 2816 bmcr = in pcnet32_check_otherphy() 2819 bmcr | BMCR_ISOLATE); in pcnet32_check_otherphy() 2822 bmcr = mdio_read(dev, i, MII_BMCR); in pcnet32_check_otherphy() 2824 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/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() 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 …]
|
| H A D | cassini.c | 4475 u16 bmcr; in cas_get_link_ksettings() local 4490 bmcr = 0; in cas_get_link_ksettings() 4510 bmcr = cas_phy_read(cp, MII_BMCR); in cas_get_link_ksettings() 4524 bmcr = readl(cp->regs + REG_PCS_MII_CTRL); in cas_get_link_ksettings() 4531 if (bmcr & BMCR_ANENABLE) { in cas_get_link_ksettings() 4541 cmd->base.speed = ((bmcr & CAS_BMCR_SPEED1000) ? in cas_get_link_ksettings() 4543 ((bmcr & BMCR_SPEED100) ? in cas_get_link_ksettings() 4545 cmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in cas_get_link_ksettings()
|
| /linux/drivers/net/ethernet/natsemi/ |
| H A D | natsemi.c | 1295 u16 bmcr; in switch_port_internal() local 1312 bmcr = readw(ioaddr+BasicControl+(MII_BMCR<<2)); in switch_port_internal() 1313 writel(bmcr | BMCR_RESET, ioaddr+BasicControl+(MII_BMCR<<2)); in switch_port_internal() 1317 bmcr = readw(ioaddr+BasicControl+(MII_BMCR<<2)); in switch_port_internal() 1318 if (!(bmcr & BMCR_RESET)) in switch_port_internal()
|