diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-09-27 15:53:42 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 15:53:42 -0400 |
commit | 5f01607a5b5c8781ed5d5deae213b4f01283dba2 (patch) | |
tree | d26fd1b1602f5aae7db1f9261be0b0176beea4e0 /drivers | |
parent | 2f2ca2638cbcf287b87a1e199f949a0c03bc0cf7 (diff) |
e1000: Fix MANC detection for PCIE adapters
Several manageability capability detection parts hinted towards
our code being incomplete for PCI-E. According to spec, we do not
want to poke any MANC bits at all.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 5296a82c22b8..e55fb9cc41c3 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -662,9 +662,7 @@ e1000_reset(struct e1000_adapter *adapter) | |||
662 | phy_data); | 662 | phy_data); |
663 | } | 663 | } |
664 | 664 | ||
665 | if (adapter->hw.mac_type < e1000_ich8lan) | 665 | if ((adapter->en_mng_pt) && (adapter->hw.mac_type < e1000_82571)) { |
666 | /* FIXME: this code is duplicate and wrong for PCI Express */ | ||
667 | if (adapter->en_mng_pt) { | ||
668 | manc = E1000_READ_REG(&adapter->hw, MANC); | 666 | manc = E1000_READ_REG(&adapter->hw, MANC); |
669 | manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); | 667 | manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); |
670 | E1000_WRITE_REG(&adapter->hw, MANC, manc); | 668 | E1000_WRITE_REG(&adapter->hw, MANC, manc); |
@@ -1042,8 +1040,7 @@ e1000_remove(struct pci_dev *pdev) | |||
1042 | 1040 | ||
1043 | flush_scheduled_work(); | 1041 | flush_scheduled_work(); |
1044 | 1042 | ||
1045 | if (adapter->hw.mac_type >= e1000_82540 && | 1043 | if (adapter->hw.mac_type < e1000_82571 && |
1046 | adapter->hw.mac_type != e1000_ich8lan && | ||
1047 | adapter->hw.media_type == e1000_media_type_copper) { | 1044 | adapter->hw.media_type == e1000_media_type_copper) { |
1048 | manc = E1000_READ_REG(&adapter->hw, MANC); | 1045 | manc = E1000_READ_REG(&adapter->hw, MANC); |
1049 | if (manc & E1000_MANC_SMBUS_EN) { | 1046 | if (manc & E1000_MANC_SMBUS_EN) { |
@@ -4694,9 +4691,7 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4694 | pci_enable_wake(pdev, PCI_D3cold, 0); | 4691 | pci_enable_wake(pdev, PCI_D3cold, 0); |
4695 | } | 4692 | } |
4696 | 4693 | ||
4697 | /* FIXME: this code is incorrect for PCI Express */ | 4694 | if (adapter->hw.mac_type < e1000_82571 && |
4698 | if (adapter->hw.mac_type >= e1000_82540 && | ||
4699 | adapter->hw.mac_type != e1000_ich8lan && | ||
4700 | adapter->hw.media_type == e1000_media_type_copper) { | 4695 | adapter->hw.media_type == e1000_media_type_copper) { |
4701 | manc = E1000_READ_REG(&adapter->hw, MANC); | 4696 | manc = E1000_READ_REG(&adapter->hw, MANC); |
4702 | if (manc & E1000_MANC_SMBUS_EN) { | 4697 | if (manc & E1000_MANC_SMBUS_EN) { |
@@ -4748,9 +4743,7 @@ e1000_resume(struct pci_dev *pdev) | |||
4748 | 4743 | ||
4749 | netif_device_attach(netdev); | 4744 | netif_device_attach(netdev); |
4750 | 4745 | ||
4751 | /* FIXME: this code is incorrect for PCI Express */ | 4746 | if (adapter->hw.mac_type < e1000_82571 && |
4752 | if (adapter->hw.mac_type >= e1000_82540 && | ||
4753 | adapter->hw.mac_type != e1000_ich8lan && | ||
4754 | adapter->hw.media_type == e1000_media_type_copper) { | 4747 | adapter->hw.media_type == e1000_media_type_copper) { |
4755 | manc = E1000_READ_REG(&adapter->hw, MANC); | 4748 | manc = E1000_READ_REG(&adapter->hw, MANC); |
4756 | manc &= ~(E1000_MANC_ARP_EN); | 4749 | manc &= ~(E1000_MANC_ARP_EN); |