Commit b6e2ef67 authored by Dave Carroll's avatar Dave Carroll Committed by Martin K. Petersen

scsi: smartpqi: add no_write_same for logical volumes

During slave_alloc, for logical volumes include no_write_same into the
scsi_device structure. This will insure that WRITE_SAME will not be used
for LD's.
Reviewed-by: default avatarAjish Koshy <ajish.koshy@microsemi.com>
Reviewed-by: default avatarMurthy Bhat <murthy.bhat@microsemi.com>
Reviewed-by: default avatarMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: default avatarJustin Lindley <justin.lindley@microsemi.com>
Reviewed-by: default avatarScott Benesh <scott.benesh@microsemi.com>
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: default avatarDave Carroll <david.carroll@microsemi.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3406384b
......@@ -176,6 +176,11 @@ static inline void pqi_scsi_done(struct scsi_cmnd *scmd)
scmd->scsi_done(scmd);
}
static inline void pqi_disable_write_same(struct scsi_device *sdev)
{
sdev->no_write_same = 1;
}
static inline bool pqi_scsi3addr_equal(u8 *scsi3addr1, u8 *scsi3addr2)
{
return memcmp(scsi3addr1, scsi3addr2, 8) == 0;
......@@ -5326,6 +5331,8 @@ static int pqi_slave_alloc(struct scsi_device *sdev)
scsi_change_queue_depth(sdev,
device->advertised_queue_depth);
}
if (pqi_is_logical_device(device))
pqi_disable_write_same(sdev);
}
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