]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: mpt3sas: Force request partial completion alignment
authorRam Pai <linuxram@us.ibm.com>
Thu, 26 Jan 2017 18:37:01 +0000 (16:37 -0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:24:15 +0000 (13:24 -0800)
commit28bfa5e2c468b6255bee0d8fff3a3a4e8bea2caa
tree0031f833f9182b0a046d4849e46120c251beacae
parent33d49306f783bd1116948e5f702857030b3f13e9
scsi: mpt3sas: Force request partial completion alignment

Orabug: 25639713

The firmware or device, possibly under a heavy I/O load, can return on a
partial unaligned boundary. Scsi-ml expects these requests to be
completed on an alignment boundary. Scsi-ml blindly requeues the I/O
without checking the alignment boundary of the I/O request for the
remaining bytes. This leads to errors, since devices cannot perform
non-aligned read/write operations.

This patch fixes the issue in the driver. It aligns unaligned
completions of FS requests, by truncating them to the nearest alignment
boundary.

[mkp: simplified if statement]

Reported-by: Mauricio Faria De Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f2e767bb5d6ee0d988cb7d4e54b0b21175802b6b)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c