Re: [PATCH 20/20] scsi_error: format abort error message

2014-09-04 Thread Yoshihiro YUNOMAE
"scmd %p abort failed, rtn %s\n", > + scmd, scsi_retval_string(rtn))); If CONFIG_SCSI_CONSTANTS is disabled, scsi_retval_string() returns NULL. So, if so, we had better output the raw value here. Thanks, Yoshihiro YUNOMAE -- Yoshihiro YUNOMAE Software

Re: [PATCH 18/20] scsi: remove scsi_show_result()

2014-09-04 Thread Yoshihiro YUNOMAE
This patch looks good. Thanks, Yoshihiro YUNOMAE (2014/09/03 19:06), Hannes Reinecke wrote: > scsi_show_result() was only ever used in one place in sd.c. > So open-code scsi_show_result() in sd.c and remove it from > constants.c. > > Signed-off-by: Hannes Reinecke > --

Re: [PATCH 17/20] scsi: separate out scsi_host_hostbyte() and scsi_show_driverbyte()

2014-09-04 Thread Yoshihiro YUNOMAE
This patch looks good. Thanks, Yoshihiro YUNOMAE (2014/09/03 19:06), Hannes Reinecke wrote: > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/constants.c | 56 > +--- > include/scsi/scsi_dbg.h | 2 ++ > 2 files changed, 46

Re: [PATCH 16/20] scsi: separate out scsi_retval_string()

2014-09-04 Thread Yoshihiro YUNOMAE
printk("UNKNOWN\n"); > - } > + scmd_printk(KERN_INFO, cmd, > + "Done: 0x%p %s\n", cmd, > + scsi_retval_string(disposition)); > +

Re: [PATCH 14/20] scsi: use local buffer for printing CDB

