linux/drivers/scsi/mpt3sas
Damien Le Moal c46f09175d scsi: sd: Check for unaligned partial completion
Commit <f2e767bb5d6e> ("mpt3sas: Force request partial completion
alignment") was not considering the case of commands not operating on
logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned
partial replies). In this case, forcing alignment of resid to the device
logical block size can break the command result, e.g. in the case of
REQ_OP_ZONE_REPORT, the exact number of zone reported by the device.

Move the partial completion alignement check of mpt3sas to a generic
implementation in sd_done(). The check is added within the default
section of the initial req_op() switch case so that the report and reset
zone commands are ignored. In addition, as sd_done() is not called for
passthrough requests, resid corrections are not done as intended by the
initial mpt3sas patch.

Fixes: f2e767bb5d ("mpt3sas: Force request partial completion alignment")
Cc: <stable@vger.kernel.org> # v4.10
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-03-01 21:46:11 -05:00
..
mpi scsi: mpt3sas: Added print to notify cable running at a degraded speed. 2017-01-31 22:03:35 -05:00
Kconfig mpt3sas: fix Kconfig dependency problem for mpt2sas back compatibility 2015-12-03 09:31:23 -08:00
Makefile mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs 2015-11-11 19:50:11 -05:00
mpt3sas_base.c scsi: mpt3sas: switch to pci_alloc_irq_vectors 2017-02-23 17:01:05 -05:00
mpt3sas_base.h scsi: mpt3sas: switch to pci_alloc_irq_vectors 2017-02-23 17:01:05 -05:00
mpt3sas_config.c scsi: mpt3sas: Use the new MPI 2.6 32-bit Atomic Request Descriptors for SAS35 devices. 2016-11-08 17:29:59 -05:00
mpt3sas_ctl.c scsi: mpt3sas: Fix for Crusader to achieve product targets with SAS devices. 2017-01-31 22:03:35 -05:00
mpt3sas_ctl.h scsi: mpt3sas: Added Device ID's for SAS35 devices and updated MPI header. 2016-11-08 17:29:59 -05:00
mpt3sas_debug.h mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig 2015-11-11 18:31:14 -05:00
mpt3sas_scsih.c scsi: sd: Check for unaligned partial completion 2017-03-01 21:46:11 -05:00
mpt3sas_transport.c block: split scsi_request out of struct request 2017-01-27 15:08:35 -07:00
mpt3sas_trigger_diag.c mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_trigger_diag.h mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_warpdrive.c mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs 2015-11-11 19:50:11 -05:00