提交 670d8be2 编写于 作者: D Damien Le Moal 提交者: Martin K. Petersen

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.comSigned-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 3ec24fb4
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册