diff options
author | Matthew Wilcox <matthew@wil.cx> | 2005-11-29 23:08:42 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:11:43 -0500 |
commit | 33333bacf523bb4bb903058fec6041a5952c93c6 (patch) | |
tree | 4be2b7dbc7260cd090565ea1f6801f2b5cec7647 /drivers/scsi/sym53c8xx_2 | |
parent | 1e8eb21ea7b5c318d881eab878f3e545e55fa273 (diff) |
[SCSI] sym2: Use scsi_print_msg
sym_show_msg was almost a duplicate of scsi_print_msg, except not as
featureful. So use the common code instead.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_hipd.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index b4f0d9a4a55a..c36e43bbaae5 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <asm/param.h> /* for timeouts in units of HZ */ | 42 | #include <asm/param.h> /* for timeouts in units of HZ */ |
43 | #include <scsi/scsi_dbg.h> | ||
43 | 44 | ||
44 | #include "sym_glue.h" | 45 | #include "sym_glue.h" |
45 | #include "sym_nvram.h" | 46 | #include "sym_nvram.h" |
@@ -70,32 +71,12 @@ static void sym_printl_hex(u_char *p, int n) | |||
70 | printf (".\n"); | 71 | printf (".\n"); |
71 | } | 72 | } |
72 | 73 | ||
73 | /* | ||
74 | * Print out the content of a SCSI message. | ||
75 | */ | ||
76 | static int sym_show_msg (u_char * msg) | ||
77 | { | ||
78 | u_char i; | ||
79 | printf ("%x",*msg); | ||
80 | if (*msg==M_EXTENDED) { | ||
81 | for (i=1;i<8;i++) { | ||
82 | if (i-1>msg[1]) break; | ||
83 | printf ("-%x",msg[i]); | ||
84 | } | ||
85 | return (i+1); | ||
86 | } else if ((*msg & 0xf0) == 0x20) { | ||
87 | printf ("-%x",msg[1]); | ||
88 | return (2); | ||
89 | } | ||
90 | return (1); | ||
91 | } | ||
92 | |||
93 | static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg) | 74 | static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg) |
94 | { | 75 | { |
95 | sym_print_addr(cp->cmd, "%s: ", label); | 76 | sym_print_addr(cp->cmd, "%s: ", label); |
96 | 77 | ||
97 | sym_show_msg(msg); | 78 | scsi_print_msg(msg); |
98 | printf(".\n"); | 79 | printf("\n"); |
99 | } | 80 | } |
100 | 81 | ||
101 | static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg) | 82 | static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg) |
@@ -103,8 +84,8 @@ static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_ch | |||
103 | struct sym_tcb *tp = &np->target[target]; | 84 | struct sym_tcb *tp = &np->target[target]; |
104 | dev_info(&tp->starget->dev, "%s: ", label); | 85 | dev_info(&tp->starget->dev, "%s: ", label); |
105 | 86 | ||
106 | sym_show_msg(msg); | 87 | scsi_print_msg(msg); |
107 | printf(".\n"); | 88 | printf("\n"); |
108 | } | 89 | } |
109 | 90 | ||
110 | /* | 91 | /* |