Commit 64895145 authored by Malli Chilakala's avatar Malli Chilakala Committed by Jeff Garzik

[PATCH] e100: fixed e100 MDI/MDI-X issues

Added patch from Eran Mann to fix following e100 MDI/MDI-X issues
 * MDI/MDI-X autodetection should never be enabled for 82551ER/QM chips
 * enabling this feature based on eeprom settings
Signed-off-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: default avatarGanesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: default avatarJohn Ronciak <john.ronciak@intel.com>
parent 9758d0f0
...@@ -1093,11 +1093,16 @@ static int e100_phy_init(struct nic *nic) ...@@ -1093,11 +1093,16 @@ 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))) {
(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) /* enable/disable MDI/MDI-X auto-switching.
/* enable/disable MDI/MDI-X auto-switching */ MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) ||
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH); (nic->mac == mac_82551_10) || (nic->mii.force_media) ||
!(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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment