scsi_debug: Do not respond to certain commands with CHECK CONDITION when sense pending
PATCH v2 1/1 scsi_debug: Do not respond to certain commands with CHECK CONDITION when sense pending
From: "Ewan D. Milne" <[email protected]>
According to SPC, certain commands are not supposed to respond with a CHECK CONDITION due to a pending UNIT ATTENTION. This was causing failures when re-scanning a scsi_debug target. The commands in this category are INQUIRY and REPORT LUNS.
Signed-off-by Ewan D. Milne <[email protected]>
--- drivers/scsi/scsi_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_debug.c +2 -1
@@ -4060,7 +4060,8 @@ write: errsts = check_condition_result;break ; } -if (!errsts && devip->sense_pending) { +if (!errsts && devip->sense_pending && (*cmd !=INQUIRY ) && + (*cmd !=REPORT_LUNS )) { devip->sense_pending =0 ; errsts = check_condition_result; }
Signature · 1 line
1.7.11.7
Quoted 8 lines · Ewan D. Milne
From: "Ewan D. Milne" <[email protected]>
According to SPC, certain commands are not supposed to respond with a CHECK CONDITION due to a pending UNIT ATTENTION. This was causing failures when re-scanning a
scsi_debugtarget. The commands in this category are INQUIRY and REPORT LUNS.Signed-off-by Ewan D. Milne <[email protected]>
Acked-by Douglas Gilbert <[email protected]>