Re: Re: [RFC PATCH 09/10] scsi/trace: Add additional sense code and additional sense code qualifier to scsi_print_sense trace point
(2014/08/27 23:16), Hannes Reinecke wrote: On 08/08/2014 01:50 PM, Yoshihiro YUNOMAE wrote: There are no mean that additional sense code and additional sense code qualifier are output as different messages of sense key, so those information are added. Note: scsi_show_extd_sense() is changed from export symbol to non-export symbol. - Result examples (printk) sd 2:0:0:0: [sda] Add. Sense: Unrecovered read error (ftrace, merged into scsi_print_sense traceevent) scsi_print_sense: host_no=2 channel=0 id=0 lun=0 [sda] Sense Key (Medium Error [current]) Add. Sense (Unrecovered read error) Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: Hidehiro Kawai Cc: Masami Hiramatsu --- drivers/scsi/constants.c| 932 --- drivers/scsi/scsi_trace.c | 920 ++ include/scsi/scsi_dbg.h |2 include/trace/events/scsi.h | 10 4 files changed, 928 insertions(+), 936 deletions(-) diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 85b75c8..ce9ceb8 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c @@ -14,12 +14,6 @@ #include #include -#include -#include -#include -#include - -#include /* Commands with service actions that change the command name */ #define SERVICE_ACTION_IN_12 0xab @@ -429,929 +423,3 @@ void scsi_print_command(struct scsi_cmnd *cmd) print_opcode_name(cmd->device, devname, cmd->cmnd, cmd->cmd_len); } EXPORT_SYMBOL(scsi_print_command); - -#ifdef CONFIG_SCSI_CONSTANTS - -struct error_info { -unsigned short code12;/* 0x0302 looks better than 0x03,0x02 */ -const char * text; -}; - -/* - * The canonical list of T10 Additional Sense Codes is available at: - * http://www.t10.org/lists/asc-num.txt [most recent: 20130605] - */ - -static const struct error_info additional[] = -{ -{0x, "No additional sense information"}, -{0x0001, "Filemark detected"}, -{0x0002, "End-of-partition/medium detected"}, -{0x0003, "Setmark detected"}, -{0x0004, "Beginning-of-partition/medium detected"}, -{0x0005, "End-of-data detected"}, -{0x0006, "I/O process terminated"}, -{0x0007, "Programmable early warning detected"}, -{0x0011, "Audio play operation in progress"}, -{0x0012, "Audio play operation paused"}, -{0x0013, "Audio play operation successfully completed"}, -{0x0014, "Audio play operation stopped due to error"}, -{0x0015, "No current audio status to return"}, -{0x0016, "Operation in progress"}, -{0x0017, "Cleaning requested"}, -{0x0018, "Erase operation in progress"}, -{0x0019, "Locate operation in progress"}, -{0x001A, "Rewind operation in progress"}, -{0x001B, "Set capacity operation in progress"}, -{0x001C, "Verify operation in progress"}, -{0x001D, "ATA pass through information available"}, -{0x001E, "Conflicting SA creation request"}, -{0x001F, "Logical unit transitioning to another power condition"}, -{0x0020, "Extended copy information available"}, - -{0x0100, "No index/sector signal"}, - -{0x0200, "No seek complete"}, - -{0x0300, "Peripheral device write fault"}, -{0x0301, "No write current"}, -{0x0302, "Excessive write errors"}, - -{0x0400, "Logical unit not ready, cause not reportable"}, -{0x0401, "Logical unit is in process of becoming ready"}, -{0x0402, "Logical unit not ready, initializing command required"}, -{0x0403, "Logical unit not ready, manual intervention required"}, -{0x0404, "Logical unit not ready, format in progress"}, -{0x0405, "Logical unit not ready, rebuild in progress"}, -{0x0406, "Logical unit not ready, recalculation in progress"}, -{0x0407, "Logical unit not ready, operation in progress"}, -{0x0408, "Logical unit not ready, long write in progress"}, -{0x0409, "Logical unit not ready, self-test in progress"}, -{0x040A, "Logical unit not accessible, asymmetric access state " - "transition"}, -{0x040B, "Logical unit not accessible, target port in standby state"}, -{0x040C, "Logical unit not accessible, target port in unavailable " - "state"}, -{0x040D, "Logical unit not ready, structure check required"}, -{0x0410, "Logical unit not ready, auxiliary memory not accessible"}, -{0x0411, "Logical unit not ready, notify (enable spinup) required"}, -{0x0412, "Logical unit not ready, offline"}, -{0x0413, "Logical unit not ready, SA creation in progress"}, -{0x0414, "Logical unit not ready, space allocation in progress"}, -{0x0415, "Logical unit not ready, robotics disabled"}, -{0x0416, "Logical unit not ready, configuration required"}, -{0x0417, "Logical unit not ready, calibration required"}, -{0x0418, "Logical unit not ready, a door is open"}, -{0x0419, "Logical unit not ready, operating in sequential mode
Re: [RFC PATCH 09/10] scsi/trace: Add additional sense code and additional sense code qualifier to scsi_print_sense trace point
On 08/08/2014 01:50 PM, Yoshihiro YUNOMAE wrote: There are no mean that additional sense code and additional sense code qualifier are output as different messages of sense key, so those information are added. Note: scsi_show_extd_sense() is changed from export symbol to non-export symbol. - Result examples (printk) sd 2:0:0:0: [sda] Add. Sense: Unrecovered read error (ftrace, merged into scsi_print_sense traceevent) scsi_print_sense: host_no=2 channel=0 id=0 lun=0 [sda] Sense Key (Medium Error [current]) Add. Sense (Unrecovered read error) Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: Hidehiro Kawai Cc: Masami Hiramatsu --- drivers/scsi/constants.c| 932 --- drivers/scsi/scsi_trace.c | 920 ++ include/scsi/scsi_dbg.h |2 include/trace/events/scsi.h | 10 4 files changed, 928 insertions(+), 936 deletions(-) diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 85b75c8..ce9ceb8 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c @@ -14,12 +14,6 @@ #include #include -#include -#include -#include -#include - -#include /* Commands with service actions that change the command name */ #define SERVICE_ACTION_IN_12 0xab @@ -429,929 +423,3 @@ void scsi_print_command(struct scsi_cmnd *cmd) print_opcode_name(cmd->device, devname, cmd->cmnd, cmd->cmd_len); } EXPORT_SYMBOL(scsi_print_command); - -#ifdef CONFIG_SCSI_CONSTANTS - -struct error_info { - unsigned short code12; /* 0x0302 looks better than 0x03,0x02 */ - const char * text; -}; - -/* - * The canonical list of T10 Additional Sense Codes is available at: - * http://www.t10.org/lists/asc-num.txt [most recent: 20130605] - */ - -static const struct error_info additional[] = -{ - {0x, "No additional sense information"}, - {0x0001, "Filemark detected"}, - {0x0002, "End-of-partition/medium detected"}, - {0x0003, "Setmark detected"}, - {0x0004, "Beginning-of-partition/medium detected"}, - {0x0005, "End-of-data detected"}, - {0x0006, "I/O process terminated"}, - {0x0007, "Programmable early warning detected"}, - {0x0011, "Audio play operation in progress"}, - {0x0012, "Audio play operation paused"}, - {0x0013, "Audio play operation successfully completed"}, - {0x0014, "Audio play operation stopped due to error"}, - {0x0015, "No current audio status to return"}, - {0x0016, "Operation in progress"}, - {0x0017, "Cleaning requested"}, - {0x0018, "Erase operation in progress"}, - {0x0019, "Locate operation in progress"}, - {0x001A, "Rewind operation in progress"}, - {0x001B, "Set capacity operation in progress"}, - {0x001C, "Verify operation in progress"}, - {0x001D, "ATA pass through information available"}, - {0x001E, "Conflicting SA creation request"}, - {0x001F, "Logical unit transitioning to another power condition"}, - {0x0020, "Extended copy information available"}, - - {0x0100, "No index/sector signal"}, - - {0x0200, "No seek complete"}, - - {0x0300, "Peripheral device write fault"}, - {0x0301, "No write current"}, - {0x0302, "Excessive write errors"}, - - {0x0400, "Logical unit not ready, cause not reportable"}, - {0x0401, "Logical unit is in process of becoming ready"}, - {0x0402, "Logical unit not ready, initializing command required"}, - {0x0403, "Logical unit not ready, manual intervention required"}, - {0x0404, "Logical unit not ready, format in progress"}, - {0x0405, "Logical unit not ready, rebuild in progress"}, - {0x0406, "Logical unit not ready, recalculation in progress"}, - {0x0407, "Logical unit not ready, operation in progress"}, - {0x0408, "Logical unit not ready, long write in progress"}, - {0x0409, "Logical unit not ready, self-test in progress"}, - {0x040A, "Logical unit not accessible, asymmetric access state " -"transition"}, - {0x040B, "Logical unit not accessible, target port in standby state"}, - {0x040C, "Logical unit not accessible, target port in unavailable " -"state"}, - {0x040D, "Logical unit not ready, structure check required"}, - {0x0410, "Logical unit not ready, auxiliary memory not accessible"}, - {0x0411, "Logical unit not ready, notify (enable spinup) required"}, - {0x0412, "Logical unit not ready, offline"}, - {0x0413, "Logical unit not ready, SA creation in progress"}, - {0x0414, "Logical unit not ready, space allocation in progress"}, - {0x0415, "Logical unit not ready, robotics disabled"}, - {0x0416, "Logical unit not ready, configuration required"}, - {0x0417, "Logical unit not ready, calibration required"}, -
[RFC PATCH 09/10] scsi/trace: Add additional sense code and additional sense code qualifier to scsi_print_sense trace point
There are no mean that additional sense code and additional sense code qualifier are output as different messages of sense key, so those information are added. Note: scsi_show_extd_sense() is changed from export symbol to non-export symbol. - Result examples (printk) sd 2:0:0:0: [sda] Add. Sense: Unrecovered read error (ftrace, merged into scsi_print_sense traceevent) scsi_print_sense: host_no=2 channel=0 id=0 lun=0 [sda] Sense Key (Medium Error [current]) Add. Sense (Unrecovered read error) Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: Hidehiro Kawai Cc: Masami Hiramatsu --- drivers/scsi/constants.c| 932 --- drivers/scsi/scsi_trace.c | 920 ++ include/scsi/scsi_dbg.h |2 include/trace/events/scsi.h | 10 4 files changed, 928 insertions(+), 936 deletions(-) diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 85b75c8..ce9ceb8 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c @@ -14,12 +14,6 @@ #include #include -#include -#include -#include -#include - -#include /* Commands with service actions that change the command name */ #define SERVICE_ACTION_IN_12 0xab @@ -429,929 +423,3 @@ void scsi_print_command(struct scsi_cmnd *cmd) print_opcode_name(cmd->device, devname, cmd->cmnd, cmd->cmd_len); } EXPORT_SYMBOL(scsi_print_command); - -#ifdef CONFIG_SCSI_CONSTANTS - -struct error_info { - unsigned short code12; /* 0x0302 looks better than 0x03,0x02 */ - const char * text; -}; - -/* - * The canonical list of T10 Additional Sense Codes is available at: - * http://www.t10.org/lists/asc-num.txt [most recent: 20130605] - */ - -static const struct error_info additional[] = -{ - {0x, "No additional sense information"}, - {0x0001, "Filemark detected"}, - {0x0002, "End-of-partition/medium detected"}, - {0x0003, "Setmark detected"}, - {0x0004, "Beginning-of-partition/medium detected"}, - {0x0005, "End-of-data detected"}, - {0x0006, "I/O process terminated"}, - {0x0007, "Programmable early warning detected"}, - {0x0011, "Audio play operation in progress"}, - {0x0012, "Audio play operation paused"}, - {0x0013, "Audio play operation successfully completed"}, - {0x0014, "Audio play operation stopped due to error"}, - {0x0015, "No current audio status to return"}, - {0x0016, "Operation in progress"}, - {0x0017, "Cleaning requested"}, - {0x0018, "Erase operation in progress"}, - {0x0019, "Locate operation in progress"}, - {0x001A, "Rewind operation in progress"}, - {0x001B, "Set capacity operation in progress"}, - {0x001C, "Verify operation in progress"}, - {0x001D, "ATA pass through information available"}, - {0x001E, "Conflicting SA creation request"}, - {0x001F, "Logical unit transitioning to another power condition"}, - {0x0020, "Extended copy information available"}, - - {0x0100, "No index/sector signal"}, - - {0x0200, "No seek complete"}, - - {0x0300, "Peripheral device write fault"}, - {0x0301, "No write current"}, - {0x0302, "Excessive write errors"}, - - {0x0400, "Logical unit not ready, cause not reportable"}, - {0x0401, "Logical unit is in process of becoming ready"}, - {0x0402, "Logical unit not ready, initializing command required"}, - {0x0403, "Logical unit not ready, manual intervention required"}, - {0x0404, "Logical unit not ready, format in progress"}, - {0x0405, "Logical unit not ready, rebuild in progress"}, - {0x0406, "Logical unit not ready, recalculation in progress"}, - {0x0407, "Logical unit not ready, operation in progress"}, - {0x0408, "Logical unit not ready, long write in progress"}, - {0x0409, "Logical unit not ready, self-test in progress"}, - {0x040A, "Logical unit not accessible, asymmetric access state " -"transition"}, - {0x040B, "Logical unit not accessible, target port in standby state"}, - {0x040C, "Logical unit not accessible, target port in unavailable " -"state"}, - {0x040D, "Logical unit not ready, structure check required"}, - {0x0410, "Logical unit not ready, auxiliary memory not accessible"}, - {0x0411, "Logical unit not ready, notify (enable spinup) required"}, - {0x0412, "Logical unit not ready, offline"}, - {0x0413, "Logical unit not ready, SA creation in progress"}, - {0x0414, "Logical unit not ready, space allocation in progress"}, - {0x0415, "Logical unit not ready, robotics disabled"}, - {0x0416, "Logical unit not ready, configuration required"}, - {0x0417, "Logical unit not ready, calibration required"}, - {0x0418, "Logical unit not ready, a door is open"}, -