Skip to contentSkip to conversation

rebase patch 6 and 7 from 'various fixes' patch-set

PATCH New Bartosz Markowski 2 participants 4 messages Apr 22, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

cover rebase patch 6 and 7 from 'various fixes' patch-set

* [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(-)
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/2 ath10k: reindent ath10k_pci_suspend

From: Markowski Bartosz <[email protected]>

---
 drivers/net/wireless/ath/ath10k/pci.c |   50 +++++++++++++++++----------------
 1 file changed, 26 insertions(+), 24 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +26 -24
index 4bba532..362d4c7 100644
@@ -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;
 }
 
Signature · 1 line
1.7.10
#2 lore raw

PATCH 2/2 ath10k: return error if suspend command fails

In reply to Bartosz Markowski

From: Markowski Bartosz <[email protected]>

In case the WMI suspend commands fails, return -EBUSY up.

---
 drivers/net/wireless/ath/ath10k/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/pci.c +1 -1
index 362d4c7..bdaec0e 100644
@@ -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,
Signature · 1 line
1.7.10
Applied
#3 lore raw

cover rebase patch 6 and 7 from 'various fixes' patch-set

In reply to Bartosz Markowski
Quoted 6 lines · Bartosz Markowski

* [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.

Signature · 1 line
Kalle Valo