Skip to content

Commit

Permalink
[SCSI] remove cmd->serial_number litter
Browse files Browse the repository at this point in the history
Stop using cmd->serial_number in printks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Christoph Hellwig authored and James Bottomley committed May 1, 2011
1 parent f04ca1b commit 5cd049a
Show file tree
Hide file tree
Showing 17 changed files with 255 additions and 286 deletions.
4 changes: 2 additions & 2 deletions drivers/message/i2o/i2o_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
*/
error = le32_to_cpu(msg->body[0]);

osm_debug("Completed %ld\n", cmd->serial_number);
osm_debug("Completed %0x%p\n", cmd);

cmd->result = error & 0xff;
/*
Expand Down Expand Up @@ -678,7 +678,7 @@ static int i2o_scsi_queuecommand_lck(struct scsi_cmnd *SCpnt,
/* Queue the message */
i2o_msg_post(c, msg);

osm_debug("Issued %ld\n", SCpnt->serial_number);
osm_debug("Issued %0x%p\n", SCpnt);

return 0;

Expand Down
193 changes: 96 additions & 97 deletions drivers/scsi/dc395x.c

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ static int adpt_abort(struct scsi_cmnd * cmd)
return FAILED;
}
pHba = (adpt_hba*) cmd->device->host->hostdata[0];
printk(KERN_INFO"%s: Trying to Abort cmd=%ld\n",pHba->name, cmd->serial_number);
printk(KERN_INFO"%s: Trying to Abort\n",pHba->name);
if ((dptdevice = (void*) (cmd->device->hostdata)) == NULL) {
printk(KERN_ERR "%s: Unable to abort: No device in cmnd\n",pHba->name);
return FAILED;
Expand All @@ -802,10 +802,10 @@ static int adpt_abort(struct scsi_cmnd * cmd)
printk(KERN_INFO"%s: Abort cmd not supported\n",pHba->name);
return FAILED;
}
printk(KERN_INFO"%s: Abort cmd=%ld failed.\n",pHba->name, cmd->serial_number);
printk(KERN_INFO"%s: Abort failed.\n",pHba->name);
return FAILED;
}
printk(KERN_INFO"%s: Abort cmd=%ld complete.\n",pHba->name, cmd->serial_number);
printk(KERN_INFO"%s: Abort complete.\n",pHba->name);
return SUCCESS;
}

Expand Down
66 changes: 31 additions & 35 deletions drivers/scsi/eata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,8 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,
struct mscp *cpp;

if (SCpnt->host_scribble)
panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
ha->board_name, SCpnt->serial_number, SCpnt);
panic("%s: qcomm, SCpnt %p already active.\n",
ha->board_name, SCpnt);

/* i is the mailbox number, look for the first free mailbox
starting from last_cp_used */
Expand Down Expand Up @@ -1801,7 +1801,7 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,

if (do_trace)
scmd_printk(KERN_INFO, SCpnt,
"qcomm, mbox %d, pid %ld.\n", i, SCpnt->serial_number);
"qcomm, mbox %d.\n", i);

cpp->reqsen = 1;
cpp->dispri = 1;
Expand Down Expand Up @@ -1833,8 +1833,7 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,
if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
unmap_dma(i, ha);
SCpnt->host_scribble = NULL;
scmd_printk(KERN_INFO, SCpnt,
"qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
scmd_printk(KERN_INFO, SCpnt, "qcomm, adapter busy.\n");
return 1;
}

Expand All @@ -1851,14 +1850,12 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
unsigned int i;

if (SCarg->host_scribble == NULL) {
scmd_printk(KERN_INFO, SCarg,
"abort, pid %ld inactive.\n", SCarg->serial_number);
scmd_printk(KERN_INFO, SCarg, "abort, cmd inactive.\n");
return SUCCESS;
}

i = *(unsigned int *)SCarg->host_scribble;
scmd_printk(KERN_WARNING, SCarg,
"abort, mbox %d, pid %ld.\n", i, SCarg->serial_number);
scmd_printk(KERN_WARNING, SCarg, "abort, mbox %d.\n", i);

