public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN
@ 2017-02-13  5:11 Damien Le Moal
  2017-02-13 18:57 ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: Damien Le Moal @ 2017-02-13  5:11 UTC (permalink / raw)
  To: linux-scsi, Martin K . Petersen, James E . J . Bottomley,
	Sathya Prakash, Chaitra P B, Suganath Prabu Subramani
  Cc: MPT-FusionLinux.pdl, Hannes Reinecke, Christoph Hellwig,
	Damien Le Moal

The ZBC_IN command (REPORT ZONES) reply length is always a multiple of
64B and thus may not be aligned on the device LBA size.
For this command, retry due to the unaligned completion length is
incorrect so do not check alignment of the reply length.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 0b5b423..f04b872 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -4723,8 +4723,9 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
 	 * then scsi-ml does not need to handle this misbehavior.
 	 */
 	sector_sz = scmd->device->sector_size;
-	if (unlikely(scmd->request->cmd_type == REQ_TYPE_FS && sector_sz &&
-		     xfer_cnt % sector_sz)) {
+	if (scmd->request->cmd_type == REQ_TYPE_FS &&
+	    scmd->cmnd[0] != ZBC_IN &&
+	    sector_sz && xfer_cnt % sector_sz) {
 		sdev_printk(KERN_INFO, scmd->device,
 		    "unaligned partial completion avoided (xfer_cnt=%u, sector_sz=%u)\n",
 			    xfer_cnt, sector_sz);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-02-14  6:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13  5:11 [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN Damien Le Moal
2017-02-13 18:57 ` Bart Van Assche
2017-02-14  3:45   ` Damien Le Moal
2017-02-14  3:59     ` Bart Van Assche
2017-02-14  4:42       ` Damien Le Moal
2017-02-14  5:11         ` Bart Van Assche
2017-02-14  5:21           ` Damien Le Moal
2017-02-14  6:18             ` hch
2017-02-14  6:34               ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox