diff options
| -rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 0d5de2574dd1..373dcfec689c 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
| 49 | #include <linux/cache.h> | 49 | #include <linux/cache.h> |
| 50 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
| 51 | #include <linux/pci-aspm.h> | ||
| 51 | #include <linux/ethtool.h> | 52 | #include <linux/ethtool.h> |
| 52 | #include <linux/uaccess.h> | 53 | #include <linux/uaccess.h> |
| 53 | #include <linux/slab.h> | 54 | #include <linux/slab.h> |
| @@ -476,6 +477,26 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
| 476 | int ret; | 477 | int ret; |
| 477 | u8 csz; | 478 | u8 csz; |
| 478 | 479 | ||
| 480 | /* | ||
| 481 | * L0s needs to be disabled on all ath5k cards. | ||
| 482 | * | ||
| 483 | * For distributions shipping with CONFIG_PCIEASPM (this will be enabled | ||
| 484 | * by default in the future in 2.6.36) this will also mean both L1 and | ||
| 485 | * L0s will be disabled when a pre 1.1 PCIe device is detected. We do | ||
| 486 | * know L1 works correctly even for all ath5k pre 1.1 PCIe devices | ||
| 487 | * though but cannot currently undue the effect of a blacklist, for | ||
| 488 | * details you can read pcie_aspm_sanity_check() and see how it adjusts | ||
| 489 | * the device link capability. | ||
| 490 | * | ||
| 491 | * It may be possible in the future to implement some PCI API to allow | ||
| 492 | * drivers to override blacklists for pre 1.1 PCIe but for now it is | ||
| 493 | * best to accept that both L0s and L1 will be disabled completely for | ||
| 494 | * distributions shipping with CONFIG_PCIEASPM rather than having this | ||
| 495 | * issue present. Motivation for adding this new API will be to help | ||
| 496 | * with power consumption for some of these devices. | ||
| 497 | */ | ||
| 498 | pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S); | ||
| 499 | |||
| 479 | ret = pci_enable_device(pdev); | 500 | ret = pci_enable_device(pdev); |
| 480 | if (ret) { | 501 | if (ret) { |
| 481 | dev_err(&pdev->dev, "can't enable device\n"); | 502 | dev_err(&pdev->dev, "can't enable device\n"); |
