scsi: scsi_debug: Fix request sense
authorDouglas Gilbert <dgilbert@interlog.com>
Thu, 23 Jul 2020 19:48:19 +0000 (15:48 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 29 Jul 2020 04:00:01 +0000 (00:00 -0400)
commit84905d34f14987687ab1be64f15b453d11a41e55
tree13cc4fc052baf3d1435ad6dc88e792b04f770a2b
parent02e3e588f0e1176e89c46b7aa27aebb947ec4ccd
scsi: scsi_debug: Fix request sense

The SCSI REQUEST SENSE command emulation was found to be broken.  It is a
quite complex command so try and make it do a subset of what it should
do. Remove the attempt to mimic SCSI-1 REQUEST SENSE (i.e. return the sense
data for the previous failed command). Add some reporting of "pollable"
sense data [see spc6r02: 5.12.2]. Keep the IEC mode page MRIE=6 TEST=1
predictive failure reporting.

Link: https://lore.kernel.org/r/20200723194819.545573-1-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c