提交 b09b296d 编写于 作者: E Emmanuel Grumbach 提交者: Wey-Yi Guy

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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
上级 c1c81401
...@@ -508,6 +508,11 @@ static int iwl_pci_suspend(struct device *device) ...@@ -508,6 +508,11 @@ static int iwl_pci_suspend(struct device *device)
struct pci_dev *pdev = to_pci_dev(device); struct pci_dev *pdev = to_pci_dev(device);
struct iwl_bus *bus = pci_get_drvdata(pdev); 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); return iwl_suspend(bus->drv_data);
} }
...@@ -516,6 +521,11 @@ static int iwl_pci_resume(struct device *device) ...@@ -516,6 +521,11 @@ static int iwl_pci_resume(struct device *device)
struct pci_dev *pdev = to_pci_dev(device); struct pci_dev *pdev = to_pci_dev(device);
struct iwl_bus *bus = pci_get_drvdata(pdev); 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 * We disable the RETRY_TIMEOUT register (0x41) to keep
* PCI Tx retries from interfering with C3 CPU state. * PCI Tx retries from interfering with C3 CPU state.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册