2014-09-04 Thread Yoshihiro YUNOMAE
e 100644 > --- a/drivers/scsi/ch.c > +++ b/drivers/scsi/ch.c > @@ -189,6 +189,7 @@ ch_do_scsi(scsi_changer *ch, unsigned char *cmd, > { > int errno, retries = 0, timeout, result; > struct scsi_sense_hdr sshdr; > + char buf[80]; This patch introduces some ma

Re: [PATCH 12/20] scsi: merge print_opcode_name()

2014-09-04 Thread Yoshihiro YUNOMAE
names_arr[] = { > {VARIABLE_LENGTH_CMD, variable_length_arr, VARIABLE_LENGTH_SZ}, > {MAINTENANCE_IN, maint_in_arr, MAINT_IN_SZ}, > @@ -267,6 +266,28 @@ static struct sa_name_list sa_names_arr[] = { > }; > #define SA_NAME_LIST_SZ ARRAY_SIZE(sa_names_arr) We can delete SA_NAME_LI

Re: [PATCH 08/20] scsi: use 'bool' as return value for scsi_normalize_sense()

2014-09-04 Thread Yoshihiro YUNOMAE
ngth; /* always 0 for fixed sense format */ > }; > > -static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) > +static inline bool scsi_sense_valid(struct scsi_sense_hdr *sshdr) > { > if (!sshdr) > return 0; Should be "return false;&q

Re: Re: [RFC PATCH 07/10] scsi/trace: Use scsi_show_result trace point instead of printk

2014-09-02 Thread Yoshihiro YUNOMAE
; }) Decoding will fail to do macro expansion here, so we need to fix this. (We don't use enum for traceevents.) Thanks, Yoshihiro YUNOMAE But we can make these tracepoints dependent on CONFIG_SCSI_CONSTANTS to still allow building lighter kernels if we really care about it. -- To unsubscr

Re: Re: [PATCH 1/3] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-09-01 Thread Yoshihiro YUNOMAE
(2014/09/02 0:15), Christoph Hellwig wrote: On Mon, Sep 01, 2014 at 12:33:28PM +, Yoshihiro YUNOMAE wrote: For getting driver byte, host byte, msg byte, and status byte, macros are implemented in scsi/scsi.h, so we use it. As mentioned about three times in various previous scsi logging

[PATCH 3/3] scsi/trace: Delete a duplicated decoder of SCSI command

2014-09-01 Thread Yoshihiro YUNOMAE
Zzz" including space. We use a decoder in constants, so this patch adds double quotes for the name. Note: - If CONFIG_SCSI_CONSTANTS is disabled, command names are not shown. - Add command names for 0x07 and 0x2b. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Ma

[ PATCH -logging 0/3] scsi/trace: Delete duplicated decoders

2014-09-01 Thread Yoshihiro YUNOMAE
patchset is based on Hannes' logging branch: http://git.kernel.org/cgit/linux/kernel/git/hare/scsi-devel.git/log/?h=logging Thanks, Yoshihiro YUNOMAE --- Yoshihiro YUNOMAE (3): scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte scsi/trace: Delete dupli

[PATCH 2/3] scsi/trace: Delete duplicated decoders of hostbyte and driverbyte

2014-09-01 Thread Yoshihiro YUNOMAE
There are decoders of hostbyte and driverbyte in constants.c, so this patch deletes those in SCSI traveevents. Note: If CONFIG_SCSI_CONSTANTS is disabled, hostbyte, driverbyte, msgbyte, and statusbyte are output as raw format from this patch. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke

[PATCH 1/3] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-09-01 Thread Yoshihiro YUNOMAE
For getting driver byte, host byte, msg byte, and status byte, macros are implemented in scsi/scsi.h, so we use it. Signed-off-by: Yoshihiro YUNOMAE Reviewed-by: Ewan D. Milne Reviewed-by: Hannes Reinecke Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc

Re: [RFC PATCH 10/10] scsi/trace: Use scsi_print_command trace point instead of printk

2014-08-31 Thread Yoshihiro YUNOMAE
Hi Hannes, Sorry for the late reply. (2014/08/28 21:15), Hannes Reinecke wrote: On 08/28/2014 08:19 AM, Yoshihiro YUNOMAE wrote: Hi Hannes, I tried to remove duplicated decoder of SCSI command, but the output format of it in constants.c is different from it in traceevents. I have two

Re: Re: Re: [RFC PATCH 10/10] scsi/trace: Use scsi_print_command trace point instead of printk

2014-08-27 Thread Yoshihiro YUNOMAE
rds. (Ex2) traceevents: (nothing) constants: Set limits(12) => Should we merge those decoder? I understand we use the decoder of constants, but we need to solve these problems. Would you give me your comments? Thanks, Yoshihiro YUNOMAE (2014/08/28 10:40), Yoshihiro YUNOMAE wrote: (2014/08/27 23:

Re: Re: [RFC PATCH 10/10] scsi/trace: Use scsi_print_command trace point instead of printk

2014-08-27 Thread Yoshihiro YUNOMAE
(2014/08/27 23:16), Hannes Reinecke wrote: On 08/08/2014 01:50 PM, Yoshihiro YUNOMAE wrote: Previous printk messages of SCSI command can be mixed into other printk messages because multiple printk messages are output for it. To avoid the problem, patch 4e64bb8d6 in Hannes' branch(*1) intro

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 Thread Yoshihiro YUNOMAE
(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

Re: Re: [RFC PATCH 08/10] scsi/trace: Use scsi_print_sense trace point instead of printk

2014-08-27 Thread Yoshihiro YUNOMAE
(2014/08/27 23:15), Hannes Reinecke wrote: On 08/08/2014 01:50 PM, Yoshihiro YUNOMAE wrote: Previous sense messages can be mixed into other sense messages, because continuous printk (KERN_CONT) was used. To avoid the problem, patch d87f3a6f51 introduced a local buffer in Hannes's baranc

Re: Re: [RFC PATCH 07/10] scsi/trace: Use scsi_show_result trace point instead of printk

2014-08-27 Thread Yoshihiro YUNOMAE
(2014/08/27 23:12), Hannes Reinecke wrote: On 08/08/2014 01:50 PM, Yoshihiro YUNOMAE wrote: Current SCSI trace has hostbyte table and driverbyte table, so we don't need to have the same table in scsi/constants.c. - Result examples (printk) sd 2:0:0:0: [sda] Result: hostbyte=DID_OK drive

Re: Re: [RFC PATCH 04/10] scsi/constants: Cleanup printk message in scsi_dump_sense_buffer()

2014-08-17 Thread Yoshihiro YUNOMAE
(2014/08/16 0:08), Ewan Milne wrote: On Fri, 2014-08-08 at 11:50 +, Yoshihiro YUNOMAE wrote: Unrecognized sense data should be output after linebuf is filled because "[%s] Unrecognized sense data (in hex): %s" message is output many times in loop. Signed-off-by: Yoshihiro Y

Re: [RFC PATCH 03/10] scsi/constants: Cleanup printk message in __scsi_print_command()

2014-08-17 Thread Yoshihiro YUNOMAE
Hi Ewan, Thank you for your review. (2014/08/16 0:05), Ewan Milne wrote: On Fri, 2014-08-08 at 11:50 +, Yoshihiro YUNOMAE wrote: All bytes in CDB should be output after linebuf is filled because "[%s] CDB: %s\n" message is output many times in loop. Signed-off-by: Yoshihiro Y

Re: [RFC PATCH 01/10] scsi/constants: Cleanup printk message in __scsi_print_sense()

2014-08-12 Thread Yoshihiro YUNOMAE
Hi Elliot, Thank you for your comment. (2014/08/12 23:51), Elliott, Robert (Server Storage) wrote: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On Behalf Of Yoshihiro YUNOMAE Sent: Friday, 08 August, 2014 6:50 AM ... Subject

Re: Re: [RFC PATCH -logging 00/10] scsi/constants: Output continuous error messages on trace

2014-08-12 Thread Yoshihiro YUNOMAE
Hi Douglas, Thank you for your comment. (2014/08/08 22:07), Douglas Gilbert wrote: On 14-08-08 01:50 PM, Yoshihiro YUNOMAE wrote: Hi All, This patch set introduces new traceevents in order to output continuous error messages. Current SCSI printk messages in upstream kernel can be divided by

[RFC PATCH 01/10] scsi/constants: Cleanup printk message in __scsi_print_sense()

2014-08-08 Thread Yoshihiro YUNOMAE
A device name is output like "sda: Sense Key : Medium Error [current]" in __scsi_print_sense(), but it should be "[sda] Sense Key : Medium Error [current]" because other printk messages output a device name like "[sda] foo." Signed-off-by: Yoshihiro YUNOMAE Cc: Han

[RFC PATCH 04/10] scsi/constants: Cleanup printk message in scsi_dump_sense_buffer()

2014-08-08 Thread Yoshihiro YUNOMAE
Unrecognized sense data should be output after linebuf is filled because "[%s] Unrecognized sense data (in hex): %s" message is output many times in loop. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc:

[RFC PATCH 03/10] scsi/constants: Cleanup printk message in __scsi_print_command()

2014-08-08 Thread Yoshihiro YUNOMAE
All bytes in CDB should be output after linebuf is filled because "[%s] CDB: %s\n" message is output many times in loop. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc

[RFC PATCH 10/10] scsi/trace: Use scsi_print_command trace point instead of printk

2014-08-08 Thread Yoshihiro YUNOMAE
CDB: Read(10) scsi_print_command: host_no=2 channel=0 id=0 lun=0 [sda] CDB (Read(10)) 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 --- d

[RFC PATCH 05/10] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-08-08 Thread Yoshihiro YUNOMAE
For getting driver byte, host byte, msg byte, and status byte, macros are implemented in scsi/scsi.h, so we use it. 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

[RFC PATCH 07/10] scsi/trace: Use scsi_show_result trace point instead of printk

2014-08-08 Thread Yoshihiro YUNOMAE
river=DRIVER_SENSE host=DID_OK) 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/consta

[RFC PATCH 02/10] scsi/constants: Cleanup printk message in scsi_decode_sense_extras()

2014-08-08 Thread Yoshihiro YUNOMAE
If sense_flags and fixed_valid are zero, the kernel does not need to output a printk message. So, if those conditions are met, it just returns. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: "James E.J. Bottomley

[RFC PATCH 09/10] scsi/trace: Add additional sense code and additional sense code qualifier to scsi_print_sense trace point

2014-08-08 Thread Yoshihiro YUNOMAE
. 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

[RFC PATCH 06/10] scsi/sd: Delete extra scsi_show_extd_sense() in sd_print_sense_hdr()

2014-08-08 Thread Yoshihiro YUNOMAE
sd_print_sense_hdr() calls scsi_show_extd_sense(), but scsi_print_sense_hdr() also calls scsi_show_extd_sense(). We can get same result, so we delete it. Note: Calling scsi_show_extd_sense() is introduced in fdd8b297. Signed-off-by: Yoshihiro YUNOMAE Cc: Hannes Reinecke Cc: Doug Gilbert Cc

[RFC PATCH 08/10] scsi/trace: Use scsi_print_sense trace point instead of printk

2014-08-08 Thread Yoshihiro YUNOMAE
sense: host_no=2 channel=0 id=0 lun=0 [sda] Sense Key (Medium Error [current]) 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/consta

[RFC PATCH -logging 00/10] scsi/constants: Output continuous error messages on trace

2014-08-08 Thread Yoshihiro YUNOMAE
introduce new traceevents Any comments are welcome! Thanks, Yoshihiro YUNOMAE --- Yoshihiro YUNOMAE (10): scsi/constants: Cleanup printk message in __scsi_print_sense() scsi/constants: Cleanup printk message in scsi_decode_sense_extras() scsi/constants: Cleanup printk messag

Re: Re: [PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-05-26 Thread Yoshihiro YUNOMAE
To: Yoshihiro YUNOMAE Cc: Hannes Reinecke; Prarit Bhargava; linux-scsi@vger.kernel.org; Kay Sievers; linux-ker...@vger.kernel.org; Hidehiro Kawai; yrl.pp- manager...@hitachi.com; Masami Hiramatsu Subject: Re: [PATCH RESEND] scsi: Output error messages using structured printk in single line On Thu

Re: [PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-02-26 Thread Yoshihiro YUNOMAE
Hi Hannes, Although I sent you a message 6 days ago to ask your work which is similar to my patch, I resend my patch because I'm considering this problem should be fixed as soon as possible. Thank you, Yoshihiro YUNOMAE (2014/02/27 13:17), Yoshihiro YUNOMAE wrote: Output error messages

[PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-02-26 Thread Yoshihiro YUNOMAE
d=0x1234 [ 18.166106] sd 2:0:0:0: [sdb] Add. Sense: Unrecovered read error [ 18.166111] sd 2:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 11 e0 00 01 00 00 Signed-off-by: Yoshihiro YUNOMAE Cc: James E.J. Bottomley Cc: Hannes Reinecke Cc: Kay Sievers Cc: linux-ker...@vger.ke

Re: [PATCH] st: use dev_printk() to avoid linebreaks in kernel messages.

2014-02-20 Thread Yoshihiro YUNOMAE
fixed in your branch. When will you send your branch to linux-kernel ML or linux-scsi ML? [1] https://lkml.org/lkml/2014/1/15/926 [2] http://marc.info/?t=13928007191&r=1&w=2 Thank you, Yoshihiro YUNOMAE -- Yoshihiro YUNOMAE Software Platform Research Dept. Linux Technology Center Hita