summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-07-11 13:14:37 +0300
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 07:30:27 -0700
commitb09b296dddde0998e2019d2f355212642056253f (patch)
treec30687736f491872acb3c7142839b52dd10eaa1f
parentc1c81401de30448baf35ec2f689ad21faffb0536 (diff)
downloadop-kernel-dev-b09b296dddde0998e2019d2f355212642056253f.zip
op-kernel-dev-b09b296dddde0998e2019d2f355212642056253f.tar.gz
iwlagn: add comment to warn about WoWLAN in resume / suspend flows
WoWLAN may need the NIC even after suspend. One should not do anything to the NIC in the bus level, since one cannot check whether WoWLAN is enabled or not. Same for resume. Add a simple comment to the code to warn about this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-pci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
index 0b815de..fb7e436 100644
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
@@ -508,6 +508,11 @@ static int iwl_pci_suspend(struct device *device)
struct pci_dev *pdev = to_pci_dev(device);
struct iwl_bus *bus = pci_get_drvdata(pdev);
+ /* Before you put code here, think about WoWLAN. You cannot check here
+ * whether WoWLAN is enabled or not, and your code will run even if
+ * WoWLAN is enabled - don't kill the NIC, someone may need it in Sx.
+ */
+
return iwl_suspend(bus->drv_data);
}
@@ -516,6 +521,11 @@ static int iwl_pci_resume(struct device *device)
struct pci_dev *pdev = to_pci_dev(device);
struct iwl_bus *bus = pci_get_drvdata(pdev);
+ /* Before you put code here, think about WoWLAN. You cannot check here
+ * whether WoWLAN is enabled or not, and your code will run even if
+ * WoWLAN is enabled - the NIC may be alive.
+ */
+
/*
* We disable the RETRY_TIMEOUT register (0x41) to keep
* PCI Tx retries from interfering with C3 CPU state.
OpenPOWER on IntegriCloud