summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt3sas/mpt3sas_base.h
diff options
context:
space:
mode:
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>2019-08-03 09:59:51 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-07 22:46:19 -0400
commit3c090ce3f0fba1efb44eb9317ebf8e8150197a21 (patch)
tree2882923358c20c9534cff052298d63afb1196f1c /drivers/scsi/mpt3sas/mpt3sas_base.h
parent5bb309dbbbf2157786004201eb70dafd283b54b5 (diff)
downloadlinux-3c090ce3f0fba1efb44eb9317ebf8e8150197a21.tar.gz
linux-3c090ce3f0fba1efb44eb9317ebf8e8150197a21.tar.bz2
linux-3c090ce3f0fba1efb44eb9317ebf8e8150197a21.zip
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>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.h')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index f6a1ae1cf4c0..c13554e82f3d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -583,6 +583,7 @@ static inline void sas_device_put(struct _sas_device *s)
* @enclosure_level: The level of device's enclosure from the controller
* @connector_name: ASCII value of the Connector's name
* @serial_number: pointer of serial number string allocated runtime
+ * @access_status: Device's Access Status
* @refcount: reference count for deletion
*/
struct _pcie_device {
@@ -604,6 +605,7 @@ struct _pcie_device {
u8 connector_name[4];
u8 *serial_number;
u8 reset_timeout;
+ u8 access_status;
struct kref refcount;
};
/**