Commit 12a44162 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by James Bottomley

[SCSI] Remove ->pid field from scsi_cmnd

The pid field is a duplicate of the serial_number field and has been
scheduled for removal for a long time.  A few drivers were still using
it, so just change them to use serial_number instead.
Signed-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 13ba9bcb
This diff is collapsed.
...@@ -1758,7 +1758,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, ...@@ -1758,7 +1758,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
if (SCpnt->host_scribble) if (SCpnt->host_scribble)
panic("%s: qcomm, pid %ld, SCpnt %p already active.\n", panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
ha->board_name, SCpnt->pid, SCpnt); ha->board_name, SCpnt->serial_number, SCpnt);
/* i is the mailbox number, look for the first free mailbox /* i is the mailbox number, look for the first free mailbox
starting from last_cp_used */ starting from last_cp_used */
...@@ -1792,7 +1792,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, ...@@ -1792,7 +1792,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
if (do_trace) if (do_trace)
scmd_printk(KERN_INFO, SCpnt, scmd_printk(KERN_INFO, SCpnt,
"qcomm, mbox %d, pid %ld.\n", i, SCpnt->pid); "qcomm, mbox %d, pid %ld.\n", i, SCpnt->serial_number);
cpp->reqsen = 1; cpp->reqsen = 1;
cpp->dispri = 1; cpp->dispri = 1;
...@@ -1825,7 +1825,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, ...@@ -1825,7 +1825,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
unmap_dma(i, ha); unmap_dma(i, ha);
SCpnt->host_scribble = NULL; SCpnt->host_scribble = NULL;
scmd_printk(KERN_INFO, SCpnt, scmd_printk(KERN_INFO, SCpnt,
"qcomm, pid %ld, adapter busy.\n", SCpnt->pid); "qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
return 1; return 1;
} }
...@@ -1841,13 +1841,13 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg) ...@@ -1841,13 +1841,13 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
if (SCarg->host_scribble == NULL) { if (SCarg->host_scribble == NULL) {
scmd_printk(KERN_INFO, SCarg, scmd_printk(KERN_INFO, SCarg,
"abort, pid %ld inactive.\n", SCarg->pid); "abort, pid %ld inactive.\n", SCarg->serial_number);
return SUCCESS; return SUCCESS;
} }
i = *(unsigned int *)SCarg->host_scribble; i = *(unsigned int *)SCarg->host_scribble;
scmd_printk(KERN_WARNING, SCarg, scmd_printk(KERN_WARNING, SCarg,
"abort, mbox %d, pid %ld.\n", i, SCarg->pid); "abort, mbox %d, pid %ld.\n", i, SCarg->serial_number);
if (i >= shost->can_queue) if (i >= shost->can_queue)
panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name); panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name);
...@@ -1892,7 +1892,7 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg) ...@@ -1892,7 +1892,7 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
SCarg->host_scribble = NULL; SCarg->host_scribble = NULL;
ha->cp_stat[i] = FREE; ha->cp_stat[i] = FREE;
printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n", printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
ha->board_name, i, SCarg->pid); ha->board_name, i, SCarg->serial_number);
SCarg->scsi_done(SCarg); SCarg->scsi_done(SCarg);
return SUCCESS; return SUCCESS;
} }
...@@ -1909,12 +1909,12 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) ...@@ -1909,12 +1909,12 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
struct hostdata *ha = (struct hostdata *)shost->hostdata; struct hostdata *ha = (struct hostdata *)shost->hostdata;
scmd_printk(KERN_INFO, SCarg, scmd_printk(KERN_INFO, SCarg,
"reset, enter, pid %ld.\n", SCarg->pid); "reset, enter, pid %ld.\n", SCarg->serial_number);
spin_lock_irq(shost->host_lock); spin_lock_irq(shost->host_lock);
if (SCarg->host_scribble == NULL) if (SCarg->host_scribble == NULL)
printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->pid); printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->serial_number);
if (ha->in_reset) { if (ha->in_reset) {
printk("%s: reset, exit, already in reset.\n", ha->board_name); printk("%s: reset, exit, already in reset.\n", ha->board_name);
...@@ -1954,13 +1954,13 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) ...@@ -1954,13 +1954,13 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) { if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
ha->cp_stat[i] = ABORTING; ha->cp_stat[i] = ABORTING;
printk("%s: reset, mbox %d aborting, pid %ld.\n", printk("%s: reset, mbox %d aborting, pid %ld.\n",
ha->board_name, i, SCpnt->pid); ha->board_name, i, SCpnt->serial_number);
} }
else { else {
ha->cp_stat[i] = IN_RESET; ha->cp_stat[i] = IN_RESET;
printk("%s: reset, mbox %d in reset, pid %ld.\n", printk("%s: reset, mbox %d in reset, pid %ld.\n",
ha->board_name, i, SCpnt->pid); ha->board_name, i, SCpnt->serial_number);
} }
if (SCpnt->host_scribble == NULL) if (SCpnt->host_scribble == NULL)
...@@ -2015,7 +2015,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) ...@@ -2015,7 +2015,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
printk printk
("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n", ("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
ha->board_name, i, SCpnt->pid); ha->board_name, i, SCpnt->serial_number);
} }
else if (ha->cp_stat[i] == ABORTING) { else if (ha->cp_stat[i] == ABORTING) {
...@@ -2029,7 +2029,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) ...@@ -2029,7 +2029,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
printk printk
("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n", ("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
ha->board_name, i, SCpnt->pid); ha->board_name, i, SCpnt->serial_number);
} }
else else
...@@ -2043,7 +2043,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) ...@@ -2043,7 +2043,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
do_trace = 0; do_trace = 0;
if (arg_done) if (arg_done)
printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->pid); printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->serial_number);
else else
printk("%s: reset, exit.\n", ha->board_name); printk("%s: reset, exit.\n", ha->board_name);
...@@ -2182,7 +2182,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec, ...@@ -2182,7 +2182,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
cpp = &ha->cp[k]; cpp = &ha->cp[k];
SCpnt = cpp->SCpnt; SCpnt = cpp->SCpnt;
ll[n] = SCpnt->request->nr_sectors; ll[n] = SCpnt->request->nr_sectors;
pl[n] = SCpnt->pid; pl[n] = SCpnt->serial_number;
if (!n) if (!n)
continue; continue;
...@@ -2230,7 +2230,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec, ...@@ -2230,7 +2230,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
"%s pid %ld mb %d fc %d nr %d sec %ld ns %ld" "%s pid %ld mb %d fc %d nr %d sec %ld ns %ld"
" cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
(ihdlr ? "ihdlr" : "qcomm"), (ihdlr ? "ihdlr" : "qcomm"),
SCpnt->pid, k, flushcount, SCpnt->serial_number, k, flushcount,
n_ready, SCpnt->request->sector, n_ready, SCpnt->request->sector,
SCpnt->request->nr_sectors, cursec, YESNO(s), SCpnt->request->nr_sectors, cursec, YESNO(s),
YESNO(r), YESNO(rev), YESNO(input_only), YESNO(r), YESNO(rev), YESNO(input_only),
...@@ -2277,7 +2277,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, ...@@ -2277,7 +2277,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec,
"%s, pid %ld, mbox %d, adapter" "%s, pid %ld, mbox %d, adapter"
" busy, will abort.\n", " busy, will abort.\n",
(ihdlr ? "ihdlr" : "qcomm"), (ihdlr ? "ihdlr" : "qcomm"),
SCpnt->pid, k); SCpnt->serial_number, k);
ha->cp_stat[k] = ABORTING; ha->cp_stat[k] = ABORTING;
continue; continue;
} }
...@@ -2391,11 +2391,11 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost) ...@@ -2391,11 +2391,11 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
if (SCpnt->host_scribble == NULL) if (SCpnt->host_scribble == NULL)
panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name, panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name,
i, SCpnt->pid, SCpnt); i, SCpnt->serial_number, SCpnt);
if (*(unsigned int *)SCpnt->host_scribble != i) if (*(unsigned int *)SCpnt->host_scribble != i)
panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n", panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
ha->board_name, i, SCpnt->pid, ha->board_name, i, SCpnt->serial_number,
*(unsigned int *)SCpnt->host_scribble); *(unsigned int *)SCpnt->host_scribble);
sync_dma(i, ha); sync_dma(i, ha);
...@@ -2445,12 +2445,12 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost) ...@@ -2445,12 +2445,12 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
"target_status 0x%x, sense key 0x%x.\n", "target_status 0x%x, sense key 0x%x.\n",
ha->board_name, ha->board_name,
SCpnt->device->channel, SCpnt->device->id, SCpnt->device->channel, SCpnt->device->id,
SCpnt->device->lun, SCpnt->pid, SCpnt->device->lun, SCpnt->serial_number,
spp->target_status, SCpnt->sense_buffer[2]); spp->target_status, SCpnt->sense_buffer[2]);
ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0; ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
if (ha->last_retried_pid == SCpnt->pid) if (ha->last_retried_pid == SCpnt->serial_number)
ha->retries = 0; ha->retries = 0;
break; break;
...@@ -2485,7 +2485,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost) ...@@ -2485,7 +2485,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
#endif #endif
ha->retries++; ha->retries++;
ha->last_retried_pid = SCpnt->pid; ha->last_retried_pid = SCpnt->serial_number;
} else } else
status = DID_ERROR << 16; status = DID_ERROR << 16;
...@@ -2516,7 +2516,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost) ...@@ -2516,7 +2516,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x," scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"
" pid %ld, reg 0x%x, count %d.\n", " pid %ld, reg 0x%x, count %d.\n",
i, spp->adapter_status, spp->target_status, i, spp->adapter_status, spp->target_status,
SCpnt->pid, reg, ha->iocount); SCpnt->serial_number, reg, ha->iocount);
unmap_dma(i, ha); unmap_dma(i, ha);
......
...@@ -375,7 +375,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, ...@@ -375,7 +375,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
"eata_pio_queue pid %ld, y %d\n", "eata_pio_queue pid %ld, y %d\n",
cmd->pid, y)); cmd->serial_number, y));
cmd->scsi_done = (void *) done; cmd->scsi_done = (void *) done;
...@@ -420,7 +420,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, ...@@ -420,7 +420,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
cmd->result = DID_BUS_BUSY << 16; cmd->result = DID_BUS_BUSY << 16;
scmd_printk(KERN_NOTICE, cmd, scmd_printk(KERN_NOTICE, cmd,
"eata_pio_queue pid %ld, HBA busy, " "eata_pio_queue pid %ld, HBA busy, "
"returning DID_BUS_BUSY, done.\n", cmd->pid); "returning DID_BUS_BUSY, done.\n", cmd->serial_number);
done(cmd); done(cmd);
cp->status = FREE; cp->status = FREE;
return 0; return 0;
...@@ -435,7 +435,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, ...@@ -435,7 +435,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
"Queued base %#.4lx pid: %ld " "Queued base %#.4lx pid: %ld "
"slot %d irq %d\n", sh->base, cmd->pid, y, sh->irq)); "slot %d irq %d\n", sh->base, cmd->serial_number, y, sh->irq));
return 0; return 0;
} }
...@@ -446,7 +446,7 @@ static int eata_pio_abort(struct scsi_cmnd *cmd) ...@@ -446,7 +446,7 @@ static int eata_pio_abort(struct scsi_cmnd *cmd)
DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
"eata_pio_abort called pid: %ld\n", "eata_pio_abort called pid: %ld\n",
cmd->pid)); cmd->serial_number));
while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY) while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY)
if (--loop == 0) { if (--loop == 0) {
...@@ -482,7 +482,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd) ...@@ -482,7 +482,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
"eata_pio_reset called pid:%ld\n", "eata_pio_reset called pid:%ld\n",
cmd->pid)); cmd->serial_number));
spin_lock_irq(host->host_lock); spin_lock_irq(host->host_lock);
...@@ -501,7 +501,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd) ...@@ -501,7 +501,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
sp = HD(cmd)->ccb[x].cmd; sp = HD(cmd)->ccb[x].cmd;
HD(cmd)->ccb[x].status = RESET; HD(cmd)->ccb[x].status = RESET;
printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->pid); printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->serial_number);
if (sp == NULL) if (sp == NULL)
panic("eata_pio_reset: slot %d, sp==NULL.\n", x); panic("eata_pio_reset: slot %d, sp==NULL.\n", x);
......
...@@ -343,7 +343,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) ...@@ -343,7 +343,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
instance = cmd->device->host; instance = cmd->device->host;
hostdata = (struct IN2000_hostdata *) instance->hostdata; hostdata = (struct IN2000_hostdata *) instance->hostdata;
DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->pid)) DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->serial_number))
/* Set up a few fields in the Scsi_Cmnd structure for our own use: /* Set up a few fields in the Scsi_Cmnd structure for our own use:
* - host_scribble is the pointer to the next cmd in the input queue * - host_scribble is the pointer to the next cmd in the input queue
...@@ -427,7 +427,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) ...@@ -427,7 +427,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
in2000_execute(cmd->device->host); in2000_execute(cmd->device->host);
DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->pid)) DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->serial_number))
return 0; return 0;
} }
...@@ -703,7 +703,7 @@ static void in2000_execute(struct Scsi_Host *instance) ...@@ -703,7 +703,7 @@ static void in2000_execute(struct Scsi_Host *instance)
* to search the input_Q again... * to search the input_Q again...
*/ */
DB(DB_EXECUTE, printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->pid)) DB(DB_EXECUTE, printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->serial_number))
} }
...@@ -1147,7 +1147,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1147,7 +1147,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
case CSR_XFER_DONE | PHS_COMMAND: case CSR_XFER_DONE | PHS_COMMAND:
case CSR_UNEXP | PHS_COMMAND: case CSR_UNEXP | PHS_COMMAND:
case CSR_SRV_REQ | PHS_COMMAND: case CSR_SRV_REQ | PHS_COMMAND:
DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->pid)) DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->serial_number))
transfer_pio(cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, hostdata); transfer_pio(cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, hostdata);
hostdata->state = S_CONNECTED; hostdata->state = S_CONNECTED;
break; break;
...@@ -1189,7 +1189,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1189,7 +1189,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
switch (msg) { switch (msg) {
case COMMAND_COMPLETE: case COMMAND_COMPLETE:
DB(DB_INTR, printk("CCMP-%ld", cmd->pid)) DB(DB_INTR, printk("CCMP-%ld", cmd->serial_number))
write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK);
hostdata->state = S_PRE_CMP_DISC; hostdata->state = S_PRE_CMP_DISC;
break; break;
...@@ -1327,7 +1327,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1327,7 +1327,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); write_3393(hostdata, WD_SOURCE_ID, SRCID_ER);
if (phs == 0x60) { if (phs == 0x60) {
DB(DB_INTR, printk("SX-DONE-%ld", cmd->pid)) DB(DB_INTR, printk("SX-DONE-%ld", cmd->serial_number))
cmd->SCp.Message = COMMAND_COMPLETE; cmd->SCp.Message = COMMAND_COMPLETE;
lun = read_3393(hostdata, WD_TARGET_LUN); lun = read_3393(hostdata, WD_TARGET_LUN);
DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun))
...@@ -1348,7 +1348,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1348,7 +1348,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
in2000_execute(instance); in2000_execute(instance);
} else { } else {
printk("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", asr, sr, phs, cmd->pid); printk("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", asr, sr, phs, cmd->serial_number);
} }
break; break;
...@@ -1415,7 +1415,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1415,7 +1415,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
spin_unlock_irqrestore(instance->host_lock, flags); spin_unlock_irqrestore(instance->host_lock, flags);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->pid)) DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number))
hostdata->connected = NULL; hostdata->connected = NULL;
hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
hostdata->state = S_UNCONNECTED; hostdata->state = S_UNCONNECTED;
...@@ -1440,7 +1440,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1440,7 +1440,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
*/ */
write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); write_3393(hostdata, WD_SOURCE_ID, SRCID_ER);
DB(DB_INTR, printk("DISC-%ld", cmd->pid)) DB(DB_INTR, printk("DISC-%ld", cmd->serial_number))
if (cmd == NULL) { if (cmd == NULL) {
printk(" - Already disconnected! "); printk(" - Already disconnected! ");
hostdata->state = S_UNCONNECTED; hostdata->state = S_UNCONNECTED;
...@@ -1573,7 +1573,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id) ...@@ -1573,7 +1573,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
} else } else
hostdata->state = S_CONNECTED; hostdata->state = S_CONNECTED;
DB(DB_INTR, printk("-%ld", cmd->pid)) DB(DB_INTR, printk("-%ld", cmd->serial_number))
break; break;
default: default:
...@@ -1702,7 +1702,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd) ...@@ -1702,7 +1702,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
prev->host_scribble = cmd->host_scribble; prev->host_scribble = cmd->host_scribble;
cmd->host_scribble = NULL; cmd->host_scribble = NULL;
cmd->result = DID_ABORT << 16; cmd->result = DID_ABORT << 16;
printk(KERN_WARNING "scsi%d: Abort - removing command %ld from input_Q. ", instance->host_no, cmd->pid); printk(KERN_WARNING "scsi%d: Abort - removing command %ld from input_Q. ", instance->host_no, cmd->serial_number);
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
return SUCCESS; return SUCCESS;
} }
...@@ -1723,7 +1723,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd) ...@@ -1723,7 +1723,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
if (hostdata->connected == cmd) { if (hostdata->connected == cmd) {
printk(KERN_WARNING "scsi%d: Aborting connected command %ld - ", instance->host_no, cmd->pid); printk(KERN_WARNING "scsi%d: Aborting connected command %ld - ", instance->host_no, cmd->serial_number);
printk("sending wd33c93 ABORT command - "); printk("sending wd33c93 ABORT command - ");
write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED);
...@@ -2268,7 +2268,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start, ...@@ -2268,7 +2268,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
strcat(bp, "\nconnected: "); strcat(bp, "\nconnected: ");
if (hd->connected) { if (hd->connected) {
cmd = (Scsi_Cmnd *) hd->connected; cmd = (Scsi_Cmnd *) hd->connected;
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
} }
} }
...@@ -2276,7 +2276,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start, ...@@ -2276,7 +2276,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
strcat(bp, "\ninput_Q: "); strcat(bp, "\ninput_Q: ");
cmd = (Scsi_Cmnd *) hd->input_Q; cmd = (Scsi_Cmnd *) hd->input_Q;
while (cmd) { while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
cmd = (Scsi_Cmnd *) cmd->host_scribble; cmd = (Scsi_Cmnd *) cmd->host_scribble;
} }
...@@ -2285,7 +2285,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start, ...@@ -2285,7 +2285,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
strcat(bp, "\ndisconnected_Q:"); strcat(bp, "\ndisconnected_Q:");
cmd = (Scsi_Cmnd *) hd->disconnected_Q; cmd = (Scsi_Cmnd *) hd->disconnected_Q;
while (cmd) { while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
cmd = (Scsi_Cmnd *) cmd->host_scribble; cmd = (Scsi_Cmnd *) cmd->host_scribble;
} }
......
...@@ -8143,12 +8143,7 @@ static int ncr53c8xx_abort(struct scsi_cmnd *cmd) ...@@ -8143,12 +8143,7 @@ static int ncr53c8xx_abort(struct scsi_cmnd *cmd)
unsigned long flags; unsigned long flags;
struct scsi_cmnd *done_list; struct scsi_cmnd *done_list;
#if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS printk("ncr53c8xx_abort: command pid %lu\n", cmd->serial_number);
printk("ncr53c8xx_abort: pid=%lu serial_number=%ld\n",
cmd->pid, cmd->serial_number);
#else
printk("ncr53c8xx_abort: command pid %lu\n", cmd->pid);
#endif
NCR_LOCK_NCB(np, flags); NCR_LOCK_NCB(np, flags);
......
...@@ -4086,7 +4086,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) ...@@ -4086,7 +4086,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd)
} */ } */
printk(" tag=%d, transfersize=0x%x \n", printk(" tag=%d, transfersize=0x%x \n",
cmd->tag, cmd->transfersize); cmd->tag, cmd->transfersize);
printk(" Pid=%li, SP=0x%p\n", cmd->pid, CMD_SP(cmd)); printk(" Pid=%li, SP=0x%p\n", cmd->serial_number, CMD_SP(cmd));
printk(" underflow size = 0x%x, direction=0x%x\n", printk(" underflow size = 0x%x, direction=0x%x\n",
cmd->underflow, cmd->sc_data_direction); cmd->underflow, cmd->sc_data_direction);
} }
......
...@@ -442,7 +442,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) ...@@ -442,7 +442,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
#endif #endif
/* /*
* Assign a serial number and pid to the request for error recovery * Assign a serial number to the request for error recovery
* and debugging purposes. Protected by the Host_Lock of host. * and debugging purposes. Protected by the Host_Lock of host.
*/ */
static inline void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd *cmd) static inline void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd *cmd)
...@@ -450,10 +450,6 @@ static inline void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd ...@@ -450,10 +450,6 @@ static inline void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd
cmd->serial_number = host->cmd_serial_number++; cmd->serial_number = host->cmd_serial_number++;
if (cmd->serial_number == 0) if (cmd->serial_number == 0)
cmd->serial_number = host->cmd_serial_number++; cmd->serial_number = host->cmd_serial_number++;
cmd->pid = host->cmd_pid++;
if (cmd->pid == 0)
cmd->pid = host->cmd_pid++;
} }
/* /*
......
...@@ -1681,12 +1681,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag) ...@@ -1681,12 +1681,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
init_timer(&scmd->eh_timeout); init_timer(&scmd->eh_timeout);
/*
* Sometimes the command can get back into the timer chain,
* so use the pid as an identifier.
*/
scmd->pid = 0;
spin_lock_irqsave(shost->host_lock, flags); spin_lock_irqsave(shost->host_lock, flags);
shost->tmf_in_progress = 1; shost->tmf_in_progress = 1;
spin_unlock_irqrestore(shost->host_lock, flags); spin_unlock_irqrestore(shost->host_lock, flags);
......
...@@ -567,12 +567,12 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr ...@@ -567,12 +567,12 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr
pDCB->TagMask |= 1 << tag[1]; pDCB->TagMask |= 1 << tag[1];
pSRB->TagNumber = tag[1]; pSRB->TagNumber = tag[1];
DC390_write8(ScsiFifo, tag[1]); DC390_write8(ScsiFifo, tag[1]);
DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->pid, pSRB, tag[1])); DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->serial_number, pSRB, tag[1]));
cmd = SEL_W_ATN3; cmd = SEL_W_ATN3;
} else { } else {
/* No TagQ */ /* No TagQ */
//no_tag: //no_tag:
DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->pid, pSRB)); DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->serial_number, pSRB));
} }
pSRB->SRBState = SRB_START_; pSRB->SRBState = SRB_START_;
...@@ -623,7 +623,7 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr ...@@ -623,7 +623,7 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr
{ {
dc390_freetag (pDCB, pSRB); dc390_freetag (pDCB, pSRB);
DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n", DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n",
scmd->pid, scmd->device->id, scmd->device->lun)); scmd->serial_number, scmd->device->id, scmd->device->lun));
pSRB->SRBState = SRB_READY; pSRB->SRBState = SRB_READY;
//DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
pACB->SelLost++; pACB->SelLost++;
...@@ -1708,7 +1708,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* ...@@ -1708,7 +1708,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
status = pSRB->TargetStatus; status = pSRB->TargetStatus;
DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\ DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\
pSRB, pcmd->pid)); pSRB, pcmd->serial_number));
if(pSRB->SRBFlag & AUTO_REQSENSE) if(pSRB->SRBFlag & AUTO_REQSENSE)
{ /* Last command was a Request Sense */ { /* Last command was a Request Sense */
pSRB->SRBFlag &= ~AUTO_REQSENSE; pSRB->SRBFlag &= ~AUTO_REQSENSE;
...@@ -1729,7 +1729,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* ...@@ -1729,7 +1729,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
} else { } else {
SET_RES_DRV(pcmd->result, DRIVER_SENSE); SET_RES_DRV(pcmd->result, DRIVER_SENSE);
//pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8); //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8);
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->serial_number, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
pSRB->TotalXferredLen = 0; pSRB->TotalXferredLen = 0;
SET_RES_DID(pcmd->result, DID_SOFT_ERROR); SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
} }
...@@ -1749,7 +1749,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* ...@@ -1749,7 +1749,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
else if (status == SAM_STAT_TASK_SET_FULL) else if (status == SAM_STAT_TASK_SET_FULL)
{ {
scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1); scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->serial_number, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
pSRB->TotalXferredLen = 0; pSRB->TotalXferredLen = 0;
SET_RES_DID(pcmd->result, DID_SOFT_ERROR); SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
} }
...@@ -1803,7 +1803,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* ...@@ -1803,7 +1803,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
/* Add to free list */ /* Add to free list */
dc390_Free_insert (pACB, pSRB); dc390_Free_insert (pACB, pSRB);
DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid)); DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->serial_number));
pcmd->scsi_done (pcmd); pcmd->scsi_done (pcmd);
return; return;
...@@ -1998,7 +1998,7 @@ static int DC390_abort(struct scsi_cmnd *cmd) ...@@ -1998,7 +1998,7 @@ static int DC390_abort(struct scsi_cmnd *cmd)
struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata;
scmd_printk(KERN_WARNING, cmd, scmd_printk(KERN_WARNING, cmd,
"DC390: Abort command (pid %li)\n", cmd->pid); "DC390: Abort command (pid %li)\n", cmd->serial_number);
/* abort() is too stupid for already sent commands at the moment. /* abort() is too stupid for already sent commands at the moment.
* If it's called we are in trouble anyway, so let's dump some info * If it's called we are in trouble anyway, so let's dump some info
...@@ -2006,7 +2006,7 @@ static int DC390_abort(struct scsi_cmnd *cmd) ...@@ -2006,7 +2006,7 @@ static int DC390_abort(struct scsi_cmnd *cmd)
dc390_dumpinfo(pACB, pDCB, NULL); dc390_dumpinfo(pACB, pDCB, NULL);
pDCB->DCBFlag |= ABORT_DEV_; pDCB->DCBFlag |= ABORT_DEV_;
printk(KERN_INFO "DC390: Aborted pid %li\n", cmd->pid); printk(KERN_INFO "DC390: Aborted pid %li\n", cmd->serial_number);
return FAILED; return FAILED;
} }
......
...@@ -1254,7 +1254,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs ...@@ -1254,7 +1254,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
if (SCpnt->host_scribble) if (SCpnt->host_scribble)
panic("%s: qcomm, pid %ld, SCpnt %p already active.\n", panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
BN(j), SCpnt->pid, SCpnt); BN(j), SCpnt->serial_number, SCpnt);
/* i is the mailbox number, look for the first free mailbox /* i is the mailbox number, look for the first free mailbox
starting from last_cp_used */ starting from last_cp_used */
...@@ -1285,7 +1285,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs ...@@ -1285,7 +1285,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
if (do_trace) printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n", if (do_trace) printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n",
BN(j), i, SCpnt->device->channel, SCpnt->device->id, BN(j), i, SCpnt->device->channel, SCpnt->device->id,
SCpnt->device->lun, SCpnt->pid); SCpnt->device->lun, SCpnt->serial_number);
cpp->opcode = OP_SCSI; cpp->opcode = OP_SCSI;
cpp->channel = SCpnt->device->channel; cpp->channel = SCpnt->device->channel;
...@@ -1312,7 +1312,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs ...@@ -1312,7 +1312,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
unmap_dma(i, j); unmap_dma(i, j);
SCpnt->host_scribble = NULL; SCpnt->host_scribble = NULL;
scmd_printk(KERN_INFO, SCpnt, scmd_printk(KERN_INFO, SCpnt,
"qcomm, pid %ld, adapter busy.\n", SCpnt->pid); "qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
return 1; return 1;
} }
...@@ -1333,13 +1333,13 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) { ...@@ -1333,13 +1333,13 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) {
if (SCarg->host_scribble == NULL) { if (SCarg->host_scribble == NULL) {
scmd_printk(KERN_INFO, SCarg, "abort, pid %ld inactive.\n", scmd_printk(KERN_INFO, SCarg, "abort, pid %ld inactive.\n",
SCarg->pid); SCarg->serial_number);
return SUCCESS; return SUCCESS;
} }
i = *(unsigned int *)SCarg->host_scribble; i = *(unsigned int *)SCarg->host_scribble;
scmd_printk(KERN_INFO, SCarg, "abort, mbox %d, pid %ld.\n", scmd_printk(KERN_INFO, SCarg, "abort, mbox %d, pid %ld.\n",
i, SCarg->pid); i, SCarg->serial_number);
if (i >= sh[j]->can_queue) if (i >= sh[j]->can_queue)
panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j)); panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j));
...@@ -1383,7 +1383,7 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) { ...@@ -1383,7 +1383,7 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) {
SCarg->host_scribble = NULL; SCarg->host_scribble = NULL;
HD(j)->cp_stat[i] = FREE; HD(j)->cp_stat[i] = FREE;
printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n", printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
BN(j), i, SCarg->pid); BN(j), i, SCarg->serial_number);
SCarg->scsi_done(SCarg); SCarg->scsi_done(SCarg);
return SUCCESS; return SUCCESS;
} }
...@@ -1397,12 +1397,12 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { ...@@ -1397,12 +1397,12 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
struct scsi_cmnd *SCpnt; struct scsi_cmnd *SCpnt;
j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number;
scmd_printk(KERN_INFO, SCarg, "reset, enter, pid %ld.\n", SCarg->pid); scmd_printk(KERN_INFO, SCarg, "reset, enter, pid %ld.\n", SCarg->serial_number);
spin_lock_irq(sh[j]->host_lock); spin_lock_irq(sh[j]->host_lock);
if (SCarg->host_scribble == NULL) if (SCarg->host_scribble == NULL)
printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid); printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->serial_number);
if (HD(j)->in_reset) { if (HD(j)->in_reset) {
printk("%s: reset, exit, already in reset.\n", BN(j)); printk("%s: reset, exit, already in reset.\n", BN(j));
...@@ -1440,13 +1440,13 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { ...@@ -1440,13 +1440,13 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) { if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) {
HD(j)->cp_stat[i] = ABORTING; HD(j)->cp_stat[i] = ABORTING;
printk("%s: reset, mbox %d aborting, pid %ld.\n", printk("%s: reset, mbox %d aborting, pid %ld.\n",
BN(j), i, SCpnt->pid); BN(j), i, SCpnt->serial_number);
} }
else { else {
HD(j)->cp_stat[i] = IN_RESET; HD(j)->cp_stat[i] = IN_RESET;
printk("%s: reset, mbox %d in reset, pid %ld.\n", printk("%s: reset, mbox %d in reset, pid %ld.\n",
BN(j), i, SCpnt->pid); BN(j), i, SCpnt->serial_number);
} }
if (SCpnt->host_scribble == NULL) if (SCpnt->host_scribble == NULL)
...@@ -1495,7 +1495,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { ...@@ -1495,7 +1495,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
HD(j)->cp_stat[i] = LOCKED; HD(j)->cp_stat[i] = LOCKED;
printk("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n", printk("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
BN(j), i, SCpnt->pid); BN(j), i, SCpnt->serial_number);
} }
else if (HD(j)->cp_stat[i] == ABORTING) { else if (HD(j)->cp_stat[i] == ABORTING) {
...@@ -1508,7 +1508,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { ...@@ -1508,7 +1508,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
HD(j)->cp_stat[i] = FREE; HD(j)->cp_stat[i] = FREE;
printk("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n", printk("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
BN(j), i, SCpnt->pid); BN(j), i, SCpnt->serial_number);
} }
else else
...@@ -1522,7 +1522,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { ...@@ -1522,7 +1522,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
HD(j)->in_reset = FALSE; HD(j)->in_reset = FALSE;
do_trace = FALSE; do_trace = FALSE;
if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid); if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->serial_number);
else printk("%s: reset, exit.\n", BN(j)); else printk("%s: reset, exit.\n", BN(j));
spin_unlock_irq(sh[j]->host_lock); spin_unlock_irq(sh[j]->host_lock);
...@@ -1639,7 +1639,7 @@ static int reorder(unsigned int j, unsigned long cursec, ...@@ -1639,7 +1639,7 @@ static int reorder(unsigned int j, unsigned long cursec,
if (!input_only) for (n = 0; n < n_ready; n++) { if (!input_only) for (n = 0; n < n_ready; n++) {
k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->pid; ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->serial_number;
if (!n) continue; if (!n) continue;
...@@ -1666,7 +1666,7 @@ static int reorder(unsigned int j, unsigned long cursec, ...@@ -1666,7 +1666,7 @@ static int reorder(unsigned int j, unsigned long cursec,
printk("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"\ printk("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"\
" cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
(ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target, (ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target,
SCpnt->lun, SCpnt->pid, k, flushcount, n_ready, SCpnt->lun, SCpnt->serial_number, k, flushcount, n_ready,
SCpnt->request->sector, SCpnt->request->nr_sectors, cursec, SCpnt->request->sector, SCpnt->request->nr_sectors, cursec,
YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only), YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only),
YESNO(overlap), cpp->xdir); YESNO(overlap), cpp->xdir);
...@@ -1703,7 +1703,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned in ...@@ -1703,7 +1703,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned in
scmd_printk(KERN_INFO, SCpnt, scmd_printk(KERN_INFO, SCpnt,
"%s, pid %ld, mbox %d, adapter" "%s, pid %ld, mbox %d, adapter"
" busy, will abort.\n", (ihdlr ? "ihdlr" : "qcomm"), " busy, will abort.\n", (ihdlr ? "ihdlr" : "qcomm"),
SCpnt->pid, k); SCpnt->serial_number, k);
HD(j)->cp_stat[k] = ABORTING; HD(j)->cp_stat[k] = ABORTING;
continue; continue;
} }
...@@ -1787,11 +1787,11 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { ...@@ -1787,11 +1787,11 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
if (SCpnt->host_scribble == NULL) if (SCpnt->host_scribble == NULL)
panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", BN(j), i, panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", BN(j), i,
SCpnt->pid, SCpnt); SCpnt->serial_number, SCpnt);
if (*(unsigned int *)SCpnt->host_scribble != i) if (*(unsigned int *)SCpnt->host_scribble != i)
panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n", panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
BN(j), i, SCpnt->pid, *(unsigned int *)SCpnt->host_scribble); BN(j), i, SCpnt->serial_number, *(unsigned int *)SCpnt->host_scribble);
sync_dma(i, j); sync_dma(i, j);
...@@ -1835,12 +1835,12 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { ...@@ -1835,12 +1835,12 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
(SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) (SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
scmd_printk(KERN_INFO, SCpnt, scmd_printk(KERN_INFO, SCpnt,
"ihdlr, pid %ld, target_status 0x%x, sense key 0x%x.\n", "ihdlr, pid %ld, target_status 0x%x, sense key 0x%x.\n",
SCpnt->pid, spp->target_status, SCpnt->serial_number, spp->target_status,
SCpnt->sense_buffer[2]); SCpnt->sense_buffer[2]);
HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] = 0; HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] = 0;
if (HD(j)->last_retried_pid == SCpnt->pid) HD(j)->retries = 0; if (HD(j)->last_retried_pid == SCpnt->serial_number) HD(j)->retries = 0;
break; break;
case ASST: /* Selection Time Out */ case ASST: /* Selection Time Out */
...@@ -1877,7 +1877,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { ...@@ -1877,7 +1877,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
#endif #endif
HD(j)->retries++; HD(j)->retries++;
HD(j)->last_retried_pid = SCpnt->pid; HD(j)->last_retried_pid = SCpnt->serial_number;
} }
else else
status = DID_ERROR << 16; status = DID_ERROR << 16;
...@@ -1907,7 +1907,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { ...@@ -1907,7 +1907,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
#endif #endif
scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"\ scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"\
" pid %ld, reg 0x%x, count %d.\n", " pid %ld, reg 0x%x, count %d.\n",
i, spp->adapter_status, spp->target_status, SCpnt->pid, i, spp->adapter_status, spp->target_status, SCpnt->serial_number,
reg, HD(j)->iocount); reg, HD(j)->iocount);
unmap_dma(i, j); unmap_dma(i, j);
......
...@@ -381,7 +381,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, ...@@ -381,7 +381,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata;
DB(DB_QUEUE_COMMAND, DB(DB_QUEUE_COMMAND,
printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->pid)) printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->serial_number))
/* Set up a few fields in the scsi_cmnd structure for our own use: /* Set up a few fields in the scsi_cmnd structure for our own use:
* - host_scribble is the pointer to the next cmd in the input queue * - host_scribble is the pointer to the next cmd in the input queue
...@@ -463,7 +463,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, ...@@ -463,7 +463,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
wd33c93_execute(cmd->device->host); wd33c93_execute(cmd->device->host);
DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->pid)) DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->serial_number))
spin_unlock_irq(&hostdata->lock); spin_unlock_irq(&hostdata->lock);
return 0; return 0;
...@@ -686,7 +686,7 @@ wd33c93_execute(struct Scsi_Host *instance) ...@@ -686,7 +686,7 @@ wd33c93_execute(struct Scsi_Host *instance)
*/ */
DB(DB_EXECUTE, DB(DB_EXECUTE,
printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->pid)) printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->serial_number))
} }
static void static void
...@@ -963,7 +963,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -963,7 +963,7 @@ wd33c93_intr(struct Scsi_Host *instance)
case CSR_XFER_DONE | PHS_COMMAND: case CSR_XFER_DONE | PHS_COMMAND:
case CSR_UNEXP | PHS_COMMAND: case CSR_UNEXP | PHS_COMMAND:
case CSR_SRV_REQ | PHS_COMMAND: case CSR_SRV_REQ | PHS_COMMAND:
DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->pid)) DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->serial_number))
transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR,
hostdata); hostdata);
hostdata->state = S_CONNECTED; hostdata->state = S_CONNECTED;
...@@ -1007,7 +1007,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1007,7 +1007,7 @@ wd33c93_intr(struct Scsi_Host *instance)
switch (msg) { switch (msg) {
case COMMAND_COMPLETE: case COMMAND_COMPLETE:
DB(DB_INTR, printk("CCMP-%ld", cmd->pid)) DB(DB_INTR, printk("CCMP-%ld", cmd->serial_number))
write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK); write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK);
hostdata->state = S_PRE_CMP_DISC; hostdata->state = S_PRE_CMP_DISC;
break; break;
...@@ -1174,7 +1174,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1174,7 +1174,7 @@ wd33c93_intr(struct Scsi_Host *instance)
write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
if (phs == 0x60) { if (phs == 0x60) {
DB(DB_INTR, printk("SX-DONE-%ld", cmd->pid)) DB(DB_INTR, printk("SX-DONE-%ld", cmd->serial_number))
cmd->SCp.Message = COMMAND_COMPLETE; cmd->SCp.Message = COMMAND_COMPLETE;
lun = read_wd33c93(regs, WD_TARGET_LUN); lun = read_wd33c93(regs, WD_TARGET_LUN);
DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun))
...@@ -1201,7 +1201,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1201,7 +1201,7 @@ wd33c93_intr(struct Scsi_Host *instance)
} else { } else {
printk printk
("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", ("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---",
asr, sr, phs, cmd->pid); asr, sr, phs, cmd->serial_number);
spin_unlock_irqrestore(&hostdata->lock, flags); spin_unlock_irqrestore(&hostdata->lock, flags);
} }
break; break;
...@@ -1266,7 +1266,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1266,7 +1266,7 @@ wd33c93_intr(struct Scsi_Host *instance)
spin_unlock_irqrestore(&hostdata->lock, flags); spin_unlock_irqrestore(&hostdata->lock, flags);
return; return;
} }
DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->pid)) DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number))
hostdata->connected = NULL; hostdata->connected = NULL;
hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
hostdata->state = S_UNCONNECTED; hostdata->state = S_UNCONNECTED;
...@@ -1292,7 +1292,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1292,7 +1292,7 @@ wd33c93_intr(struct Scsi_Host *instance)
*/ */
write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
DB(DB_INTR, printk("DISC-%ld", cmd->pid)) DB(DB_INTR, printk("DISC-%ld", cmd->serial_number))
if (cmd == NULL) { if (cmd == NULL) {
printk(" - Already disconnected! "); printk(" - Already disconnected! ");
hostdata->state = S_UNCONNECTED; hostdata->state = S_UNCONNECTED;
...@@ -1491,7 +1491,7 @@ wd33c93_intr(struct Scsi_Host *instance) ...@@ -1491,7 +1491,7 @@ wd33c93_intr(struct Scsi_Host *instance)
} else } else
hostdata->state = S_CONNECTED; hostdata->state = S_CONNECTED;
DB(DB_INTR, printk("-%ld", cmd->pid)) DB(DB_INTR, printk("-%ld", cmd->serial_number))
spin_unlock_irqrestore(&hostdata->lock, flags); spin_unlock_irqrestore(&hostdata->lock, flags);
break; break;
...@@ -1638,7 +1638,7 @@ wd33c93_abort(struct scsi_cmnd * cmd) ...@@ -1638,7 +1638,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
cmd->result = DID_ABORT << 16; cmd->result = DID_ABORT << 16;
printk printk
("scsi%d: Abort - removing command %ld from input_Q. ", ("scsi%d: Abort - removing command %ld from input_Q. ",
instance->host_no, cmd->pid); instance->host_no, cmd->serial_number);
enable_irq(cmd->device->host->irq); enable_irq(cmd->device->host->irq);
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
return SUCCESS; return SUCCESS;
...@@ -1663,7 +1663,7 @@ wd33c93_abort(struct scsi_cmnd * cmd) ...@@ -1663,7 +1663,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
unsigned long timeout; unsigned long timeout;
printk("scsi%d: Aborting connected command %ld - ", printk("scsi%d: Aborting connected command %ld - ",
instance->host_no, cmd->pid); instance->host_no, cmd->serial_number);
printk("stopping DMA - "); printk("stopping DMA - ");
if (hostdata->dma == D_DMA_RUNNING) { if (hostdata->dma == D_DMA_RUNNING) {
...@@ -1730,7 +1730,7 @@ wd33c93_abort(struct scsi_cmnd * cmd) ...@@ -1730,7 +1730,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
if (tmp == cmd) { if (tmp == cmd) {
printk printk
("scsi%d: Abort - command %ld found on disconnected_Q - ", ("scsi%d: Abort - command %ld found on disconnected_Q - ",
instance->host_no, cmd->pid); instance->host_no, cmd->serial_number);
printk("Abort SNOOZE. "); printk("Abort SNOOZE. ");
enable_irq(cmd->device->host->irq); enable_irq(cmd->device->host->irq);
return FAILED; return FAILED;
...@@ -2184,7 +2184,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off ...@@ -2184,7 +2184,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
if (hd->connected) { if (hd->connected) {
cmd = (struct scsi_cmnd *) hd->connected; cmd = (struct scsi_cmnd *) hd->connected;
sprintf(tbuf, " %ld-%d:%d(%02x)", sprintf(tbuf, " %ld-%d:%d(%02x)",
cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
} }
} }
...@@ -2193,7 +2193,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off ...@@ -2193,7 +2193,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
cmd = (struct scsi_cmnd *) hd->input_Q; cmd = (struct scsi_cmnd *) hd->input_Q;
while (cmd) { while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", sprintf(tbuf, " %ld-%d:%d(%02x)",
cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
cmd = (struct scsi_cmnd *) cmd->host_scribble; cmd = (struct scsi_cmnd *) cmd->host_scribble;
} }
...@@ -2203,7 +2203,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off ...@@ -2203,7 +2203,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
cmd = (struct scsi_cmnd *) hd->disconnected_Q; cmd = (struct scsi_cmnd *) hd->disconnected_Q;
while (cmd) { while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", sprintf(tbuf, " %ld-%d:%d(%02x)",
cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf); strcat(bp, tbuf);
cmd = (struct scsi_cmnd *) cmd->host_scribble; cmd = (struct scsi_cmnd *) cmd->host_scribble;
} }
......
...@@ -39,14 +39,12 @@ struct scsi_cmnd { ...@@ -39,14 +39,12 @@ struct scsi_cmnd {
* A SCSI Command is assigned a nonzero serial_number before passed * A SCSI Command is assigned a nonzero serial_number before passed
* to the driver's queue command function. The serial_number is * to the driver's queue command function. The serial_number is
* cleared when scsi_done is entered indicating that the command * cleared when scsi_done is entered indicating that the command
* has been completed. It currently doesn't have much use other * has been completed. It is a bug for LLDDs to use this number
* than printk's. Some lldd's use this number for other purposes. * for purposes other than printk (and even that is only useful
* It's almost certain that such usages are either incorrect or * for debugging).
* meaningless. Please kill all usages other than printk's. Also,
* as this number is always identical to ->pid, please convert
* printk's to use ->pid, so that we can kill this field.
*/ */
unsigned long serial_number; unsigned long serial_number;
/* /*
* This is set to jiffies as it was when the command was first * This is set to jiffies as it was when the command was first
* allocated. It is used to time how long the command has * allocated. It is used to time how long the command has
...@@ -116,7 +114,6 @@ struct scsi_cmnd { ...@@ -116,7 +114,6 @@ struct scsi_cmnd {
int result; /* Status code from lower level driver */ int result; /* Status code from lower level driver */
unsigned char tag; /* SCSI-II queued command tag */ unsigned char tag; /* SCSI-II queued command tag */
unsigned long pid; /* Process ID, starts at 0. Unique per host. */
}; };
extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
......
...@@ -580,7 +580,7 @@ struct Scsi_Host { ...@@ -580,7 +580,7 @@ struct Scsi_Host {
* Used to assign serial numbers to the cmds. * Used to assign serial numbers to the cmds.
* Protected by the host lock. * Protected by the host lock.
*/ */
unsigned long cmd_serial_number, cmd_pid; unsigned long cmd_serial_number;
unsigned active_mode:2; unsigned active_mode:2;
unsigned unchecked_isa_dma:1; unsigned unchecked_isa_dma:1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment