aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-10-05 15:55:10 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-23 15:12:59 -0400
commit3fb364e089e05c35ead55a08d56d3004193681f6 (patch)
tree625cc6ffe61358add31852eec90d0be6f8c09102 /drivers/scsi
parent4d85b471593d03e141f9160a58574b9204363267 (diff)
[SCSI] sym53c8xx: Use scmd_printk where appropriate
If we have a scsi_cmnd, it gives the user more information than the sym_name, and maybe the target. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c4
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c35
2 files changed, 19 insertions, 20 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 55012970912b..84a0fc571ceb 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -392,7 +392,7 @@ int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct s
392 */ 392 */
393 switch (dir) { 393 switch (dir) {
394 case DMA_BIDIRECTIONAL: 394 case DMA_BIDIRECTIONAL:
395 printk("%s: got DMA_BIDIRECTIONAL command", sym_name(np)); 395 scmd_printk(KERN_INFO, cmd, "got DMA_BIDIRECTIONAL command");
396 sym_set_cam_status(cmd, DID_ERROR); 396 sym_set_cam_status(cmd, DID_ERROR);
397 goto out_abort; 397 goto out_abort;
398 case DMA_TO_DEVICE: 398 case DMA_TO_DEVICE:
@@ -606,7 +606,7 @@ static int sym_eh_handler(int op, char *opname, struct scsi_cmnd *cmd)
606 int sts = -1; 606 int sts = -1;
607 struct completion eh_done; 607 struct completion eh_done;
608 608
609 dev_warn(&cmd->device->sdev_gendev, "%s operation started.\n", opname); 609 scmd_printk(KERN_WARNING, cmd, "%s operation started.\n", opname);
610 610
611 /* We may be in an error condition because the PCI bus 611 /* We may be in an error condition because the PCI bus
612 * went down. In this case, we need to wait until the 612 * went down. In this case, we need to wait until the
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 5d0d356e1e74..13fd5b2c56fc 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -52,7 +52,7 @@
52 * Needed function prototypes. 52 * Needed function prototypes.
53 */ 53 */
54static void sym_int_ma (struct sym_hcb *np); 54static void sym_int_ma (struct sym_hcb *np);
55static void sym_int_sir (struct sym_hcb *np); 55static void sym_int_sir(struct sym_hcb *);
56static struct sym_ccb *sym_alloc_ccb(struct sym_hcb *np); 56static struct sym_ccb *sym_alloc_ccb(struct sym_hcb *np);
57static struct sym_ccb *sym_ccb_from_dsa(struct sym_hcb *np, u32 dsa); 57static struct sym_ccb *sym_ccb_from_dsa(struct sym_hcb *np, u32 dsa);
58static void sym_alloc_lcb_tags (struct sym_hcb *np, u_char tn, u_char ln); 58static void sym_alloc_lcb_tags (struct sym_hcb *np, u_char tn, u_char ln);
@@ -1522,7 +1522,8 @@ void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp)
1522 np->squeueput = qidx; 1522 np->squeueput = qidx;
1523 1523
1524 if (DEBUG_FLAGS & DEBUG_QUEUE) 1524 if (DEBUG_FLAGS & DEBUG_QUEUE)
1525 printf ("%s: queuepos=%d.\n", sym_name (np), np->squeueput); 1525 scmd_printk(KERN_DEBUG, cp->cmd, "queuepos=%d\n",
1526 np->squeueput);
1526 1527
1527 /* 1528 /*
1528 * Script processor may be waiting for reselect. 1529 * Script processor may be waiting for reselect.
@@ -2852,7 +2853,7 @@ void sym_interrupt (struct sym_hcb *np)
2852 !(dstat & (MDPE|BF|ABRT|IID))) { 2853 !(dstat & (MDPE|BF|ABRT|IID))) {
2853 if (sist & PAR) sym_int_par (np, sist); 2854 if (sist & PAR) sym_int_par (np, sist);
2854 else if (sist & MA) sym_int_ma (np); 2855 else if (sist & MA) sym_int_ma (np);
2855 else if (dstat & SIR) sym_int_sir (np); 2856 else if (dstat & SIR) sym_int_sir(np);
2856 else if (dstat & SSI) OUTONB_STD(); 2857 else if (dstat & SSI) OUTONB_STD();
2857 else goto unknown_int; 2858 else goto unknown_int;
2858 return; 2859 return;
@@ -4314,7 +4315,7 @@ static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct sym
4314/* 4315/*
4315 * chip exception handler for programmed interrupts. 4316 * chip exception handler for programmed interrupts.
4316 */ 4317 */
4317static void sym_int_sir (struct sym_hcb *np) 4318static void sym_int_sir(struct sym_hcb *np)
4318{ 4319{
4319 u_char num = INB(np, nc_dsps); 4320 u_char num = INB(np, nc_dsps);
4320 u32 dsa = INL(np, nc_dsa); 4321 u32 dsa = INL(np, nc_dsa);
@@ -4353,31 +4354,30 @@ static void sym_int_sir (struct sym_hcb *np)
4353 return; 4354 return;
4354 /* 4355 /*
4355 * The device didn't go to MSG OUT phase after having 4356 * The device didn't go to MSG OUT phase after having
4356 * been selected with ATN. We donnot want to handle 4357 * been selected with ATN. We do not want to handle that.
4357 * that.
4358 */ 4358 */
4359 case SIR_SEL_ATN_NO_MSG_OUT: 4359 case SIR_SEL_ATN_NO_MSG_OUT:
4360 printf ("%s:%d: No MSG OUT phase after selection with ATN.\n", 4360 scmd_printk(KERN_WARNING, cp->cmd,
4361 sym_name (np), target); 4361 "No MSG OUT phase after selection with ATN\n");
4362 goto out_stuck; 4362 goto out_stuck;
4363 /* 4363 /*
4364 * The device didn't switch to MSG IN phase after 4364 * The device didn't switch to MSG IN phase after
4365 * having reseleted the initiator. 4365 * having reselected the initiator.
4366 */ 4366 */
4367 case SIR_RESEL_NO_MSG_IN: 4367 case SIR_RESEL_NO_MSG_IN:
4368 printf ("%s:%d: No MSG IN phase after reselection.\n", 4368 scmd_printk(KERN_WARNING, cp->cmd,
4369 sym_name (np), target); 4369 "No MSG IN phase after reselection\n");
4370 goto out_stuck; 4370 goto out_stuck;
4371 /* 4371 /*
4372 * After reselection, the device sent a message that wasn't 4372 * After reselection, the device sent a message that wasn't
4373 * an IDENTIFY. 4373 * an IDENTIFY.
4374 */ 4374 */
4375 case SIR_RESEL_NO_IDENTIFY: 4375 case SIR_RESEL_NO_IDENTIFY:
4376 printf ("%s:%d: No IDENTIFY after reselection.\n", 4376 scmd_printk(KERN_WARNING, cp->cmd,
4377 sym_name (np), target); 4377 "No IDENTIFY after reselection\n");
4378 goto out_stuck; 4378 goto out_stuck;
4379 /* 4379 /*
4380 * The device reselected a LUN we donnot know about. 4380 * The device reselected a LUN we do not know about.
4381 */ 4381 */
4382 case SIR_RESEL_BAD_LUN: 4382 case SIR_RESEL_BAD_LUN:
4383 np->msgout[0] = M_RESET; 4383 np->msgout[0] = M_RESET;
@@ -4390,8 +4390,7 @@ static void sym_int_sir (struct sym_hcb *np)
4390 np->msgout[0] = M_ABORT; 4390 np->msgout[0] = M_ABORT;
4391 goto out; 4391 goto out;
4392 /* 4392 /*
4393 * The device reselected for a tagged nexus that we donnot 4393 * The device reselected for a tagged nexus that we do not have.
4394 * have.
4395 */ 4394 */
4396 case SIR_RESEL_BAD_I_T_L_Q: 4395 case SIR_RESEL_BAD_I_T_L_Q:
4397 np->msgout[0] = M_ABORT_TAG; 4396 np->msgout[0] = M_ABORT_TAG;
@@ -4403,8 +4402,8 @@ static void sym_int_sir (struct sym_hcb *np)
4403 case SIR_RESEL_ABORTED: 4402 case SIR_RESEL_ABORTED:
4404 np->lastmsg = np->msgout[0]; 4403 np->lastmsg = np->msgout[0];
4405 np->msgout[0] = M_NOOP; 4404 np->msgout[0] = M_NOOP;
4406 printf ("%s:%d: message %x sent on bad reselection.\n", 4405 scmd_printk(KERN_WARNING, cp->cmd,
4407 sym_name (np), target, np->lastmsg); 4406 "message %x sent on bad reselection\n", np->lastmsg);
4408 goto out; 4407 goto out;
4409 /* 4408 /*
4410 * The SCRIPTS let us know that a message has been 4409 * The SCRIPTS let us know that a message has been