Subject: [PATCH 01/13] e100: Fix MDIO/MDIO-X

From: "Kok, Auke" <[email-masked]>
Date: Wed, 16 Aug 2006 14:56:17 -0700

MDIO/MDIO-X was broken due to a wrong errata. Removing the workaround
code fixes for affected NICs.

Signed-off-by: Jeff Kirsher <[email-masked]>
Signed-off-by: Auke Kok <[email-masked]>
---

 drivers/net/e100.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 91ef5f2..5de9843 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1391,15 +1391,11 @@ static int e100_phy_init(struct nic *nic
 	}
 
 	if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
-	   (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000))) {
-		/* enable/disable MDI/MDI-X auto-switching.
-		   MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */
-		if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) ||
-		   (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);
+	   (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. */
+		mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
+				nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
 	}
 
 	return 0;

--
Auke Kok <[email-masked]>