summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/smartpqi
diff options
context:
space:
mode:
authorKevin Barnett <kevin.barnett@microchip.com>2021-03-11 21:16:08 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-04-06 05:02:30 +0200
commit99a12b487f19618f7a857281a7a80930f7c503e3 (patch)
treef09092967351871521ce7e25148ae583688c84b7 /drivers/scsi/smartpqi
parentscsi: smartpqi: Add host level stream detection enable (diff)
downloadlinux-99a12b487f19618f7a857281a7a80930f7c503e3.tar.xz
linux-99a12b487f19618f7a857281a7a80930f7c503e3.zip
scsi: smartpqi: Disable WRITE SAME for HBA NVMe disks
Controller does not support SCSI WRITE SAME for NVMe drives in HBA mode Link: https://lore.kernel.org/r/161549376866.25025.5961694654342018260.stgit@brunhilda Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi')
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index dce832f2614a..e8d27b133fc8 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6252,10 +6252,13 @@ static int pqi_slave_alloc(struct scsi_device *sdev)
scsi_change_queue_depth(sdev,
device->advertised_queue_depth);
}
- if (pqi_is_logical_device(device))
+ if (pqi_is_logical_device(device)) {
pqi_disable_write_same(sdev);
- else
+ } else {
sdev->allow_restart = 1;
+ if (device->device_type == SA_DEVICE_TYPE_NVME)
+ pqi_disable_write_same(sdev);
+ }
}
spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);