mirror of https://gitee.com/openkylin/linux.git
e100: Fix MDIO/MDIO-X
MDIO/MDIO-X was broken due to a wrong errata. Removing the workaround code fixes for affected NICs. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
parent
09e590e5d5
commit
60ffa47875
|
@ -1391,15 +1391,11 @@ static int e100_phy_init(struct nic *nic)
|
||||||
}
|
}
|
||||||
|
|
||||||
if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
|
if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
|
||||||
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000))) {
|
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
|
||||||
/* enable/disable MDI/MDI-X auto-switching.
|
!(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) {
|
||||||
MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */
|
/* enable/disable MDI/MDI-X auto-switching. */
|
||||||
if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) ||
|
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
|
||||||
(nic->mac == mac_82551_10) || (nic->mii.force_media) ||
|
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
|
||||||
!(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))
|
|
||||||
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0);
|
|
||||||
else
|
|
||||||
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, NCONFIG_AUTO_SWITCH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue