From 59db5a931bbe73f4d03dadb7365d0da2d425e769 Mon Sep 17 00:00:00 2001 From: Chandrakanth Patil Date: Tue, 25 Jun 2019 16:34:26 +0530 Subject: scsi: megaraid_sas: Handle sequence JBOD map failure at driver level Issue: This issue is applicable to scenario when JBOD sequence map is unavailable (memory allocation for JBOD sequence map failed) to driver but feature is supported by firmware. If the driver sends a JBOD IO by not adding 255 (MAX_PHYSICAL_DEVICES - 1) to device ID when underlying firmware supports JBOD sequence map, it will lead to the IO failure. Fix: For JBOD IOs, driver will not use the RAID map to fetch the devhandle if JBOD sequence map is unavailable. Driver will set Devhandle to 0xffff and Target ID to 'device ID + 255 (MAX_PHYSICAL_DEVICES - 1)'. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen --- drivers/scsi/megaraid/megaraid_sas.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/scsi/megaraid/megaraid_sas.h') diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index d333b8e302f9..cd632814e47a 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -2398,7 +2398,9 @@ struct megasas_instance { #endif u8 enable_fw_dev_list; bool atomic_desc_support; + bool support_seqnum_jbod_fp; }; + struct MR_LD_VF_MAP { u32 size; union MR_LD_REF ref; -- cgit v1.2.3-59-g8ed1b