From 9c5ebd09e5092fdeffd079efd2b40afaa69dafb7 Mon Sep 17 00:00:00 2001 From: adam radford Date: Sat, 9 Feb 2013 15:29:20 -0800 Subject: [PATCH] [SCSI] megaraid_sas: Dont load DevHandle unless FastPath enabled The following patch for megaraid_sas will fix an issue where the driver should not be loading the DevHandle unless FastPath is enabled. If FastPath was not enabled, this means the hardware raid map validation failed for some reason, or the map was corrupted, which could mean the DevHandle could be invalid. Signed-off-by: Adam Radford Signed-off-by: James Bottomley --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index a6bccf0..a7d5668 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -1511,7 +1511,8 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance, if (scmd->device->channel < MEGASAS_MAX_PD_CHANNELS && instance->pd_list[pd_index].driveState == MR_PD_STATE_SYSTEM) { io_request->Function = 0; - io_request->DevHandle = + if (fusion->fast_path_io) + io_request->DevHandle = local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl; io_request->RaidContext.timeoutValue = local_map_ptr->raidMap.fpPdIoTimeoutSec; -- 2.7.4