fix for scsi_unjam_host: Miscount of number of failed commands
PATCH 1/1 fix for scsi_unjam_host: Miscount of number of failed commands
This is a resend of http://marc.theaimsgroup.com/?l=linux-scsi&m=108438814301446&w=2
This patch fixes a panic "scsi_unjam_host: Miscount of number of failed commands". This panic happens only under very specific circumstances:
1) A command fails with check condition
2) The low-level driver doesn't auto-retrieve the sense data
3) The sense key is "not ready" and ASC/ASCQ indicate the unit is becoming ready
4) A retry of the command fails in the same way
Please apply.
drivers/scsi/scsi_error.c +3 -1
@@ -1366,6 +1366,7 @@for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {for (SCpnt = SDpnt->device_queue; SCpnt; SCpnt = SCpnt->next) { + recheck_sense_valid:if (SCpnt->state !=SCSI_STATE_FAILED ||scsi_sense_valid (SCpnt)) {continue ; }
@@ -1402,7 +1403,8 @@ SCpnt->state =NEEDS_RETRY ; rtn =scsi_eh_retry_command (SCpnt);if (rtn !=SUCCESS ) { -continue ; + SCpnt->state =SCSI_STATE_FAILED ; + goto recheck_sense_valid; }/* * We eventually hand this one back to the top level.
Anthony J. Battersby
Cybernetics
Quoted 10 lines · Tony Battersby
This is a resend of http://marc.theaimsgroup.com/?l=linux-scsi&m=108438814301446&w=2
This patch fixes a panic "
scsi_unjam_host: Miscount of number of failed commands". This panic happens only under very specific circumstances:1) A command fails with check condition
2) The low-level driver doesn't auto-retrieve the sense data
3) The sense key is "not ready" and ASC/ASCQ indicate the unit is becoming ready
4) A retry of the command fails in the same way
Tony,
I'm about to release 2.4.28-rc2 which should become final, I've queued your patches for 2.4.29-pre.
Thanks