]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: efct: Use IRQF_ONESHOT and default primary handler
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 23 Jan 2026 11:36:53 +0000 (12:36 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 Feb 2026 03:02:08 +0000 (22:02 -0500)
There is no added value in efct_intr_msix() compared to
irq_default_primary_handler().

Using a threaded interrupt without a dedicated primary handler mandates the
IRQF_ONESHOT flag to mask the interrupt source while the threaded handler
is active. Otherwise the interrupt can fire again before the threaded
handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set
IRQF_ONESHOT so the interrupt source is masked until the secondary handler
is done.

Cc: Ram Vegesna <ram.vegesna@broadcom.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: target-devel@vger.kernel.org
Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20260123113708.416727-8-bigeasy@linutronix.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/elx/efct/efct_driver.c

index 1bd42f7db1773dc4104ab3cfddc69bfca8e35cca..528399f725d4284746fe4a6d068742b24a283861 100644 (file)
@@ -415,12 +415,6 @@ efct_intr_thread(int irq, void *handle)
        return IRQ_HANDLED;
 }
 
-static irqreturn_t
-efct_intr_msix(int irq, void *handle)
-{
-       return IRQ_WAKE_THREAD;
-}
-
 static int
 efct_setup_msix(struct efct *efct, u32 num_intrs)
 {
@@ -450,7 +444,7 @@ efct_setup_msix(struct efct *efct, u32 num_intrs)
                intr_ctx->index = i;
 
                rc = request_threaded_irq(pci_irq_vector(efct->pci, i),
-                                         efct_intr_msix, efct_intr_thread, 0,
+                                         NULL, efct_intr_thread, IRQF_ONESHOT,
                                          EFCT_DRIVER_NAME, intr_ctx);
                if (rc) {
                        dev_err(&efct->pci->dev,