From: Malli Chilakala Date: Sat, 18 Jun 2005 00:27:41 +0000 (-0700) Subject: [PATCH] e100: fixed e100 MDI/MDI-X issues X-Git-Tag: v2.6.13-rc1~51^2~40^2~23 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=648951451e6d2d532d4ace2f8e9c5cdf1d563e83;p=linux-2.6-omap-h63xx.git [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: Mallikarjuna R Chilakala Signed-off-by: Ganesh Venkatesan Signed-off-by: John Ronciak --- diff --git a/drivers/net/e100.c b/drivers/net/e100.c index cfaa6b2bf34..7e46d038b9f 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -1093,11 +1093,16 @@ 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) && - (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); + (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); + } return 0; }