nxt5656 / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
b312fc
From b151f44de5717ff9be9695f744c9bd0060b3fcb4 Mon Sep 17 00:00:00 2001
b312fc
From: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
b312fc
Date: Tue, 10 Jan 2017 18:20:51 -0500
b312fc
Subject: [PATCH 09/11] scsi: megaraid_sas: ldio_outstanding variable is not
b312fc
 decremented in completion path
b312fc
b312fc
ldio outstanding variable needs to be decremented in io completion path for
b312fc
iMR dual queue depth
b312fc
b312fc
Signed-off-by: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
b312fc
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
b312fc
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
b312fc
---
b312fc
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +++++--
b312fc
 1 file changed, 5 insertions(+), 2 deletions(-)
b312fc
b312fc
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
b312fc
index 5689a44..82dd2da 100644
b312fc
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
b312fc
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
b312fc
@@ -2580,7 +2580,6 @@ megasas_build_and_issue_cmd_fusion(struct megasas_instance *instance,
b312fc
 
b312fc
 	if (atomic_inc_return(&instance->fw_outstanding) >
b312fc
 			instance->host->can_queue) {
b312fc
-		dev_err(&instance->pdev->dev, "Throttle IOs beyond Controller queue depth\n");
b312fc
 		atomic_dec(&instance->fw_outstanding);
b312fc
 		return SCSI_MLQUEUE_HOST_BUSY;
b312fc
 	}
b312fc
@@ -2811,6 +2810,9 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
b312fc
 					extStatus, data_length, sense);
b312fc
 				scsi_io_req->RaidContext.raid_context.status = 0;
b312fc
 				scsi_io_req->RaidContext.raid_context.ex_status = 0;
b312fc
+				if (instance->ldio_threshold
b312fc
+					&& megasas_cmd_type(scmd_local) == READ_WRITE_LDIO)
b312fc
+					atomic_dec(&instance->ldio_outstanding);
b312fc
 				megasas_return_cmd_fusion(instance, cmd_fusion);
b312fc
 				scsi_dma_unmap(scmd_local);
b312fc
 				scmd_local->scsi_done(scmd_local);
b312fc
@@ -3955,7 +3957,8 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int reason)
b312fc
 				scmd_local->result =
b312fc
 					megasas_check_mpio_paths(instance,
b312fc
 							scmd_local);
b312fc
-				if (megasas_cmd_type(scmd_local) == READ_WRITE_LDIO)
b312fc
+				if (instance->ldio_threshold &&
b312fc
+					megasas_cmd_type(scmd_local) == READ_WRITE_LDIO)
b312fc
 					atomic_dec(&instance->ldio_outstanding);
b312fc
 				megasas_return_cmd_fusion(instance, cmd_fusion);
b312fc
 				scsi_dma_unmap(scmd_local);
b312fc
-- 
b312fc
1.8.3.1
b312fc