Update scsi_log_completion to decode new disposition codes. Signed-off-by: Mike Anderson <andmike@xxxxxxxxxxxxxxxxxx> Acked-by: Mike Christie <michaelc@xxxxxxxxxxx> --- drivers/scsi/scsi.c | 41 ++++++++++++++++++++++------------------- include/scsi/scsi.h | 1 + 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 5c116d9..c0023e3 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -577,37 +577,40 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) if (unlikely(scsi_logging_level)) { level = SCSI_LOG_LEVEL(SCSI_LOG_MLCOMPLETE_SHIFT, SCSI_LOG_MLCOMPLETE_BITS); - if (((level > 0) && (cmd->result || disposition != SUCCESS)) || + if (((level > 0) && + (cmd->result || !scsi_disposition_finish(disposition))) || (level > 1)) { scmd_printk(KERN_INFO, cmd, "Done: "); if (level > 2) printk("0x%p ", cmd); + /* * Dump truncated values, so we usually fit within * 80 chars. */ - switch (disposition) { - case SUCCESS: + if (scsi_disposition_finish(disposition)) printk("SUCCESS\n"); - break; - case NEEDS_RETRY: + else if (scsi_disposition_retry(disposition)) printk("RETRY\n"); - break; - case ADD_TO_MLQUEUE: - printk("MLQUEUE\n"); - break; - case FAILED: + else if (scsi_disposition_fail(disposition)) printk("FAILED\n"); - break; - case TIMEOUT_ERROR: - /* - * If called via scsi_times_out. - */ - printk("TIMEOUT\n"); - break; - default: - printk("UNKNOWN\n"); + else { + switch (disposition) { + case SUCCESS: + printk("SUCCESS\n"); + break; + case TIMEOUT_ERROR: + /* + * If called via scsi_times_out. + */ + printk("TIMEOUT\n"); + break; + default: + printk("UNKNOWN: 0x%x\n", + disposition); + } } + scsi_print_result(cmd); scsi_print_command(cmd); if (status_byte(cmd->result) & CHECK_CONDITION) diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 09751e4..2d8f00e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -449,6 +449,7 @@ enum { }; #define scsi_disposition_finish(dis) (dis & SCSI_MLQUEUE_DIS_FINISH) +#define scsi_disposition_fail(dis) (dis & SCSI_MLQUEUE_DIS_FAIL) #define scsi_disposition_retry(dis) \ ((dis & SCSI_MLQUEUE_DIS_RETRY) || \ (dis & SCSI_MLQUEUE_DIS_XPT_RETRY) || \ -- 1.5.5.1 -- 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