Skip to contentSkip to conversation

ath10k: fix MSI-X setup failpath

PATCH Superseded Michal Kazior 2 participants 4 messages Jun 25, 2013 – Jul 5, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: fix MSI-X setup failpath

---
 drivers/net/wireless/ath/ath10k/pci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +3 -2
index 1a59638..63c58b5 100644
@@ -1882,9 +1882,10 @@ static int ath10k_pci_start_intr_msix(struct ath10k *ar, int num)
 			ath10k_warn("request_irq(%d) failed %d\n",
 				    ar_pci->pdev->irq + i, ret);
 
-			for (; i >= MSI_ASSIGN_CE_INITIAL; i--)
-				free_irq(ar_pci->pdev->irq, ar);
+			for (i--; i >= MSI_ASSIGN_CE_INITIAL; i--)
+				free_irq(ar_pci->pdev->irq + i, ar);
 
+			free_irq(ar_pci->pdev->irq + MSI_ASSIGN_FW, ar);
 			pci_disable_msi(ar_pci->pdev);
 			return ret;
 		}
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ath10k: fix MSI-X setup failpath

Quoted 1 line · Michal Kazior

Please write a commit log. No matter how trivial the patch is, it should have a commit log.

Signature · 1 line
Kalle Valo
#2 lore raw

PATCH v2 1/1 ath10k: fix MSI-X setup failpath

In reply to Michal Kazior

Irqs were not freed up correctly upon msi-x setup
failure.

---
 drivers/net/wireless/ath/ath10k/pci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +3 -2
index 1a59638..63c58b5 100644
@@ -1882,9 +1882,10 @@ static int ath10k_pci_start_intr_msix(struct ath10k *ar, int num)
 			ath10k_warn("request_irq(%d) failed %d\n",
 				    ar_pci->pdev->irq + i, ret);
 
-			for (; i >= MSI_ASSIGN_CE_INITIAL; i--)
-				free_irq(ar_pci->pdev->irq, ar);
+			for (i--; i >= MSI_ASSIGN_CE_INITIAL; i--)
+				free_irq(ar_pci->pdev->irq + i, ar);
 
+			free_irq(ar_pci->pdev->irq + MSI_ASSIGN_FW, ar);
 			pci_disable_msi(ar_pci->pdev);
 			return ret;
 		}
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 1/1 ath10k: fix MSI-X setup failpath

Quoted 4 lines · Michal Kazior

Irqs were not freed up correctly upon msi-x setup
failure.

John has already applied this.

Signature · 1 line
Kalle Valo