Skip to contentSkip to conversation

scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI

PATCH Applied Benjamin Herrenschmidt 3 participants 4 messages Nov 24, 2016 – Dec 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI

LSIs must be ack'ed with an MMIO otherwise they remain asserted forever. This is controlled by the "clear_isr" flag.

While we set that flag properly when deciding initially whether to use LSIs or MSIs, we fail to set it if we first chose MSIs, the test fails, then fallback to LSIs.

---
 drivers/scsi/ipr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ipr.c +1 -0
index 5324741..5dd3194 100644
@@ -10213,6 +10213,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
 			}
 
 			ioa_cfg->intr_flag = IPR_USE_LSI;
+			ioa_cfg->clear_isr = 1;
 			ioa_cfg->nvectors = 1;
 		}
 		else if (rc)
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Benjamin" == Benjamin Herrenschmidt <[email protected]> writes:

Benjamin> LSIs must be ack'ed with an MMIO otherwise they remain Benjamin> asserted forever. This is controlled by the "clear_isr" flag.

Benjamin> While we set that flag properly when deciding initially Benjamin> whether to use LSIs or MSIs, we fail to set it if we first Benjamin> chose MSIs, the test fails, then fallback to LSIs.

Brian: Please review!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Benjamin Herrenschmidt

Looks good. Thanks! Here is an updated version that should apply cleanly on top of scsi-next.

8<
From: Benjamin Herrenschmidt <[email protected]>

LSIs must be ack'ed with an MMIO otherwise they remain asserted forever. This is controlled by the "clear_isr" flag.

While we set that flag properly when deciding initially whether to use LSIs or MSIs, we fail to set it if we first chose MSIs, the test fails, then fallback to LSIs.

---

 drivers/scsi/ipr.c |    1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_misx_fail_intx_clear_isr +1 -0
diff -puN drivers/scsi/ipr.c~ipr_misx_fail_intx_clear_isr drivers/scsi/ipr.c
@@ -10157,6 +10157,7 @@ static int ipr_probe_ioa(struct pci_dev
 			pci_free_irq_vectors(pdev);
 
 			ioa_cfg->nvectors = 1;
+			ioa_cfg->clear_isr = 1;
 			break;
 		default:
 			goto out_msi_disable;

_

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Brian" == Brian King <[email protected]> writes:

Brian> Looks good. Thanks! Here is an updated version that should apply Brian> cleanly on top of scsi-next.

Applied to 4.10/scsi-queue. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering