e1000 driver update
Signed-off-by: Jeff Kirsher <[EMAIL PROTECTED]>
Signed-off-by: John Ronciak <[EMAIL PROTECTED]>
Signed-off-by: Jesse Brandeburg <[EMAIL PROTECTED]>
3. New features and devices
- Print bus speed, width, and MAC when loading
- Added device support for fiber adapter
diff -up linux-2.6/drivers/net/e1000/e1000_ethtool.c
linux-2.6.new/drivers/net/e1000/e1000_ethtool.c
--- linux-2.6/drivers/net/e1000/e1000_ethtool.c 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_ethtool.c 2005-11-04
01:23:40.000000000 -0800
@@ -1607,6 +1607,7 @@ e1000_get_wol(struct net_device *netdev,
case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
+ case E1000_DEV_ID_82571EB_FIBER:
/* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) {
wol->supported = 0;
@@ -1650,6 +1651,7 @@ e1000_set_wol(struct net_device *netdev,
case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
+ case E1000_DEV_ID_82571EB_FIBER:
/* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
return wol->wolopts ? -EOPNOTSUPP : 0;
diff -up linux-2.6/drivers/net/e1000/e1000_hw.h
linux-2.6.new/drivers/net/e1000/e1000_hw.h
--- linux-2.6/drivers/net/e1000/e1000_hw.h 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_hw.h 2005-11-04 01:23:40.000000000
-0800
@@ -450,6 +450,7 @@ int32_t e1000_check_phy_reset_block(stru
#define E1000_DEV_ID_82573E_IAMT 0x108C
#define E1000_DEV_ID_82573L 0x109A
+#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
#define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
diff -up linux-2.6/drivers/net/e1000/e1000_main.c
linux-2.6.new/drivers/net/e1000/e1000_main.c
--- linux-2.6/drivers/net/e1000/e1000_main.c 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_main.c 2005-11-04
01:23:40.000000000 -0800
@@ -97,6 +97,7 @@ static struct pci_device_id e1000_pci_tb
INTEL_E1000_ETHERNET_DEVICE(0x108A),
INTEL_E1000_ETHERNET_DEVICE(0x108B),
INTEL_E1000_ETHERNET_DEVICE(0x108C),
+ INTEL_E1000_ETHERNET_DEVICE(0x1099),
INTEL_E1000_ETHERNET_DEVICE(0x109A),
/* required last entry */
{0,}
@@ -730,6 +731,28 @@ e1000_probe(struct pci_dev *pdev,
if(eeprom_data & eeprom_apme_mask)
adapter->wol |= E1000_WUFC_MAG;
+ /* print bus type/speed/width info */
+ {
+ struct e1000_hw *hw = &adapter->hw;
+ DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
+ ((hw->bus_type == e1000_bus_type_pcix) ? "-X" :
+ (hw->bus_type == e1000_bus_type_pci_express ? " Express":"")),
+ ((hw->bus_speed == e1000_bus_speed_2500) ? "2.5Gb/s" :
+ (hw->bus_speed == e1000_bus_speed_133) ? "133MHz" :
+ (hw->bus_speed == e1000_bus_speed_120) ? "120MHz" :
+ (hw->bus_speed == e1000_bus_speed_100) ? "100MHz" :
+ (hw->bus_speed == e1000_bus_speed_66) ? "66MHz" :
+ "33MHz"),
+ ((hw->bus_width == e1000_bus_width_64) ? "64-bit" :
+ (hw->bus_width == e1000_bus_width_pciex_4) ? "Width x4" :
+ (hw->bus_width == e1000_bus_width_pciex_1) ? "Width x1" :
+ "32-bit"));
+ }
+
+ for (i = 0; i < 6; i++)
+ printk("%2.2x%c", netdev->dev_addr[i],
+ i == 5 ? '\n' : ':');
+
/* reset the hardware with the new settings */
e1000_reset(adapter);
Cheers,
Jeff
diff -up linux-2.6/drivers/net/e1000/e1000_ethtool.c
linux-2.6.new/drivers/net/e1000/e1000_ethtool.c
--- linux-2.6/drivers/net/e1000/e1000_ethtool.c 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_ethtool.c 2005-11-04
01:23:40.000000000 -0800
@@ -1607,6 +1607,7 @@ e1000_get_wol(struct net_device *netdev,
case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
+ case E1000_DEV_ID_82571EB_FIBER:
/* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) {
wol->supported = 0;
@@ -1650,6 +1651,7 @@ e1000_set_wol(struct net_device *netdev,
case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
+ case E1000_DEV_ID_82571EB_FIBER:
/* Wake events only supported on port A for dual fiber */
if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
return wol->wolopts ? -EOPNOTSUPP : 0;
diff -up linux-2.6/drivers/net/e1000/e1000_hw.h
linux-2.6.new/drivers/net/e1000/e1000_hw.h
--- linux-2.6/drivers/net/e1000/e1000_hw.h 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_hw.h 2005-11-04 01:23:40.000000000
-0800
@@ -450,6 +450,7 @@ int32_t e1000_check_phy_reset_block(stru
#define E1000_DEV_ID_82573E_IAMT 0x108C
#define E1000_DEV_ID_82573L 0x109A
+#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
#define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
diff -up linux-2.6/drivers/net/e1000/e1000_main.c
linux-2.6.new/drivers/net/e1000/e1000_main.c
--- linux-2.6/drivers/net/e1000/e1000_main.c 2005-11-14 16:20:34.000000000
-0800
+++ linux-2.6.new/drivers/net/e1000/e1000_main.c 2005-11-04
01:23:40.000000000 -0800
@@ -97,6 +97,7 @@ static struct pci_device_id e1000_pci_tb
INTEL_E1000_ETHERNET_DEVICE(0x108A),
INTEL_E1000_ETHERNET_DEVICE(0x108B),
INTEL_E1000_ETHERNET_DEVICE(0x108C),
+ INTEL_E1000_ETHERNET_DEVICE(0x1099),
INTEL_E1000_ETHERNET_DEVICE(0x109A),
/* required last entry */
{0,}
@@ -730,6 +731,28 @@ e1000_probe(struct pci_dev *pdev,
if(eeprom_data & eeprom_apme_mask)
adapter->wol |= E1000_WUFC_MAG;
+ /* print bus type/speed/width info */
+ {
+ struct e1000_hw *hw = &adapter->hw;
+ DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
+ ((hw->bus_type == e1000_bus_type_pcix) ? "-X" :
+ (hw->bus_type == e1000_bus_type_pci_express ? " Express":"")),
+ ((hw->bus_speed == e1000_bus_speed_2500) ? "2.5Gb/s" :
+ (hw->bus_speed == e1000_bus_speed_133) ? "133MHz" :
+ (hw->bus_speed == e1000_bus_speed_120) ? "120MHz" :
+ (hw->bus_speed == e1000_bus_speed_100) ? "100MHz" :
+ (hw->bus_speed == e1000_bus_speed_66) ? "66MHz" :
+ "33MHz"),
+ ((hw->bus_width == e1000_bus_width_64) ? "64-bit" :
+ (hw->bus_width == e1000_bus_width_pciex_4) ? "Width x4" :
+ (hw->bus_width == e1000_bus_width_pciex_1) ? "Width x1" :
+ "32-bit"));
+ }
+
+ for (i = 0; i < 6; i++)
+ printk("%2.2x%c", netdev->dev_addr[i],
+ i == 5 ? '\n' : ':');
+
/* reset the hardware with the new settings */
e1000_reset(adapter);