diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-03-23 23:09:03 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-04-13 22:19:22 -0400 |
commit | 78cd29d5a92ae5067377ad42089f2c8781312f4a (patch) | |
tree | fb9845f2fdb6c28890478c7fa8fbcfec79e4543d /drivers/net/e1000e/82571.c | |
parent | 2084b114e3fb0d84e5882f5ee6c7039be52da715 (diff) |
e1000e: If ASPM L0s needs to be disabled, do it prior to enabling device
Based on a patch from Naga Chumbalkar <nagananda.chumbalkar@hp.com>:
If ASPM L0s needs to be disabled due to HW errata, do it prior to
"enabling" the device. This way if the kernel ever defaults its
aspm_policy to POLICY_POWERSAVE, then the e1000e driver will get a
chance to disable ASPM on the misbehaving device *prior* to calling
pci_enable_device_mem(). This will be useful in situations
where the BIOS indicates ASPM support on the server by clearing the
ACPI FADT "ASPM Controls" bit.
Note:
The kernel (2.6.38) currently uses the BIOS "default" as its aspm_policy.
However, Linux distros can diverge from that and set the default to
"powersave".
v2: o cleanup namespace pollution of e1000e_disable_aspm(),
o fix type and initialization of the new aspm_disable_flag in a few
functions, and
o redefine FLAG2_DISABLE_ASPM_L0S to the first unused bit in
adapter->flags2.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/82571.c')
-rw-r--r-- | drivers/net/e1000e/82571.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 9fedbca66dfd..ae07d37903ba 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -431,9 +431,6 @@ static s32 e1000_get_variants_82571(struct e1000_adapter *adapter) | |||
431 | case e1000_82573: | 431 | case e1000_82573: |
432 | case e1000_82574: | 432 | case e1000_82574: |
433 | case e1000_82583: | 433 | case e1000_82583: |
434 | /* Disable ASPM L0s due to hardware errata */ | ||
435 | e1000e_disable_aspm(adapter->pdev, PCIE_LINK_STATE_L0S); | ||
436 | |||
437 | if (pdev->device == E1000_DEV_ID_82573L) { | 434 | if (pdev->device == E1000_DEV_ID_82573L) { |
438 | adapter->flags |= FLAG_HAS_JUMBO_FRAMES; | 435 | adapter->flags |= FLAG_HAS_JUMBO_FRAMES; |
439 | adapter->max_hw_frame_size = DEFAULT_JUMBO; | 436 | adapter->max_hw_frame_size = DEFAULT_JUMBO; |
@@ -2066,7 +2063,8 @@ struct e1000_info e1000_82573_info = { | |||
2066 | | FLAG_HAS_SMART_POWER_DOWN | 2063 | | FLAG_HAS_SMART_POWER_DOWN |
2067 | | FLAG_HAS_AMT | 2064 | | FLAG_HAS_AMT |
2068 | | FLAG_HAS_SWSM_ON_LOAD, | 2065 | | FLAG_HAS_SWSM_ON_LOAD, |
2069 | .flags2 = FLAG2_DISABLE_ASPM_L1, | 2066 | .flags2 = FLAG2_DISABLE_ASPM_L1 |
2067 | | FLAG2_DISABLE_ASPM_L0S, | ||
2070 | .pba = 20, | 2068 | .pba = 20, |
2071 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | 2069 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, |
2072 | .get_variants = e1000_get_variants_82571, | 2070 | .get_variants = e1000_get_variants_82571, |
@@ -2086,7 +2084,8 @@ struct e1000_info e1000_82574_info = { | |||
2086 | | FLAG_HAS_SMART_POWER_DOWN | 2084 | | FLAG_HAS_SMART_POWER_DOWN |
2087 | | FLAG_HAS_AMT | 2085 | | FLAG_HAS_AMT |
2088 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 2086 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
2089 | .flags2 = FLAG2_CHECK_PHY_HANG, | 2087 | .flags2 = FLAG2_CHECK_PHY_HANG |
2088 | | FLAG2_DISABLE_ASPM_L0S, | ||
2090 | .pba = 32, | 2089 | .pba = 32, |
2091 | .max_hw_frame_size = DEFAULT_JUMBO, | 2090 | .max_hw_frame_size = DEFAULT_JUMBO, |
2092 | .get_variants = e1000_get_variants_82571, | 2091 | .get_variants = e1000_get_variants_82571, |
@@ -2104,6 +2103,7 @@ struct e1000_info e1000_82583_info = { | |||
2104 | | FLAG_HAS_SMART_POWER_DOWN | 2103 | | FLAG_HAS_SMART_POWER_DOWN |
2105 | | FLAG_HAS_AMT | 2104 | | FLAG_HAS_AMT |
2106 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 2105 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
2106 | .flags2 = FLAG2_DISABLE_ASPM_L0S, | ||
2107 | .pba = 32, | 2107 | .pba = 32, |
2108 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | 2108 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, |
2109 | .get_variants = e1000_get_variants_82571, | 2109 | .get_variants = e1000_get_variants_82571, |