if (i >= shost->can_queue)
panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name);
Expand Down Expand Up @@ -1902,8 +1899,8 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
SCarg->result = DID_ABORT << 16;
SCarg->host_scribble = NULL;
ha->cp_stat[i] = FREE;
printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
ha->board_name, i, SCarg->serial_number);
printk("%s, abort, mbox %d ready, DID_ABORT, done.\n",
ha->board_name, i);
SCarg->scsi_done(SCarg);
return SUCCESS;
}
Expand All @@ -1919,13 +1916,12 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
struct Scsi_Host *shost = SCarg->device->host;
struct hostdata *ha = (struct hostdata *)shost->hostdata;

scmd_printk(KERN_INFO, SCarg,
"reset, enter, pid %ld.\n", SCarg->serial_number);
scmd_printk(KERN_INFO, SCarg, "reset, enter.\n");

spin_lock_irq(shost->host_lock);

if (SCarg->host_scribble == NULL)
printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->serial_number);
printk("%s: reset, inactive.\n", ha->board_name);

if (ha->in_reset) {
printk("%s: reset, exit, already in reset.\n", ha->board_name);
Expand Down Expand Up @@ -1964,14 +1960,14 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)

if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
ha->cp_stat[i] = ABORTING;
printk("%s: reset, mbox %d aborting, pid %ld.\n",
ha->board_name, i, SCpnt->serial_number);
printk("%s: reset, mbox %d aborting.\n",
ha->board_name, i);
}

else {
ha->cp_stat[i] = IN_RESET;
printk("%s: reset, mbox %d in reset, pid %ld.\n",
ha->board_name, i, SCpnt->serial_number);
printk("%s: reset, mbox %d in reset.\n",
ha->board_name, i);
}

if (SCpnt->host_scribble == NULL)
Expand Down Expand Up @@ -2025,8 +2021,8 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
ha->cp_stat[i] = LOCKED;

printk
("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
ha->board_name, i, SCpnt->serial_number);
("%s, reset, mbox %d locked, DID_RESET, done.\n",
ha->board_name, i);
}

else if (ha->cp_stat[i] == ABORTING) {
Expand All @@ -2039,8 +2035,8 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
ha->cp_stat[i] = FREE;

printk
("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
ha->board_name, i, SCpnt->serial_number);
("%s, reset, mbox %d aborting, DID_RESET, done.\n",
ha->board_name, i);
}

else
Expand All @@ -2054,7 +2050,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
do_trace = 0;

if (arg_done)
printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->serial_number);
printk("%s: reset, exit, done.\n", ha->board_name);
else
printk("%s: reset, exit.\n", ha->board_name);

Expand Down Expand Up @@ -2238,10 +2234,10 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
cpp = &ha->cp[k];
SCpnt = cpp->SCpnt;
scmd_printk(KERN_INFO, SCpnt,
"%s pid %ld mb %d fc %d nr %d sec %ld ns %u"
"%s mb %d fc %d nr %d sec %ld ns %u"
" cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
(ihdlr ? "ihdlr" : "qcomm"),
SCpnt->serial_number, k, flushcount,
k, flushcount,
n_ready, blk_rq_pos(SCpnt->request),
blk_rq_sectors(SCpnt->request), cursec, YESNO(s),
YESNO(r), YESNO(rev), YESNO(input_only),
Expand Down Expand Up @@ -2285,10 +2281,10 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec,

if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
scmd_printk(KERN_INFO, SCpnt,
"%s, pid %ld, mbox %d, adapter"
"%s, mbox %d, adapter"
" busy, will abort.\n",
(ihdlr ? "ihdlr" : "qcomm"),
SCpnt->serial_number, k);
k);
ha->cp_stat[k] = ABORTING;
continue;
}
Expand Down Expand Up @@ -2398,12 +2394,12 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
panic("%s: ihdlr, mbox %d, SCpnt == NULL.\n", ha->board_name, i);

if (SCpnt->host_scribble == NULL)
panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name,
i, SCpnt->serial_number, SCpnt);
panic("%s: ihdlr, mbox %d, SCpnt %p garbled.\n", ha->board_name,
i, SCpnt);

