Patch "scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-megaraid_sas-handle-missing-interrupts-while-re.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c1baa6ea63ef088fbb51c74ee082a05f49d024ef
Author: Chandrakanth Patil <chandrakanth.patil@xxxxxxxxxxxx>
Date:   Fri May 28 18:43:06 2021 +0530

    scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs
    
    [ Upstream commit 9bedd36e9146b34dda4d6994e3aa1d72bc6442c1 ]
    
    While reenabling the IRQ after IRQ poll there may be a small window for the
    firmware to post the replies with interrupts raised. In that case the
    driver will not see the interrupts which leads to I/O timeout.
    
    This issue only happens when there are many I/O completions on a single
    reply queue. This forces the driver to switch between the interrupt and IRQ
    context.
    
    Make the driver process the reply queue one more time after enabling the
    IRQ.
    
    Link: https://lore.kernel.org/linux-scsi/20201102072746.27410-1-sreekanth.reddy@xxxxxxxxxxxx/
    Link: https://lore.kernel.org/r/20210528131307.25683-5-chandrakanth.patil@xxxxxxxxxxxx
    Cc: Tomas Henzl <thenzl@xxxxxxxxxx>
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Signed-off-by: Chandrakanth Patil <chandrakanth.patil@xxxxxxxxxxxx>
    Signed-off-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index f79c19010c92..142e60741094 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3745,6 +3745,7 @@ static void megasas_sync_irqs(unsigned long instance_addr)
 		if (irq_ctx->irq_poll_scheduled) {
 			irq_ctx->irq_poll_scheduled = false;
 			enable_irq(irq_ctx->os_irq);
+			complete_cmd_fusion(instance, irq_ctx->MSIxIndex, irq_ctx);
 		}
 	}
 }
@@ -3776,6 +3777,7 @@ int megasas_irqpoll(struct irq_poll *irqpoll, int budget)
 		irq_poll_complete(irqpoll);
 		irq_ctx->irq_poll_scheduled = false;
 		enable_irq(irq_ctx->os_irq);
+		complete_cmd_fusion(instance, irq_ctx->MSIxIndex, irq_ctx);
 	}
 
 	return num_entries;
@@ -3792,6 +3794,7 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr)
 {
 	struct megasas_instance *instance =
 		(struct megasas_instance *)instance_addr;
+	struct megasas_irq_context *irq_ctx = NULL;
 	u32 count, MSIxIndex;
 
 	count = instance->msix_vectors > 0 ? instance->msix_vectors : 1;
@@ -3800,8 +3803,10 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr)
 	if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR)
 		return;
 
-	for (MSIxIndex = 0 ; MSIxIndex < count; MSIxIndex++)
-		complete_cmd_fusion(instance, MSIxIndex, NULL);
+	for (MSIxIndex = 0 ; MSIxIndex < count; MSIxIndex++) {
+		irq_ctx = &instance->irq_context[MSIxIndex];
+		complete_cmd_fusion(instance, MSIxIndex, irq_ctx);
+	}
 }
 
 /**



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux