OSDN Git Service

scsi: megaraid_sas: Handle sequence JBOD map failure at driver level
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>
Tue, 25 Jun 2019 11:04:26 +0000 (16:34 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Jun 2019 04:07:35 +0000 (00:07 -0400)
commit59db5a931bbe73f4d03dadb7365d0da2d425e769
treea16253d329d8bac847c5d857f393d176a3300367
parent798d44b04f48237b3415c1066fd8f4d8b8fbb53b
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 <sumit.saxena@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c