if (*(unsigned int *)SCpnt->host_scribble != i)
panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
ha->board_name, i, SCpnt->serial_number,
panic("%s: ihdlr, mbox %d, index mismatch %d.\n",
ha->board_name, i,
*(unsigned int *)SCpnt->host_scribble);

sync_dma(i, ha);
Expand Down Expand Up @@ -2449,11 +2445,11 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
if (spp->target_status && SCpnt->device->type == TYPE_DISK &&
(!(tstatus == CHECK_CONDITION && ha->iocount <= 1000 &&
(SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
printk("%s: ihdlr, target %d.%d:%d, pid %ld, "
printk("%s: ihdlr, target %d.%d:%d, "
"target_status 0x%x, sense key 0x%x.\n",
ha->board_name,
SCpnt->device->channel, SCpnt->device->id,
SCpnt->device->lun, SCpnt->serial_number,
SCpnt->device->lun,
spp->target_status, SCpnt->sense_buffer[2]);

ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
Expand Down Expand Up @@ -2522,9 +2518,9 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
do_trace || msg_byte(spp->target_status))
#endif
scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"
" pid %ld, reg 0x%x, count %d.\n",
" reg 0x%x, count %d.\n",
i, spp->adapter_status, spp->target_status,
SCpnt->serial_number, reg, ha->iocount);
reg, ha->iocount);

unmap_dma(i, ha);

Expand Down
19 changes: 8 additions & 11 deletions drivers/scsi/eata_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ static int eata_pio_queue_lck(struct scsi_cmnd *cmd,
cp->status = USED; /* claim free slot */

DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
"eata_pio_queue pid %ld, y %d\n",
cmd->serial_number, y));
"eata_pio_queue 0x%p, y %d\n", cmd, y));

cmd->scsi_done = (void *) done;

Expand Down Expand Up @@ -417,8 +416,8 @@ static int eata_pio_queue_lck(struct scsi_cmnd *cmd,
if (eata_pio_send_command(base, EATA_CMD_PIO_SEND_CP)) {
cmd->result = DID_BUS_BUSY << 16;
scmd_printk(KERN_NOTICE, cmd,
"eata_pio_queue pid %ld, HBA busy, "
"returning DID_BUS_BUSY, done.\n", cmd->serial_number);
"eata_pio_queue pid 0x%p, HBA busy, "
"returning DID_BUS_BUSY, done.\n", cmd);
done(cmd);
cp->status = FREE;
return 0;
Expand All @@ -432,8 +431,8 @@ static int eata_pio_queue_lck(struct scsi_cmnd *cmd,
outw(0, base + HA_RDATA);

DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
"Queued base %#.4lx pid: %ld "
"slot %d irq %d\n", sh->base, cmd->serial_number, y, sh->irq));
"Queued base %#.4lx cmd: 0x%p "
"slot %d irq %d\n", sh->base, cmd, y, sh->irq));

return 0;
}
Expand All @@ -445,8 +444,7 @@ static int eata_pio_abort(struct scsi_cmnd *cmd)
unsigned int loop = 100;

DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
"eata_pio_abort called pid: %ld\n",
cmd->serial_number));
"eata_pio_abort called pid: 0x%p\n", cmd));

while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY)
if (--loop == 0) {
Expand Down Expand Up @@ -481,8 +479,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
struct Scsi_Host *host = cmd->device->host;

DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
"eata_pio_reset called pid:%ld\n",
cmd->serial_number));
"eata_pio_reset called\n"));

spin_lock_irq(host->host_lock);

Expand All @@ -501,7 +498,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)

sp = HD(cmd)->ccb[x].cmd;
HD(cmd)->ccb[x].status = RESET;
printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->serial_number);
printk(KERN_WARNING "eata_pio_reset: slot %d in reset.\n", x);

if (sp == NULL)
panic("eata_pio_reset: slot %d, sp==NULL.\n", x);
Expand Down
Loading

0 comments on commit 5cd049a

Please sign in to comment.