summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2019-08-28 08:35:11 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-09-07 22:30:55 +0300
commit670d8be28e72f984a61ccad3e9e98247c0d31e1c (patch)
tree8a3f9bc0d93231b3e2956e95df42dea1b9ffbb8f /drivers/scsi
parent3ec24fb4c035e9cbb2f02a48640a09aa913442a2 (diff)
downloadlinux-670d8be28e72f984a61ccad3e9e98247c0d31e1c.tar.xz
scsi: sd: Improve unaligned completion resid message
For commands completing with a resid not aligned on the device logical sector size, also print the command CDB in addition to the current message to help debug hardware generating such incorrect command completion information. Link: https://lore.kernel.org/r/20190828053511.14818-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 149d406aacc9..91af598f2f53 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1978,6 +1978,7 @@ static int sd_done(struct scsi_cmnd *SCpnt)
sd_printk(KERN_INFO, sdkp,
"Unaligned partial completion (resid=%u, sector_sz=%u)\n",
resid, sector_size);
+ scsi_print_command(SCpnt);
resid = min(scsi_bufflen(SCpnt),
round_up(resid, sector_size));
scsi_set_resid(SCpnt, resid);