* [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set
@ 2013-04-22 9:31 Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 1/2] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bartosz Markowski @ 2013-04-22 9:31 UTC (permalink / raw)
To: ath9k-devel
* [PATCH v2 6/7] ath10k: reindent ath10k_pci_suspend
* [PATCH v2 7/7] ath10k: return error if suspend command fails
Markowski Bartosz (2):
ath10k: reindent ath10k_pci_suspend
ath10k: return error if suspend command fails
drivers/net/wireless/ath/ath10k/pci.c | 50 +++++++++++++++++----------------
1 file changed, 26 insertions(+), 24 deletions(-)
--
1.7.10
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 1/2] ath10k: reindent ath10k_pci_suspend
2013-04-22 9:31 [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Bartosz Markowski
@ 2013-04-22 9:31 ` Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 2/2] ath10k: return error if suspend command fails Bartosz Markowski
2013-04-22 10:04 ` [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Markowski @ 2013-04-22 9:31 UTC (permalink / raw)
To: ath9k-devel
From: Markowski Bartosz <Bartosz.Markowski@tieto.com>
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 50 +++++++++++++++++----------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 4bba532..362d4c7 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2430,33 +2430,35 @@ static int ath10k_pci_suspend(struct device *device)
if (!ar_pci)
return -ENODEV;
- if (!ath10k_core_target_suspend(ar)) {
- left = wait_event_interruptible_timeout(ar->event_queue,
- ar->is_target_paused == true,
- 1 * HZ);
-
- if (!left) {
- ath10k_warn("failed to receive target pasused"
- " event [left=%d]\n", left);
- return -EIO;
- }
- /*
- * reset is_target_paused and host can check that in next time,
- * or it will always be TRUE and host just skip the waiting
- * condition, it causes target assert due to host already
- * suspend
- */
- ar->is_target_paused = false;
+ if (ath10k_core_target_suspend(ar))
+ return 0;
- pci_read_config_dword(pdev, ATH10K_PCI_PM_CONTROL, &val);
+ left = wait_event_interruptible_timeout(ar->event_queue,
+ ar->is_target_paused == true,
+ 1 * HZ);
- if ((val & 0x000000ff) != 0x3) {
- pci_save_state(pdev);
- pci_disable_device(pdev);
- pci_write_config_dword(pdev, ATH10K_PCI_PM_CONTROL,
- (val & 0xffffff00) | 0x03);
- }
+ if (!left) {
+ ath10k_warn("failed to receive target pasused event [left=%d]\n", left);
+ return -EIO;
+ }
+
+ /*
+ * reset is_target_paused and host can check that in next time,
+ * or it will always be TRUE and host just skip the waiting
+ * condition, it causes target assert due to host already
+ * suspend
+ */
+ ar->is_target_paused = false;
+
+ pci_read_config_dword(pdev, ATH10K_PCI_PM_CONTROL, &val);
+
+ if ((val & 0x000000ff) != 0x3) {
+ pci_save_state(pdev);
+ pci_disable_device(pdev);
+ pci_write_config_dword(pdev, ATH10K_PCI_PM_CONTROL,
+ (val & 0xffffff00) | 0x03);
}
+
return 0;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 2/2] ath10k: return error if suspend command fails
2013-04-22 9:31 [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 1/2] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
@ 2013-04-22 9:31 ` Bartosz Markowski
2013-04-22 10:04 ` [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Markowski @ 2013-04-22 9:31 UTC (permalink / raw)
To: ath9k-devel
From: Markowski Bartosz <Bartosz.Markowski@tieto.com>
In case the WMI suspend commands fails, return -EBUSY up.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 362d4c7..bdaec0e 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2431,7 +2431,7 @@ static int ath10k_pci_suspend(struct device *device)
return -ENODEV;
if (ath10k_core_target_suspend(ar))
- return 0;
+ return -EBUSY;
left = wait_event_interruptible_timeout(ar->event_queue,
ar->is_target_paused == true,
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set
2013-04-22 9:31 [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 1/2] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 2/2] ath10k: return error if suspend command fails Bartosz Markowski
@ 2013-04-22 10:04 ` Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2013-04-22 10:04 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> * [PATCH v2 6/7] ath10k: reindent ath10k_pci_suspend
> * [PATCH v2 7/7] ath10k: return error if suspend command fails
>
> Markowski Bartosz (2):
> ath10k: reindent ath10k_pci_suspend
> ath10k: return error if suspend command fails
Thanks, applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-22 10:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 9:31 [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 1/2] ath10k: reindent ath10k_pci_suspend Bartosz Markowski
2013-04-22 9:31 ` [ath9k-devel] [PATCH 2/2] ath10k: return error if suspend command fails Bartosz Markowski
2013-04-22 10:04 ` [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox