diff options
author | Dave Carroll <david.carroll@microsemi.com> | 2018-12-07 23:28:23 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-12-20 04:23:34 +0100 |
commit | b6e2ef67ed8365d60a0cebc1313b57df8b9e909e (patch) | |
tree | 3129bf57323a2173a345c60e7fbf44382d1d6349 /drivers/scsi/smartpqi/smartpqi_init.c | |
parent | scsi: smartpqi: Add retries for device reset (diff) | |
download | linux-b6e2ef67ed8365d60a0cebc1313b57df8b9e909e.tar.xz linux-b6e2ef67ed8365d60a0cebc1313b57df8b9e909e.zip |
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>
Diffstat (limited to 'drivers/scsi/smartpqi/smartpqi_init.c')
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 0f28ce5ff32b..591787b46333 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -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); |