lkml.org 
[lkml]   [2005]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.11.6-bk2] e100: Use EEPROM config for Auto MDI/MDI-X
Current e100.c doesn't follow the EEPROM configuration regarding Auto 
MDI/MDI-X switching, instead it is enabled unconditionally for the
relevant chips.
This is especially bad since according to Intel's errata this feature is
no-longer supported.

Signed-off-by: Eran Mann <emann@mrv.com>
--- linux-2.6.11.6-bk2/drivers/net/e100.c 2005-03-29 19:57:10.000000000 +0200
+++ linux-2.6.11.6-bk2-patched/drivers/net/e100.c 2005-03-29 19:28:52.000000000 +0200
@@ -1072,13 +1072,17 @@
mdio_write(netdev, nic->mii.phy_id, MII_NSC_CONG, cong);
}

- 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);
-
+ if(((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
+ (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) &
+ 0x8000)))) {
+ /* Enable/Disable Auto MDI/MDI-X Switching */
+ if ((nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled) &&
+ !nic->mii.force_media)
+ mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
+ NCONFIG_AUTO_SWITCH);
+ else
+ mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0);
+ }
return 0;
}

@@ -2245,11 +2249,11 @@
goto err_out_iounmap;
}

- e100_phy_init(nic);
-
if((err = e100_eeprom_load(nic)))
goto err_out_free;

+ e100_phy_init(nic);
+
memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
if(!is_valid_ether_addr(netdev->dev_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC address from "
\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.062 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site