linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI
@ 2016-11-24  0:24 Benjamin Herrenschmidt
  2016-11-29 16:58 ` Martin K. Petersen
  2016-11-30 21:28 ` Brian King
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2016-11-24  0:24 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, linuxppc dev list, Brian King

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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 drivers/scsi/ipr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 5324741..5dd3194 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI
  2016-11-24  0:24 [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI Benjamin Herrenschmidt
@ 2016-11-29 16:58 ` Martin K. Petersen
  2016-11-30 21:28 ` Brian King
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-11-29 16:58 UTC (permalink / raw)
  To: Brian King
  Cc: Benjamin Herrenschmidt, linux-scsi, linux-kernel, linuxppc dev list

>>>>> "Benjamin" == Benjamin Herrenschmidt <benh@kernel.crashing.org> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI
  2016-11-24  0:24 [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI Benjamin Herrenschmidt
  2016-11-29 16:58 ` Martin K. Petersen
@ 2016-11-30 21:28 ` Brian King
  2016-12-01  0:58   ` Martin K. Petersen
  1 sibling, 1 reply; 4+ messages in thread
From: Brian King @ 2016-11-30 21:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linux-scsi; +Cc: linux-kernel, linuxppc dev list


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

8<
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 drivers/scsi/ipr.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN drivers/scsi/ipr.c~ipr_misx_fail_intx_clear_isr drivers/scsi/ipr.c
--- scsi/drivers/scsi/ipr.c~ipr_misx_fail_intx_clear_isr	2016-11-29 20:56:27.902534325 -0600
+++ scsi-bjking1/drivers/scsi/ipr.c	2016-11-29 20:56:50.645538533 -0600
@@ -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;
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI
  2016-11-30 21:28 ` Brian King
@ 2016-12-01  0:58   ` Martin K. Petersen
  0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-12-01  0:58 UTC (permalink / raw)
  To: Brian King
  Cc: Benjamin Herrenschmidt, linux-scsi, linux-kernel, linuxppc dev list

>>>>> "Brian" == Brian King <brking@linux.vnet.ibm.com> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-01  0:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-24  0:24 [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI Benjamin Herrenschmidt
2016-11-29 16:58 ` Martin K. Petersen
2016-11-30 21:28 ` Brian King
2016-12-01  0:58   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).