megaraid_sas: Fix validHandles check in I/O path
authorsumit.saxena@avagotech.com <sumit.saxena@avagotech.com>
Mon, 31 Aug 2015 11:54:01 +0000 (17:24 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Oct 2015 04:33:54 +0000 (00:33 -0400)
Syncro firmware supports round robin I/O switching on dual path. Driver
uses validHandles to check for dual path. However, it is supposed to
check for values > 1 (not > 2).

Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c

index 8d0a88f092c2fe876d209b5bf69c3f19792fcb01..b1314964f1d0246bda1fe224fc1bbd685b501324 100644 (file)
@@ -1684,7 +1684,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
                        scp->SCp.Status &= ~MEGASAS_LOAD_BALANCE_FLAG;
 
                if ((raidLUN[0] == 1) &&
-                       (local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 2)) {
+                       (local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 1)) {
                        instance->dev_handle = !(instance->dev_handle);
                        io_info.devHandle =
                                local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].devHandle[instance->dev_handle];