scsi: mpt3sas: Allow ioctls to blocked access status NVMe
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Sat, 3 Aug 2019 13:59:51 +0000 (09:59 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 8 Aug 2019 02:46:19 +0000 (22:46 -0400)
commit3c090ce3f0fba1efb44eb9317ebf8e8150197a21
tree2882923358c20c9534cff052298d63afb1196f1c
parent5bb309dbbbf2157786004201eb70dafd283b54b5
scsi: mpt3sas: Allow ioctls to blocked access status NVMe

If driver sees the NVMe drive with "DEVICE_BLOCKED" AccessStatus in its
PCIe Device Page0, then driver removes the drive from its internal list and
does not allow any IOCTL commands to be sent to the drive and will return
the IOCTLs with "-ENODEV" status.

The driver will now allow NVMe Encapsulated IOCTL issued to the NVMe device
with an access status of DEVICE_BLOCKED. This change allows the user to
flash new drive firmware online and revive the drive.

Add NVMe device only the driver's internal list even though the device is
in the blocked state so that the device will be visible to Apps. This way
Apps can send NVMe Encapsulated IOCTLs to this drive and bring the drive
online. This NVMe drive with DEVICE_BLOCKED access status won't added to
the SML, it will be added only in the driver's internal list.

[mkp: clarified desc]

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c