Commit 99a12b48 authored by Kevin Barnett's avatar Kevin Barnett Committed by Martin K. Petersen

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@brunhildaReviewed-by: default avatarScott Benesh <scott.benesh@microchip.com>
Reviewed-by: default avatarMike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: default avatarScott Teel <scott.teel@microchip.com>
Reviewed-by: default avatarMartin Wilck <mwilck@suse.com>
Signed-off-by: default avatarKevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: default avatarDon Brace <don.brace@microchip.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5be746d7
...@@ -6252,10 +6252,13 @@ static int pqi_slave_alloc(struct scsi_device *sdev) ...@@ -6252,10 +6252,13 @@ static int pqi_slave_alloc(struct scsi_device *sdev)
scsi_change_queue_depth(sdev, scsi_change_queue_depth(sdev,
device->advertised_queue_depth); device->advertised_queue_depth);
} }
if (pqi_is_logical_device(device)) if (pqi_is_logical_device(device)) {
pqi_disable_write_same(sdev); pqi_disable_write_same(sdev);
else } else {
sdev->allow_restart = 1; 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); spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment