From: "Ewan D. Milne" <emilne@xxxxxxxxxx> Move up the logging of messages and generation of uevents for certain sense codes before checking for TEST UNIT READY commands not generated by the mid-layer, so they won't be silently discarded. Signed-off-by: Ewan D. Milne <emilne@xxxxxxxxxx> --- drivers/scsi/scsi_error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 78b004d..ac6009f 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -457,6 +457,8 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) if (! scsi_command_normalize_sense(scmd, &sshdr)) return FAILED; /* no valid sense data */ + scsi_report_sense(sdev, &sshdr); + if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done) /* * nasty: for mid-layer issued TURs, we need to return the @@ -465,8 +467,6 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) */ return SUCCESS; - scsi_report_sense(sdev, &sshdr); - if (scsi_sense_is_deferred(&sshdr)) return NEEDS_RETRY; -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html