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: Ajish Koshy <ajish.koshy@microsemi.com> Reviewed-by: Murthy Bhat <murthy.bhat@microsemi.com> Reviewed-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> Reviewed-by: Justin Lindley <justin.lindley@microsemi.com> Reviewed-by: Scott Benesh <scott.benesh@microsemi.com> Reviewed-by: Scott Teel <scott.teel@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
3406384b76
commit
b6e2ef67ed
|
@ -176,6 +176,11 @@ static inline void pqi_scsi_done(struct scsi_cmnd *scmd)
|
||||||
scmd->scsi_done(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)
|
static inline bool pqi_scsi3addr_equal(u8 *scsi3addr1, u8 *scsi3addr2)
|
||||||
{
|
{
|
||||||
return memcmp(scsi3addr1, scsi3addr2, 8) == 0;
|
return memcmp(scsi3addr1, scsi3addr2, 8) == 0;
|
||||||
|
@ -5326,6 +5331,8 @@ 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))
|
||||||
|
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);
|
||||||
|
|
Loading…
Reference in New Issue