aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 31d397497c45..ad6e2ac196b0 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1508,7 +1508,8 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance,
1508 local_map_ptr = fusion->ld_map[(instance->map_id & 1)]; 1508 local_map_ptr = fusion->ld_map[(instance->map_id & 1)];
1509 1509
1510 /* Check if this is a system PD I/O */ 1510 /* Check if this is a system PD I/O */
1511 if (instance->pd_list[pd_index].driveState == MR_PD_STATE_SYSTEM) { 1511 if (scmd->device->channel < MEGASAS_MAX_PD_CHANNELS &&
1512 instance->pd_list[pd_index].driveState == MR_PD_STATE_SYSTEM) {
1512 io_request->Function = 0; 1513 io_request->Function = 0;
1513 io_request->DevHandle = 1514 io_request->DevHandle =
1514 local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl; 1515 local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl;