[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>
This commit is contained in:
parent
1e8eb21ea7
commit
33333bacf5
1 changed files with 5 additions and 24 deletions
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <asm/param.h> /* for timeouts in units of HZ */
|
#include <asm/param.h> /* for timeouts in units of HZ */
|
||||||
|
#include <scsi/scsi_dbg.h>
|
||||||
|
|
||||||
#include "sym_glue.h"
|
#include "sym_glue.h"
|
||||||
#include "sym_nvram.h"
|
#include "sym_nvram.h"
|
||||||
|
@ -70,32 +71,12 @@ static void sym_printl_hex(u_char *p, int n)
|
||||||
printf (".\n");
|
printf (".\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Print out the content of a SCSI message.
|
|
||||||
*/
|
|
||||||
static int sym_show_msg (u_char * msg)
|
|
||||||
{
|
|
||||||
u_char i;
|
|
||||||
printf ("%x",*msg);
|
|
||||||
if (*msg==M_EXTENDED) {
|
|
||||||
for (i=1;i<8;i++) {
|
|
||||||
if (i-1>msg[1]) break;
|
|
||||||
printf ("-%x",msg[i]);
|
|
||||||
}
|
|
||||||
return (i+1);
|
|
||||||
} else if ((*msg & 0xf0) == 0x20) {
|
|
||||||
printf ("-%x",msg[1]);
|
|
||||||
return (2);
|
|
||||||
}
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg)
|
static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg)
|
||||||
{
|
{
|
||||||
sym_print_addr(cp->cmd, "%s: ", label);
|
sym_print_addr(cp->cmd, "%s: ", label);
|
||||||
|
|
||||||
sym_show_msg(msg);
|
scsi_print_msg(msg);
|
||||||
printf(".\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg)
|
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
|
||||||
struct sym_tcb *tp = &np->target[target];
|
struct sym_tcb *tp = &np->target[target];
|
||||||
dev_info(&tp->starget->dev, "%s: ", label);
|
dev_info(&tp->starget->dev, "%s: ", label);
|
||||||
|
|
||||||
sym_show_msg(msg);
|
scsi_print_msg(msg);
|
||||||
printf(".\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue