aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-09-18 21:54:43 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:51:52 -0400
commit12a441622b753684cc73d1c6f225e9ac53e0bf77 (patch)
tree71a2314ae948c0e2697d68a902d6bfbec85e1fc0
parent13ba9bcbfd6741e4c01ac5a505888b7b3a6d99da (diff)
[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: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/dc395x.c110
-rw-r--r--drivers/scsi/eata.c44
-rw-r--r--drivers/scsi/eata_pio.c12
-rw-r--r--drivers/scsi/in2000.c30
-rw-r--r--drivers/scsi/ncr53c8xx.c7
-rw-r--r--drivers/scsi/qla1280.c2
-rw-r--r--drivers/scsi/scsi.c6
-rw-r--r--drivers/scsi/scsi_error.c6
-rw-r--r--drivers/scsi/tmscsim.c18
-rw-r--r--drivers/scsi/u14-34f.c44
-rw-r--r--drivers/scsi/wd33c93.c32
-rw-r--r--include/scsi/scsi_cmnd.h11
-rw-r--r--include/scsi/scsi_host.h2
13 files changed, 153 insertions, 171 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 7b8a3457b696..1591824cf4b3 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -778,7 +778,7 @@ static void srb_waiting_insert(struct DeviceCtlBlk *dcb,
778 struct ScsiReqBlk *srb) 778 struct ScsiReqBlk *srb)
779{ 779{
780 dprintkdbg(DBG_0, "srb_waiting_insert: (pid#%li) <%02i-%i> srb=%p\n", 780 dprintkdbg(DBG_0, "srb_waiting_insert: (pid#%li) <%02i-%i> srb=%p\n",
781 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 781 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
782 list_add(&srb->list, &dcb->srb_waiting_list); 782 list_add(&srb->list, &dcb->srb_waiting_list);
783} 783}
784 784
@@ -787,7 +787,7 @@ static void srb_waiting_append(struct DeviceCtlBlk *dcb,
787 struct ScsiReqBlk *srb) 787 struct ScsiReqBlk *srb)
788{ 788{
789 dprintkdbg(DBG_0, "srb_waiting_append: (pid#%li) <%02i-%i> srb=%p\n", 789 dprintkdbg(DBG_0, "srb_waiting_append: (pid#%li) <%02i-%i> srb=%p\n",
790 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 790 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
791 list_add_tail(&srb->list, &dcb->srb_waiting_list); 791 list_add_tail(&srb->list, &dcb->srb_waiting_list);
792} 792}
793 793
@@ -795,7 +795,7 @@ static void srb_waiting_append(struct DeviceCtlBlk *dcb,
795static void srb_going_append(struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb) 795static void srb_going_append(struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb)
796{ 796{
797 dprintkdbg(DBG_0, "srb_going_append: (pid#%li) <%02i-%i> srb=%p\n", 797 dprintkdbg(DBG_0, "srb_going_append: (pid#%li) <%02i-%i> srb=%p\n",
798 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 798 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
799 list_add_tail(&srb->list, &dcb->srb_going_list); 799 list_add_tail(&srb->list, &dcb->srb_going_list);
800} 800}
801 801
@@ -805,7 +805,7 @@ static void srb_going_remove(struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb)
805 struct ScsiReqBlk *i; 805 struct ScsiReqBlk *i;
806 struct ScsiReqBlk *tmp; 806 struct ScsiReqBlk *tmp;
807 dprintkdbg(DBG_0, "srb_going_remove: (pid#%li) <%02i-%i> srb=%p\n", 807 dprintkdbg(DBG_0, "srb_going_remove: (pid#%li) <%02i-%i> srb=%p\n",
808 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 808 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
809 809
810 list_for_each_entry_safe(i, tmp, &dcb->srb_going_list, list) 810 list_for_each_entry_safe(i, tmp, &dcb->srb_going_list, list)
811 if (i == srb) { 811 if (i == srb) {
@@ -821,7 +821,7 @@ static void srb_waiting_remove(struct DeviceCtlBlk *dcb,
821 struct ScsiReqBlk *i; 821 struct ScsiReqBlk *i;
822 struct ScsiReqBlk *tmp; 822 struct ScsiReqBlk *tmp;
823 dprintkdbg(DBG_0, "srb_waiting_remove: (pid#%li) <%02i-%i> srb=%p\n", 823 dprintkdbg(DBG_0, "srb_waiting_remove: (pid#%li) <%02i-%i> srb=%p\n",
824 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 824 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
825 825
826 list_for_each_entry_safe(i, tmp, &dcb->srb_waiting_list, list) 826 list_for_each_entry_safe(i, tmp, &dcb->srb_waiting_list, list)
827 if (i == srb) { 827 if (i == srb) {
@@ -836,7 +836,7 @@ static void srb_going_to_waiting_move(struct DeviceCtlBlk *dcb,
836{ 836{
837 dprintkdbg(DBG_0, 837 dprintkdbg(DBG_0,
838 "srb_going_to_waiting_move: (pid#%li) <%02i-%i> srb=%p\n", 838 "srb_going_to_waiting_move: (pid#%li) <%02i-%i> srb=%p\n",
839 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 839 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
840 list_move(&srb->list, &dcb->srb_waiting_list); 840 list_move(&srb->list, &dcb->srb_waiting_list);
841} 841}
842 842
@@ -846,7 +846,7 @@ static void srb_waiting_to_going_move(struct DeviceCtlBlk *dcb,
846{ 846{
847 dprintkdbg(DBG_0, 847 dprintkdbg(DBG_0,
848 "srb_waiting_to_going_move: (pid#%li) <%02i-%i> srb=%p\n", 848 "srb_waiting_to_going_move: (pid#%li) <%02i-%i> srb=%p\n",
849 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 849 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
850 list_move(&srb->list, &dcb->srb_going_list); 850 list_move(&srb->list, &dcb->srb_going_list);
851} 851}
852 852
@@ -982,7 +982,7 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
982 int nseg; 982 int nseg;
983 enum dma_data_direction dir = cmd->sc_data_direction; 983 enum dma_data_direction dir = cmd->sc_data_direction;
984 dprintkdbg(DBG_0, "build_srb: (pid#%li) <%02i-%i>\n", 984 dprintkdbg(DBG_0, "build_srb: (pid#%li) <%02i-%i>\n",
985 cmd->pid, dcb->target_id, dcb->target_lun); 985 cmd->serial_number, dcb->target_id, dcb->target_lun);
986 986
987 srb->dcb = dcb; 987 srb->dcb = dcb;
988 srb->cmd = cmd; 988 srb->cmd = cmd;
@@ -1086,7 +1086,7 @@ static int dc395x_queue_command(struct scsi_cmnd *cmd, void (*done)(struct scsi_
1086 struct AdapterCtlBlk *acb = 1086 struct AdapterCtlBlk *acb =
1087 (struct AdapterCtlBlk *)cmd->device->host->hostdata; 1087 (struct AdapterCtlBlk *)cmd->device->host->hostdata;
1088 dprintkdbg(DBG_0, "queue_command: (pid#%li) <%02i-%i> cmnd=0x%02x\n", 1088 dprintkdbg(DBG_0, "queue_command: (pid#%li) <%02i-%i> cmnd=0x%02x\n",
1089 cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 1089 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
1090 1090
1091 /* Assume BAD_TARGET; will be cleared later */ 1091 /* Assume BAD_TARGET; will be cleared later */
1092 cmd->result = DID_BAD_TARGET << 16; 1092 cmd->result = DID_BAD_TARGET << 16;
@@ -1139,7 +1139,7 @@ static int dc395x_queue_command(struct scsi_cmnd *cmd, void (*done)(struct scsi_
1139 /* process immediately */ 1139 /* process immediately */
1140 send_srb(acb, srb); 1140 send_srb(acb, srb);
1141 } 1141 }
1142 dprintkdbg(DBG_1, "queue_command: (pid#%li) done\n", cmd->pid); 1142 dprintkdbg(DBG_1, "queue_command: (pid#%li) done\n", cmd->serial_number);
1143 return 0; 1143 return 0;
1144 1144
1145complete: 1145complete:
@@ -1203,7 +1203,7 @@ static void dump_register_info(struct AdapterCtlBlk *acb,
1203 else 1203 else
1204 dprintkl(KERN_INFO, "dump: srb=%p cmd=%p (pid#%li) " 1204 dprintkl(KERN_INFO, "dump: srb=%p cmd=%p (pid#%li) "
1205 "cmnd=0x%02x <%02i-%i>\n", 1205 "cmnd=0x%02x <%02i-%i>\n",
1206 srb, srb->cmd, srb->cmd->pid, 1206 srb, srb->cmd, srb->cmd->serial_number,
1207 srb->cmd->cmnd[0], srb->cmd->device->id, 1207 srb->cmd->cmnd[0], srb->cmd->device->id,
1208 srb->cmd->device->lun); 1208 srb->cmd->device->lun);
1209 printk(" sglist=%p cnt=%i idx=%i len=%zu\n", 1209 printk(" sglist=%p cnt=%i idx=%i len=%zu\n",
@@ -1300,7 +1300,7 @@ static int __dc395x_eh_bus_reset(struct scsi_cmnd *cmd)
1300 (struct AdapterCtlBlk *)cmd->device->host->hostdata; 1300 (struct AdapterCtlBlk *)cmd->device->host->hostdata;
1301 dprintkl(KERN_INFO, 1301 dprintkl(KERN_INFO,
1302 "eh_bus_reset: (pid#%li) target=<%02i-%i> cmd=%p\n", 1302 "eh_bus_reset: (pid#%li) target=<%02i-%i> cmd=%p\n",
1303 cmd->pid, cmd->device->id, cmd->device->lun, cmd); 1303 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd);
1304 1304
1305 if (timer_pending(&acb->waiting_timer)) 1305 if (timer_pending(&acb->waiting_timer))
1306 del_timer(&acb->waiting_timer); 1306 del_timer(&acb->waiting_timer);
@@ -1367,7 +1367,7 @@ static int dc395x_eh_abort(struct scsi_cmnd *cmd)
1367 struct DeviceCtlBlk *dcb; 1367 struct DeviceCtlBlk *dcb;
1368 struct ScsiReqBlk *srb; 1368 struct ScsiReqBlk *srb;
1369 dprintkl(KERN_INFO, "eh_abort: (pid#%li) target=<%02i-%i> cmd=%p\n", 1369 dprintkl(KERN_INFO, "eh_abort: (pid#%li) target=<%02i-%i> cmd=%p\n",
1370 cmd->pid, cmd->device->id, cmd->device->lun, cmd); 1370 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd);
1371 1371
1372 dcb = find_dcb(acb, cmd->device->id, cmd->device->lun); 1372 dcb = find_dcb(acb, cmd->device->id, cmd->device->lun);
1373 if (!dcb) { 1373 if (!dcb) {
@@ -1494,7 +1494,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1494 u8 s_stat, scsicommand, i, identify_message; 1494 u8 s_stat, scsicommand, i, identify_message;
1495 u8 *ptr; 1495 u8 *ptr;
1496 dprintkdbg(DBG_0, "start_scsi: (pid#%li) <%02i-%i> srb=%p\n", 1496 dprintkdbg(DBG_0, "start_scsi: (pid#%li) <%02i-%i> srb=%p\n",
1497 srb->cmd->pid, dcb->target_id, dcb->target_lun, srb); 1497 srb->cmd->serial_number, dcb->target_id, dcb->target_lun, srb);
1498 1498
1499 srb->tag_number = TAG_NONE; /* acb->tag_max_num: had error read in eeprom */ 1499 srb->tag_number = TAG_NONE; /* acb->tag_max_num: had error read in eeprom */
1500 1500
@@ -1504,7 +1504,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1504#if 1 1504#if 1
1505 if (s_stat & 0x20 /* s_stat2 & 0x02000 */ ) { 1505 if (s_stat & 0x20 /* s_stat2 & 0x02000 */ ) {
1506 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) BUSY %02x %04x\n", 1506 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) BUSY %02x %04x\n",
1507 srb->cmd->pid, s_stat, s_stat2); 1507 srb->cmd->serial_number, s_stat, s_stat2);
1508 /* 1508 /*
1509 * Try anyway? 1509 * Try anyway?
1510 * 1510 *
@@ -1522,14 +1522,14 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1522 if (acb->active_dcb) { 1522 if (acb->active_dcb) {
1523 dprintkl(KERN_DEBUG, "start_scsi: (pid#%li) Attempt to start a" 1523 dprintkl(KERN_DEBUG, "start_scsi: (pid#%li) Attempt to start a"
1524 "command while another command (pid#%li) is active.", 1524 "command while another command (pid#%li) is active.",
1525 srb->cmd->pid, 1525 srb->cmd->serial_number,
1526 acb->active_dcb->active_srb ? 1526 acb->active_dcb->active_srb ?
1527 acb->active_dcb->active_srb->cmd->pid : 0); 1527 acb->active_dcb->active_srb->cmd->serial_number : 0);
1528 return 1; 1528 return 1;
1529 } 1529 }
1530 if (DC395x_read16(acb, TRM_S1040_SCSI_STATUS) & SCSIINTERRUPT) { 1530 if (DC395x_read16(acb, TRM_S1040_SCSI_STATUS) & SCSIINTERRUPT) {
1531 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) Failed (busy)\n", 1531 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) Failed (busy)\n",
1532 srb->cmd->pid); 1532 srb->cmd->serial_number);
1533 return 1; 1533 return 1;
1534 } 1534 }
1535 /* Allow starting of SCSI commands half a second before we allow the mid-level 1535 /* Allow starting of SCSI commands half a second before we allow the mid-level
@@ -1603,7 +1603,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1603 if (tag_number >= dcb->max_command) { 1603 if (tag_number >= dcb->max_command) {
1604 dprintkl(KERN_WARNING, "start_scsi: (pid#%li) " 1604 dprintkl(KERN_WARNING, "start_scsi: (pid#%li) "
1605 "Out of tags target=<%02i-%i>)\n", 1605 "Out of tags target=<%02i-%i>)\n",
1606 srb->cmd->pid, srb->cmd->device->id, 1606 srb->cmd->serial_number, srb->cmd->device->id,
1607 srb->cmd->device->lun); 1607 srb->cmd->device->lun);
1608 srb->state = SRB_READY; 1608 srb->state = SRB_READY;
1609 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, 1609 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL,
@@ -1622,7 +1622,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1622/*polling:*/ 1622/*polling:*/
1623 /* Send CDB ..command block ......... */ 1623 /* Send CDB ..command block ......... */
1624 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) <%02i-%i> cmnd=0x%02x tag=%i\n", 1624 dprintkdbg(DBG_KG, "start_scsi: (pid#%li) <%02i-%i> cmnd=0x%02x tag=%i\n",
1625 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun, 1625 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun,
1626 srb->cmd->cmnd[0], srb->tag_number); 1626 srb->cmd->cmnd[0], srb->tag_number);
1627 if (srb->flag & AUTO_REQSENSE) { 1627 if (srb->flag & AUTO_REQSENSE) {
1628 DC395x_write8(acb, TRM_S1040_SCSI_FIFO, REQUEST_SENSE); 1628 DC395x_write8(acb, TRM_S1040_SCSI_FIFO, REQUEST_SENSE);
@@ -1647,7 +1647,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
1647 * : Let's process it first! 1647 * : Let's process it first!
1648 */ 1648 */
1649 dprintkdbg(DBG_0, "start_scsi: (pid#%li) <%02i-%i> Failed - busy\n", 1649 dprintkdbg(DBG_0, "start_scsi: (pid#%li) <%02i-%i> Failed - busy\n",
1650 srb->cmd->pid, dcb->target_id, dcb->target_lun); 1650 srb->cmd->serial_number, dcb->target_id, dcb->target_lun);
1651 srb->state = SRB_READY; 1651 srb->state = SRB_READY;
1652 free_tag(dcb, srb); 1652 free_tag(dcb, srb);
1653 srb->msg_count = 0; 1653 srb->msg_count = 0;
@@ -1842,7 +1842,7 @@ static irqreturn_t dc395x_interrupt(int irq, void *dev_id)
1842static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 1842static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
1843 u16 *pscsi_status) 1843 u16 *pscsi_status)
1844{ 1844{
1845 dprintkdbg(DBG_0, "msgout_phase0: (pid#%li)\n", srb->cmd->pid); 1845 dprintkdbg(DBG_0, "msgout_phase0: (pid#%li)\n", srb->cmd->serial_number);
1846 if (srb->state & (SRB_UNEXPECT_RESEL + SRB_ABORT_SENT)) 1846 if (srb->state & (SRB_UNEXPECT_RESEL + SRB_ABORT_SENT))
1847 *pscsi_status = PH_BUS_FREE; /*.. initial phase */ 1847 *pscsi_status = PH_BUS_FREE; /*.. initial phase */
1848 1848
@@ -1856,18 +1856,18 @@ static void msgout_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
1856{ 1856{
1857 u16 i; 1857 u16 i;
1858 u8 *ptr; 1858 u8 *ptr;
1859 dprintkdbg(DBG_0, "msgout_phase1: (pid#%li)\n", srb->cmd->pid); 1859 dprintkdbg(DBG_0, "msgout_phase1: (pid#%li)\n", srb->cmd->serial_number);
1860 1860
1861 clear_fifo(acb, "msgout_phase1"); 1861 clear_fifo(acb, "msgout_phase1");
1862 if (!(srb->state & SRB_MSGOUT)) { 1862 if (!(srb->state & SRB_MSGOUT)) {
1863 srb->state |= SRB_MSGOUT; 1863 srb->state |= SRB_MSGOUT;
1864 dprintkl(KERN_DEBUG, 1864 dprintkl(KERN_DEBUG,
1865 "msgout_phase1: (pid#%li) Phase unexpected\n", 1865 "msgout_phase1: (pid#%li) Phase unexpected\n",
1866 srb->cmd->pid); /* So what ? */ 1866 srb->cmd->serial_number); /* So what ? */
1867 } 1867 }
1868 if (!srb->msg_count) { 1868 if (!srb->msg_count) {
1869 dprintkdbg(DBG_0, "msgout_phase1: (pid#%li) NOP msg\n", 1869 dprintkdbg(DBG_0, "msgout_phase1: (pid#%li) NOP msg\n",
1870 srb->cmd->pid); 1870 srb->cmd->serial_number);
1871 DC395x_write8(acb, TRM_S1040_SCSI_FIFO, MSG_NOP); 1871 DC395x_write8(acb, TRM_S1040_SCSI_FIFO, MSG_NOP);
1872 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH); /* it's important for atn stop */ 1872 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH); /* it's important for atn stop */
1873 DC395x_write8(acb, TRM_S1040_SCSI_COMMAND, SCMD_FIFO_OUT); 1873 DC395x_write8(acb, TRM_S1040_SCSI_COMMAND, SCMD_FIFO_OUT);
@@ -1887,7 +1887,7 @@ static void msgout_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
1887static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 1887static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
1888 u16 *pscsi_status) 1888 u16 *pscsi_status)
1889{ 1889{
1890 dprintkdbg(DBG_0, "command_phase0: (pid#%li)\n", srb->cmd->pid); 1890 dprintkdbg(DBG_0, "command_phase0: (pid#%li)\n", srb->cmd->serial_number);
1891 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH); 1891 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH);
1892} 1892}
1893 1893
@@ -1898,7 +1898,7 @@ static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
1898 struct DeviceCtlBlk *dcb; 1898 struct DeviceCtlBlk *dcb;
1899 u8 *ptr; 1899 u8 *ptr;
1900 u16 i; 1900 u16 i;
1901 dprintkdbg(DBG_0, "command_phase1: (pid#%li)\n", srb->cmd->pid); 1901 dprintkdbg(DBG_0, "command_phase1: (pid#%li)\n", srb->cmd->serial_number);
1902 1902
1903 clear_fifo(acb, "command_phase1"); 1903 clear_fifo(acb, "command_phase1");
1904 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_CLRATN); 1904 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_CLRATN);
@@ -2042,7 +2042,7 @@ static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2042 u16 scsi_status = *pscsi_status; 2042 u16 scsi_status = *pscsi_status;
2043 u32 d_left_counter = 0; 2043 u32 d_left_counter = 0;
2044 dprintkdbg(DBG_0, "data_out_phase0: (pid#%li) <%02i-%i>\n", 2044 dprintkdbg(DBG_0, "data_out_phase0: (pid#%li) <%02i-%i>\n",
2045 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2045 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2046 2046
2047 /* 2047 /*
2048 * KG: We need to drain the buffers before we draw any conclusions! 2048 * KG: We need to drain the buffers before we draw any conclusions!
@@ -2172,7 +2172,7 @@ static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2172 u16 *pscsi_status) 2172 u16 *pscsi_status)
2173{ 2173{
2174 dprintkdbg(DBG_0, "data_out_phase1: (pid#%li) <%02i-%i>\n", 2174 dprintkdbg(DBG_0, "data_out_phase1: (pid#%li) <%02i-%i>\n",
2175 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2175 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2176 clear_fifo(acb, "data_out_phase1"); 2176 clear_fifo(acb, "data_out_phase1");
2177 /* do prepare before transfer when data out phase */ 2177 /* do prepare before transfer when data out phase */
2178 data_io_transfer(acb, srb, XFERDATAOUT); 2178 data_io_transfer(acb, srb, XFERDATAOUT);
@@ -2184,7 +2184,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2184 u16 scsi_status = *pscsi_status; 2184 u16 scsi_status = *pscsi_status;
2185 2185
2186 dprintkdbg(DBG_0, "data_in_phase0: (pid#%li) <%02i-%i>\n", 2186 dprintkdbg(DBG_0, "data_in_phase0: (pid#%li) <%02i-%i>\n",
2187 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2187 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2188 2188
2189 /* 2189 /*
2190 * KG: DataIn is much more tricky than DataOut. When the device is finished 2190 * KG: DataIn is much more tricky than DataOut. When the device is finished
@@ -2205,7 +2205,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2205 2205
2206 if (scsi_status & PARITYERROR) { 2206 if (scsi_status & PARITYERROR) {
2207 dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) " 2207 dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) "
2208 "Parity Error\n", srb->cmd->pid); 2208 "Parity Error\n", srb->cmd->serial_number);
2209 srb->status |= PARITY_ERROR; 2209 srb->status |= PARITY_ERROR;
2210 } 2210 }
2211 /* 2211 /*
@@ -2395,7 +2395,7 @@ static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2395 u16 *pscsi_status) 2395 u16 *pscsi_status)
2396{ 2396{
2397 dprintkdbg(DBG_0, "data_in_phase1: (pid#%li) <%02i-%i>\n", 2397 dprintkdbg(DBG_0, "data_in_phase1: (pid#%li) <%02i-%i>\n",
2398 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2398 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2399 data_io_transfer(acb, srb, XFERDATAIN); 2399 data_io_transfer(acb, srb, XFERDATAIN);
2400} 2400}
2401 2401
@@ -2407,7 +2407,7 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
2407 u8 bval; 2407 u8 bval;
2408 dprintkdbg(DBG_0, 2408 dprintkdbg(DBG_0,
2409 "data_io_transfer: (pid#%li) <%02i-%i> %c len=%i, sg=(%i/%i)\n", 2409 "data_io_transfer: (pid#%li) <%02i-%i> %c len=%i, sg=(%i/%i)\n",
2410 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun, 2410 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun,
2411 ((io_dir & DMACMD_DIR) ? 'r' : 'w'), 2411 ((io_dir & DMACMD_DIR) ? 'r' : 'w'),
2412 srb->total_xfer_length, srb->sg_index, srb->sg_count); 2412 srb->total_xfer_length, srb->sg_index, srb->sg_count);
2413 if (srb == acb->tmp_srb) 2413 if (srb == acb->tmp_srb)
@@ -2580,7 +2580,7 @@ static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2580 u16 *pscsi_status) 2580 u16 *pscsi_status)
2581{ 2581{
2582 dprintkdbg(DBG_0, "status_phase0: (pid#%li) <%02i-%i>\n", 2582 dprintkdbg(DBG_0, "status_phase0: (pid#%li) <%02i-%i>\n",
2583 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2583 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2584 srb->target_status = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); 2584 srb->target_status = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
2585 srb->end_message = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); /* get message */ 2585 srb->end_message = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); /* get message */
2586 srb->state = SRB_COMPLETED; 2586 srb->state = SRB_COMPLETED;
@@ -2594,7 +2594,7 @@ static void status_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2594 u16 *pscsi_status) 2594 u16 *pscsi_status)
2595{ 2595{
2596 dprintkdbg(DBG_0, "status_phase1: (pid#%li) <%02i-%i>\n", 2596 dprintkdbg(DBG_0, "status_phase1: (pid#%li) <%02i-%i>\n",
2597 srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); 2597 srb->cmd->serial_number, srb->cmd->device->id, srb->cmd->device->lun);
2598 srb->state = SRB_STATUS; 2598 srb->state = SRB_STATUS;
2599 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH); /* it's important for atn stop */ 2599 DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_DATALATCH); /* it's important for atn stop */
2600 DC395x_write8(acb, TRM_S1040_SCSI_COMMAND, SCMD_COMP); 2600 DC395x_write8(acb, TRM_S1040_SCSI_COMMAND, SCMD_COMP);
@@ -2636,7 +2636,7 @@ static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
2636 struct ScsiReqBlk *srb = NULL; 2636 struct ScsiReqBlk *srb = NULL;
2637 struct ScsiReqBlk *i; 2637 struct ScsiReqBlk *i;
2638 dprintkdbg(DBG_0, "msgin_qtag: (pid#%li) tag=%i srb=%p\n", 2638 dprintkdbg(DBG_0, "msgin_qtag: (pid#%li) tag=%i srb=%p\n",
2639 srb->cmd->pid, tag, srb); 2639 srb->cmd->serial_number, tag, srb);
2640 2640
2641 if (!(dcb->tag_mask & (1 << tag))) 2641 if (!(dcb->tag_mask & (1 << tag)))
2642 dprintkl(KERN_DEBUG, 2642 dprintkl(KERN_DEBUG,
@@ -2655,7 +2655,7 @@ static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
2655 goto mingx0; 2655 goto mingx0;
2656 2656
2657 dprintkdbg(DBG_0, "msgin_qtag: (pid#%li) <%02i-%i>\n", 2657 dprintkdbg(DBG_0, "msgin_qtag: (pid#%li) <%02i-%i>\n",
2658 srb->cmd->pid, srb->dcb->target_id, srb->dcb->target_lun); 2658 srb->cmd->serial_number, srb->dcb->target_id, srb->dcb->target_lun);
2659 if (dcb->flag & ABORT_DEV_) { 2659 if (dcb->flag & ABORT_DEV_) {
2660 /*srb->state = SRB_ABORT_SENT; */ 2660 /*srb->state = SRB_ABORT_SENT; */
2661 enable_msgout_abort(acb, srb); 2661 enable_msgout_abort(acb, srb);
@@ -2865,7 +2865,7 @@ static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2865 u16 *pscsi_status) 2865 u16 *pscsi_status)
2866{ 2866{
2867 struct DeviceCtlBlk *dcb = acb->active_dcb; 2867 struct DeviceCtlBlk *dcb = acb->active_dcb;
2868 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li)\n", srb->cmd->pid); 2868 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li)\n", srb->cmd->serial_number);
2869 2869
2870 srb->msgin_buf[acb->msg_len++] = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); 2870 srb->msgin_buf[acb->msg_len++] = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
2871 if (msgin_completed(srb->msgin_buf, acb->msg_len)) { 2871 if (msgin_completed(srb->msgin_buf, acb->msg_len)) {
@@ -2933,7 +2933,7 @@ static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2933 */ 2933 */
2934 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li) " 2934 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li) "
2935 "SAVE POINTER rem=%i Ignore\n", 2935 "SAVE POINTER rem=%i Ignore\n",
2936 srb->cmd->pid, srb->total_xfer_length); 2936 srb->cmd->serial_number, srb->total_xfer_length);
2937 break; 2937 break;
2938 2938
2939 case RESTORE_POINTERS: 2939 case RESTORE_POINTERS:
@@ -2943,7 +2943,7 @@ static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2943 case ABORT: 2943 case ABORT:
2944 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li) " 2944 dprintkdbg(DBG_0, "msgin_phase0: (pid#%li) "
2945 "<%02i-%i> ABORT msg\n", 2945 "<%02i-%i> ABORT msg\n",
2946 srb->cmd->pid, dcb->target_id, 2946 srb->cmd->serial_number, dcb->target_id,
2947 dcb->target_lun); 2947 dcb->target_lun);
2948 dcb->flag |= ABORT_DEV_; 2948 dcb->flag |= ABORT_DEV_;
2949 enable_msgout_abort(acb, srb); 2949 enable_msgout_abort(acb, srb);
@@ -2975,7 +2975,7 @@ static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2975static void msgin_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 2975static void msgin_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
2976 u16 *pscsi_status) 2976 u16 *pscsi_status)
2977{ 2977{
2978 dprintkdbg(DBG_0, "msgin_phase1: (pid#%li)\n", srb->cmd->pid); 2978 dprintkdbg(DBG_0, "msgin_phase1: (pid#%li)\n", srb->cmd->serial_number);
2979 clear_fifo(acb, "msgin_phase1"); 2979 clear_fifo(acb, "msgin_phase1");
2980 DC395x_write32(acb, TRM_S1040_SCSI_COUNTER, 1); 2980 DC395x_write32(acb, TRM_S1040_SCSI_COUNTER, 1);
2981 if (!(srb->state & SRB_MSGIN)) { 2981 if (!(srb->state & SRB_MSGIN)) {
@@ -3041,7 +3041,7 @@ static void disconnect(struct AdapterCtlBlk *acb)
3041 } 3041 }
3042 srb = dcb->active_srb; 3042 srb = dcb->active_srb;
3043 acb->active_dcb = NULL; 3043 acb->active_dcb = NULL;
3044 dprintkdbg(DBG_0, "disconnect: (pid#%li)\n", srb->cmd->pid); 3044 dprintkdbg(DBG_0, "disconnect: (pid#%li)\n", srb->cmd->serial_number);
3045 3045
3046 srb->scsi_phase = PH_BUS_FREE; /* initial phase */ 3046 srb->scsi_phase = PH_BUS_FREE; /* initial phase */
3047 clear_fifo(acb, "disconnect"); 3047 clear_fifo(acb, "disconnect");
@@ -3072,13 +3072,13 @@ static void disconnect(struct AdapterCtlBlk *acb)
3072 srb->state = SRB_READY; 3072 srb->state = SRB_READY;
3073 dprintkl(KERN_DEBUG, 3073 dprintkl(KERN_DEBUG,
3074 "disconnect: (pid#%li) Unexpected\n", 3074 "disconnect: (pid#%li) Unexpected\n",
3075 srb->cmd->pid); 3075 srb->cmd->serial_number);
3076 srb->target_status = SCSI_STAT_SEL_TIMEOUT; 3076 srb->target_status = SCSI_STAT_SEL_TIMEOUT;
3077 goto disc1; 3077 goto disc1;
3078 } else { 3078 } else {
3079 /* Normal selection timeout */ 3079 /* Normal selection timeout */
3080 dprintkdbg(DBG_KG, "disconnect: (pid#%li) " 3080 dprintkdbg(DBG_KG, "disconnect: (pid#%li) "
3081 "<%02i-%i> SelTO\n", srb->cmd->pid, 3081 "<%02i-%i> SelTO\n", srb->cmd->serial_number,
3082 dcb->target_id, dcb->target_lun); 3082 dcb->target_id, dcb->target_lun);
3083 if (srb->retry_count++ > DC395x_MAX_RETRIES 3083 if (srb->retry_count++ > DC395x_MAX_RETRIES
3084 || acb->scan_devices) { 3084 || acb->scan_devices) {
@@ -3090,7 +3090,7 @@ static void disconnect(struct AdapterCtlBlk *acb)
3090 srb_going_to_waiting_move(dcb, srb); 3090 srb_going_to_waiting_move(dcb, srb);
3091 dprintkdbg(DBG_KG, 3091 dprintkdbg(DBG_KG,
3092 "disconnect: (pid#%li) Retry\n", 3092 "disconnect: (pid#%li) Retry\n",
3093 srb->cmd->pid); 3093 srb->cmd->serial_number);
3094 waiting_set_timer(acb, HZ / 20); 3094 waiting_set_timer(acb, HZ / 20);
3095 } 3095 }
3096 } else if (srb->state & SRB_DISCONNECT) { 3096 } else if (srb->state & SRB_DISCONNECT) {
@@ -3144,7 +3144,7 @@ static void reselect(struct AdapterCtlBlk *acb)
3144 if (!acb->scan_devices) { 3144 if (!acb->scan_devices) {
3145 dprintkdbg(DBG_KG, "reselect: (pid#%li) <%02i-%i> " 3145 dprintkdbg(DBG_KG, "reselect: (pid#%li) <%02i-%i> "
3146 "Arb lost but Resel win rsel=%i stat=0x%04x\n", 3146 "Arb lost but Resel win rsel=%i stat=0x%04x\n",
3147 srb->cmd->pid, dcb->target_id, 3147 srb->cmd->serial_number, dcb->target_id,
3148 dcb->target_lun, rsel_tar_lun_id, 3148 dcb->target_lun, rsel_tar_lun_id,
3149 DC395x_read16(acb, TRM_S1040_SCSI_STATUS)); 3149 DC395x_read16(acb, TRM_S1040_SCSI_STATUS));
3150 arblostflag = 1; 3150 arblostflag = 1;
@@ -3318,7 +3318,7 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
3318 enum dma_data_direction dir = cmd->sc_data_direction; 3318 enum dma_data_direction dir = cmd->sc_data_direction;
3319 int ckc_only = 1; 3319 int ckc_only = 1;
3320 3320
3321 dprintkdbg(DBG_1, "srb_done: (pid#%li) <%02i-%i>\n", srb->cmd->pid, 3321 dprintkdbg(DBG_1, "srb_done: (pid#%li) <%02i-%i>\n", srb->cmd->serial_number,
3322 srb->cmd->device->id, srb->cmd->device->lun); 3322 srb->cmd->device->id, srb->cmd->device->lun);
3323 dprintkdbg(DBG_SG, "srb_done: srb=%p sg=%i(%i/%i) buf=%p\n", 3323 dprintkdbg(DBG_SG, "srb_done: srb=%p sg=%i(%i/%i) buf=%p\n",
3324 srb, scsi_sg_count(cmd), srb->sg_index, srb->sg_count, 3324 srb, scsi_sg_count(cmd), srb->sg_index, srb->sg_count,
@@ -3499,7 +3499,7 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
3499 if (srb->total_xfer_length) 3499 if (srb->total_xfer_length)
3500 dprintkdbg(DBG_KG, "srb_done: (pid#%li) <%02i-%i> " 3500 dprintkdbg(DBG_KG, "srb_done: (pid#%li) <%02i-%i> "
3501 "cmnd=0x%02x Missed %i bytes\n", 3501 "cmnd=0x%02x Missed %i bytes\n",
3502 cmd->pid, cmd->device->id, cmd->device->lun, 3502 cmd->serial_number, cmd->device->id, cmd->device->lun,
3503 cmd->cmnd[0], srb->total_xfer_length); 3503 cmd->cmnd[0], srb->total_xfer_length);
3504 } 3504 }
3505 3505
@@ -3509,7 +3509,7 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
3509 dprintkl(KERN_ERR, "srb_done: ERROR! Completed cmd with tmp_srb\n"); 3509 dprintkl(KERN_ERR, "srb_done: ERROR! Completed cmd with tmp_srb\n");
3510 else { 3510 else {
3511 dprintkdbg(DBG_0, "srb_done: (pid#%li) done result=0x%08x\n", 3511 dprintkdbg(DBG_0, "srb_done: (pid#%li) done result=0x%08x\n",
3512 cmd->pid, cmd->result); 3512 cmd->serial_number, cmd->result);
3513 srb_free_insert(acb, srb); 3513 srb_free_insert(acb, srb);
3514 } 3514 }
3515 pci_unmap_srb(acb, srb); 3515 pci_unmap_srb(acb, srb);
@@ -3538,7 +3538,7 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
3538 p = srb->cmd; 3538 p = srb->cmd;
3539 dir = p->sc_data_direction; 3539 dir = p->sc_data_direction;
3540 result = MK_RES(0, did_flag, 0, 0); 3540 result = MK_RES(0, did_flag, 0, 0);
3541 printk("G:%li(%02i-%i) ", p->pid, 3541 printk("G:%li(%02i-%i) ", p->serial_number,
3542 p->device->id, p->device->lun); 3542 p->device->id, p->device->lun);
3543 srb_going_remove(dcb, srb); 3543 srb_going_remove(dcb, srb);
3544 free_tag(dcb, srb); 3544 free_tag(dcb, srb);
@@ -3568,7 +3568,7 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
3568 p = srb->cmd; 3568 p = srb->cmd;
3569 3569
3570 result = MK_RES(0, did_flag, 0, 0); 3570 result = MK_RES(0, did_flag, 0, 0);
3571 printk("W:%li<%02i-%i>", p->pid, p->device->id, 3571 printk("W:%li<%02i-%i>", p->serial_number, p->device->id,
3572 p->device->lun); 3572 p->device->lun);
3573 srb_waiting_remove(dcb, srb); 3573 srb_waiting_remove(dcb, srb);
3574 srb_free_insert(acb, srb); 3574 srb_free_insert(acb, srb);
@@ -3678,7 +3678,7 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
3678{ 3678{
3679 struct scsi_cmnd *cmd = srb->cmd; 3679 struct scsi_cmnd *cmd = srb->cmd;
3680 dprintkdbg(DBG_1, "request_sense: (pid#%li) <%02i-%i>\n", 3680 dprintkdbg(DBG_1, "request_sense: (pid#%li) <%02i-%i>\n",
3681 cmd->pid, cmd->device->id, cmd->device->lun); 3681 cmd->serial_number, cmd->device->id, cmd->device->lun);
3682 3682
3683 srb->flag |= AUTO_REQSENSE; 3683 srb->flag |= AUTO_REQSENSE;
3684 srb->adapter_status = 0; 3684 srb->adapter_status = 0;
@@ -3709,7 +3709,7 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
3709 if (start_scsi(acb, dcb, srb)) { /* Should only happen, if sb. else grabs the bus */ 3709 if (start_scsi(acb, dcb, srb)) { /* Should only happen, if sb. else grabs the bus */
3710 dprintkl(KERN_DEBUG, 3710 dprintkl(KERN_DEBUG,
3711 "request_sense: (pid#%li) failed <%02i-%i>\n", 3711 "request_sense: (pid#%li) failed <%02i-%i>\n",
3712 srb->cmd->pid, dcb->target_id, dcb->target_lun); 3712 srb->cmd->serial_number, dcb->target_id, dcb->target_lun);
3713 srb_going_to_waiting_move(dcb, srb); 3713 srb_going_to_waiting_move(dcb, srb);
3714 waiting_set_timer(acb, HZ / 100); 3714 waiting_set_timer(acb, HZ / 100);
3715 } 3715 }
@@ -4717,13 +4717,13 @@ static int dc395x_proc_info(struct Scsi_Host *host, char *buffer,
4717 dcb->target_id, dcb->target_lun, 4717 dcb->target_id, dcb->target_lun,
4718 list_size(&dcb->srb_waiting_list)); 4718 list_size(&dcb->srb_waiting_list));
4719 list_for_each_entry(srb, &dcb->srb_waiting_list, list) 4719 list_for_each_entry(srb, &dcb->srb_waiting_list, list)
4720 SPRINTF(" %li", srb->cmd->pid); 4720 SPRINTF(" %li", srb->cmd->serial_number);
4721 if (!list_empty(&dcb->srb_going_list)) 4721 if (!list_empty(&dcb->srb_going_list))
4722 SPRINTF("\nDCB (%02i-%i): Going : %i:", 4722 SPRINTF("\nDCB (%02i-%i): Going : %i:",
4723 dcb->target_id, dcb->target_lun, 4723 dcb->target_id, dcb->target_lun,
4724 list_size(&dcb->srb_going_list)); 4724 list_size(&dcb->srb_going_list));
4725 list_for_each_entry(srb, &dcb->srb_going_list, list) 4725 list_for_each_entry(srb, &dcb->srb_going_list, list)
4726 SPRINTF(" %li", srb->cmd->pid); 4726 SPRINTF(" %li", srb->cmd->serial_number);
4727 if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list)) 4727 if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list))
4728 SPRINTF("\n"); 4728 SPRINTF("\n");
4729 } 4729 }
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index a83e9f150b97..ec2233114bc9 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -1758,7 +1758,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
1758 1758
1759 if (SCpnt->host_scribble) 1759 if (SCpnt->host_scribble)
1760 panic("%s: qcomm, pid %ld, SCpnt %p already active.\n", 1760 panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
1761 ha->board_name, SCpnt->pid, SCpnt); 1761 ha->board_name, SCpnt->serial_number, SCpnt);
1762 1762
1763 /* i is the mailbox number, look for the first free mailbox 1763 /* i is the mailbox number, look for the first free mailbox
1764 starting from last_cp_used */ 1764 starting from last_cp_used */
@@ -1792,7 +1792,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
1792 1792
1793 if (do_trace) 1793 if (do_trace)
1794 scmd_printk(KERN_INFO, SCpnt, 1794 scmd_printk(KERN_INFO, SCpnt,
1795 "qcomm, mbox %d, pid %ld.\n", i, SCpnt->pid); 1795 "qcomm, mbox %d, pid %ld.\n", i, SCpnt->serial_number);
1796 1796
1797 cpp->reqsen = 1; 1797 cpp->reqsen = 1;
1798 cpp->dispri = 1; 1798 cpp->dispri = 1;
@@ -1825,7 +1825,7 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
1825 unmap_dma(i, ha); 1825 unmap_dma(i, ha);
1826 SCpnt->host_scribble = NULL; 1826 SCpnt->host_scribble = NULL;
1827 scmd_printk(KERN_INFO, SCpnt, 1827 scmd_printk(KERN_INFO, SCpnt,
1828 "qcomm, pid %ld, adapter busy.\n", SCpnt->pid); 1828 "qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
1829 return 1; 1829 return 1;
1830 } 1830 }
1831 1831
@@ -1841,13 +1841,13 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
1841 1841
1842 if (SCarg->host_scribble == NULL) { 1842 if (SCarg->host_scribble == NULL) {
1843 scmd_printk(KERN_INFO, SCarg, 1843 scmd_printk(KERN_INFO, SCarg,
1844 "abort, pid %ld inactive.\n", SCarg->pid); 1844 "abort, pid %ld inactive.\n", SCarg->serial_number);
1845 return SUCCESS; 1845 return SUCCESS;
1846 } 1846 }
1847 1847
1848 i = *(unsigned int *)SCarg->host_scribble; 1848 i = *(unsigned int *)SCarg->host_scribble;
1849 scmd_printk(KERN_WARNING, SCarg, 1849 scmd_printk(KERN_WARNING, SCarg,
1850 "abort, mbox %d, pid %ld.\n", i, SCarg->pid); 1850 "abort, mbox %d, pid %ld.\n", i, SCarg->serial_number);
1851 1851
1852 if (i >= shost->can_queue) 1852 if (i >= shost->can_queue)
1853 panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name); 1853 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 SCarg->host_scribble = NULL; 1892 SCarg->host_scribble = NULL;
1893 ha->cp_stat[i] = FREE; 1893 ha->cp_stat[i] = FREE;
1894 printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n", 1894 printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
1895 ha->board_name, i, SCarg->pid); 1895 ha->board_name, i, SCarg->serial_number);
1896 SCarg->scsi_done(SCarg); 1896 SCarg->scsi_done(SCarg);
1897 return SUCCESS; 1897 return SUCCESS;
1898 } 1898 }
@@ -1909,12 +1909,12 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
1909 struct hostdata *ha = (struct hostdata *)shost->hostdata; 1909 struct hostdata *ha = (struct hostdata *)shost->hostdata;
1910 1910
1911 scmd_printk(KERN_INFO, SCarg, 1911 scmd_printk(KERN_INFO, SCarg,
1912 "reset, enter, pid %ld.\n", SCarg->pid); 1912 "reset, enter, pid %ld.\n", SCarg->serial_number);
1913 1913
1914 spin_lock_irq(shost->host_lock); 1914 spin_lock_irq(shost->host_lock);
1915 1915
1916 if (SCarg->host_scribble == NULL) 1916 if (SCarg->host_scribble == NULL)
1917 printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->pid); 1917 printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->serial_number);
1918 1918
1919 if (ha->in_reset) { 1919 if (ha->in_reset) {
1920 printk("%s: reset, exit, already in reset.\n", ha->board_name); 1920 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 if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) { 1954 if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
1955 ha->cp_stat[i] = ABORTING; 1955 ha->cp_stat[i] = ABORTING;
1956 printk("%s: reset, mbox %d aborting, pid %ld.\n", 1956 printk("%s: reset, mbox %d aborting, pid %ld.\n",
1957 ha->board_name, i, SCpnt->pid); 1957 ha->board_name, i, SCpnt->serial_number);
1958 } 1958 }
1959 1959
1960 else { 1960 else {
1961 ha->cp_stat[i] = IN_RESET; 1961 ha->cp_stat[i] = IN_RESET;
1962 printk("%s: reset, mbox %d in reset, pid %ld.\n", 1962 printk("%s: reset, mbox %d in reset, pid %ld.\n",
1963 ha->board_name, i, SCpnt->pid); 1963 ha->board_name, i, SCpnt->serial_number);
1964 } 1964 }
1965 1965
1966 if (SCpnt->host_scribble == NULL) 1966 if (SCpnt->host_scribble == NULL)
@@ -2015,7 +2015,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2015 2015
2016 printk 2016 printk
2017 ("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n", 2017 ("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
2018 ha->board_name, i, SCpnt->pid); 2018 ha->board_name, i, SCpnt->serial_number);
2019 } 2019 }
2020 2020
2021 else if (ha->cp_stat[i] == ABORTING) { 2021 else if (ha->cp_stat[i] == ABORTING) {
@@ -2029,7 +2029,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2029 2029
2030 printk 2030 printk
2031 ("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n", 2031 ("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
2032 ha->board_name, i, SCpnt->pid); 2032 ha->board_name, i, SCpnt->serial_number);
2033 } 2033 }
2034 2034
2035 else 2035 else
@@ -2043,7 +2043,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2043 do_trace = 0; 2043 do_trace = 0;
2044 2044
2045 if (arg_done) 2045 if (arg_done)
2046 printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->pid); 2046 printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->serial_number);
2047 else 2047 else
2048 printk("%s: reset, exit.\n", ha->board_name); 2048 printk("%s: reset, exit.\n", ha->board_name);
2049 2049
@@ -2182,7 +2182,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
2182 cpp = &ha->cp[k]; 2182 cpp = &ha->cp[k];
2183 SCpnt = cpp->SCpnt; 2183 SCpnt = cpp->SCpnt;
2184 ll[n] = SCpnt->request->nr_sectors; 2184 ll[n] = SCpnt->request->nr_sectors;
2185 pl[n] = SCpnt->pid; 2185 pl[n] = SCpnt->serial_number;
2186 2186
2187 if (!n) 2187 if (!n)
2188 continue; 2188 continue;
@@ -2230,7 +2230,7 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
2230 "%s pid %ld mb %d fc %d nr %d sec %ld ns %ld" 2230 "%s pid %ld mb %d fc %d nr %d sec %ld ns %ld"
2231 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", 2231 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
2232 (ihdlr ? "ihdlr" : "qcomm"), 2232 (ihdlr ? "ihdlr" : "qcomm"),
2233 SCpnt->pid, k, flushcount, 2233 SCpnt->serial_number, k, flushcount,
2234 n_ready, SCpnt->request->sector, 2234 n_ready, SCpnt->request->sector,
2235 SCpnt->request->nr_sectors, cursec, YESNO(s), 2235 SCpnt->request->nr_sectors, cursec, YESNO(s),
2236 YESNO(r), YESNO(rev), YESNO(input_only), 2236 YESNO(r), YESNO(rev), YESNO(input_only),
@@ -2277,7 +2277,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec,
2277 "%s, pid %ld, mbox %d, adapter" 2277 "%s, pid %ld, mbox %d, adapter"
2278 " busy, will abort.\n", 2278 " busy, will abort.\n",
2279 (ihdlr ? "ihdlr" : "qcomm"), 2279 (ihdlr ? "ihdlr" : "qcomm"),
2280 SCpnt->pid, k); 2280 SCpnt->serial_number, k);
2281 ha->cp_stat[k] = ABORTING; 2281 ha->cp_stat[k] = ABORTING;
2282 continue; 2282 continue;
2283 } 2283 }
@@ -2391,11 +2391,11 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
2391 2391
2392 if (SCpnt->host_scribble == NULL) 2392 if (SCpnt->host_scribble == NULL)
2393 panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name, 2393 panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name,
2394 i, SCpnt->pid, SCpnt); 2394 i, SCpnt->serial_number, SCpnt);
2395 2395
2396 if (*(unsigned int *)SCpnt->host_scribble != i) 2396 if (*(unsigned int *)SCpnt->host_scribble != i)
2397 panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n", 2397 panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
2398 ha->board_name, i, SCpnt->pid, 2398 ha->board_name, i, SCpnt->serial_number,
2399 *(unsigned int *)SCpnt->host_scribble); 2399 *(unsigned int *)SCpnt->host_scribble);
2400 2400
2401 sync_dma(i, ha); 2401 sync_dma(i, ha);
@@ -2445,12 +2445,12 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
2445 "target_status 0x%x, sense key 0x%x.\n", 2445 "target_status 0x%x, sense key 0x%x.\n",
2446 ha->board_name, 2446 ha->board_name,
2447 SCpnt->device->channel, SCpnt->device->id, 2447 SCpnt->device->channel, SCpnt->device->id,
2448 SCpnt->device->lun, SCpnt->pid, 2448 SCpnt->device->lun, SCpnt->serial_number,
2449 spp->target_status, SCpnt->sense_buffer[2]); 2449 spp->target_status, SCpnt->sense_buffer[2]);
2450 2450
2451 ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0; 2451 ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
2452 2452
2453 if (ha->last_retried_pid == SCpnt->pid) 2453 if (ha->last_retried_pid == SCpnt->serial_number)
2454 ha->retries = 0; 2454 ha->retries = 0;
2455 2455
2456 break; 2456 break;
@@ -2485,7 +2485,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
2485#endif 2485#endif
2486 2486
2487 ha->retries++; 2487 ha->retries++;
2488 ha->last_retried_pid = SCpnt->pid; 2488 ha->last_retried_pid = SCpnt->serial_number;
2489 } else 2489 } else
2490 status = DID_ERROR << 16; 2490 status = DID_ERROR << 16;
2491 2491
@@ -2516,7 +2516,7 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
2516 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x," 2516 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"
2517 " pid %ld, reg 0x%x, count %d.\n", 2517 " pid %ld, reg 0x%x, count %d.\n",
2518 i, spp->adapter_status, spp->target_status, 2518 i, spp->adapter_status, spp->target_status,
2519 SCpnt->pid, reg, ha->iocount); 2519 SCpnt->serial_number, reg, ha->iocount);
2520 2520
2521 unmap_dma(i, ha); 2521 unmap_dma(i, ha);
2522 2522
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
index 73260e590f22..96180bb47e41 100644
--- a/drivers/scsi/eata_pio.c
+++ b/drivers/scsi/eata_pio.c
@@ -375,7 +375,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
375 375
376 DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, 376 DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
377 "eata_pio_queue pid %ld, y %d\n", 377 "eata_pio_queue pid %ld, y %d\n",
378 cmd->pid, y)); 378 cmd->serial_number, y));
379 379
380 cmd->scsi_done = (void *) done; 380 cmd->scsi_done = (void *) done;
381 381
@@ -420,7 +420,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
420 cmd->result = DID_BUS_BUSY << 16; 420 cmd->result = DID_BUS_BUSY << 16;
421 scmd_printk(KERN_NOTICE, cmd, 421 scmd_printk(KERN_NOTICE, cmd,
422 "eata_pio_queue pid %ld, HBA busy, " 422 "eata_pio_queue pid %ld, HBA busy, "
423 "returning DID_BUS_BUSY, done.\n", cmd->pid); 423 "returning DID_BUS_BUSY, done.\n", cmd->serial_number);
424 done(cmd); 424 done(cmd);
425 cp->status = FREE; 425 cp->status = FREE;
426 return 0; 426 return 0;
@@ -435,7 +435,7 @@ static int eata_pio_queue(struct scsi_cmnd *cmd,
435 435
436 DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, 436 DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd,
437 "Queued base %#.4lx pid: %ld " 437 "Queued base %#.4lx pid: %ld "
438 "slot %d irq %d\n", sh->base, cmd->pid, y, sh->irq)); 438 "slot %d irq %d\n", sh->base, cmd->serial_number, y, sh->irq));
439 439
440 return 0; 440 return 0;
441} 441}
@@ -446,7 +446,7 @@ static int eata_pio_abort(struct scsi_cmnd *cmd)
446 446
447 DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, 447 DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
448 "eata_pio_abort called pid: %ld\n", 448 "eata_pio_abort called pid: %ld\n",
449 cmd->pid)); 449 cmd->serial_number));
450 450
451 while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY) 451 while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY)
452 if (--loop == 0) { 452 if (--loop == 0) {
@@ -482,7 +482,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
482 482
483 DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, 483 DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd,
484 "eata_pio_reset called pid:%ld\n", 484 "eata_pio_reset called pid:%ld\n",
485 cmd->pid)); 485 cmd->serial_number));
486 486
487 spin_lock_irq(host->host_lock); 487 spin_lock_irq(host->host_lock);
488 488
@@ -501,7 +501,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
501 501
502 sp = HD(cmd)->ccb[x].cmd; 502 sp = HD(cmd)->ccb[x].cmd;
503 HD(cmd)->ccb[x].status = RESET; 503 HD(cmd)->ccb[x].status = RESET;
504 printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->pid); 504 printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->serial_number);
505 505
506 if (sp == NULL) 506 if (sp == NULL)
507 panic("eata_pio_reset: slot %d, sp==NULL.\n", x); 507 panic("eata_pio_reset: slot %d, sp==NULL.\n", x);
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index 312190a69389..ab7cbf3449ce 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -343,7 +343,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
343 instance = cmd->device->host; 343 instance = cmd->device->host;
344 hostdata = (struct IN2000_hostdata *) instance->hostdata; 344 hostdata = (struct IN2000_hostdata *) instance->hostdata;
345 345
346 DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->pid)) 346 DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->serial_number))
347 347
348/* Set up a few fields in the Scsi_Cmnd structure for our own use: 348/* Set up a few fields in the Scsi_Cmnd structure for our own use:
349 * - host_scribble is the pointer to the next cmd in the input queue 349 * - 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 427
428 in2000_execute(cmd->device->host); 428 in2000_execute(cmd->device->host);
429 429
430 DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->pid)) 430 DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->serial_number))
431 return 0; 431 return 0;
432} 432}
433 433
@@ -703,7 +703,7 @@ static void in2000_execute(struct Scsi_Host *instance)
703 * to search the input_Q again... 703 * to search the input_Q again...
704 */ 704 */
705 705
706 DB(DB_EXECUTE, printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->pid)) 706 DB(DB_EXECUTE, printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->serial_number))
707 707
708} 708}
709 709
@@ -1147,7 +1147,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1147 case CSR_XFER_DONE | PHS_COMMAND: 1147 case CSR_XFER_DONE | PHS_COMMAND:
1148 case CSR_UNEXP | PHS_COMMAND: 1148 case CSR_UNEXP | PHS_COMMAND:
1149 case CSR_SRV_REQ | PHS_COMMAND: 1149 case CSR_SRV_REQ | PHS_COMMAND:
1150 DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->pid)) 1150 DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->serial_number))
1151 transfer_pio(cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, hostdata); 1151 transfer_pio(cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, hostdata);
1152 hostdata->state = S_CONNECTED; 1152 hostdata->state = S_CONNECTED;
1153 break; 1153 break;
@@ -1189,7 +1189,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1189 switch (msg) { 1189 switch (msg) {
1190 1190
1191 case COMMAND_COMPLETE: 1191 case COMMAND_COMPLETE:
1192 DB(DB_INTR, printk("CCMP-%ld", cmd->pid)) 1192 DB(DB_INTR, printk("CCMP-%ld", cmd->serial_number))
1193 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK); 1193 write_3393_cmd(hostdata, WD_CMD_NEGATE_ACK);
1194 hostdata->state = S_PRE_CMP_DISC; 1194 hostdata->state = S_PRE_CMP_DISC;
1195 break; 1195 break;
@@ -1327,7 +1327,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1327 1327
1328 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); 1328 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER);
1329 if (phs == 0x60) { 1329 if (phs == 0x60) {
1330 DB(DB_INTR, printk("SX-DONE-%ld", cmd->pid)) 1330 DB(DB_INTR, printk("SX-DONE-%ld", cmd->serial_number))
1331 cmd->SCp.Message = COMMAND_COMPLETE; 1331 cmd->SCp.Message = COMMAND_COMPLETE;
1332 lun = read_3393(hostdata, WD_TARGET_LUN); 1332 lun = read_3393(hostdata, WD_TARGET_LUN);
1333 DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) 1333 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 1348
1349 in2000_execute(instance); 1349 in2000_execute(instance);
1350 } else { 1350 } else {
1351 printk("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", asr, sr, phs, cmd->pid); 1351 printk("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", asr, sr, phs, cmd->serial_number);
1352 } 1352 }
1353 break; 1353 break;
1354 1354
@@ -1415,7 +1415,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1415 spin_unlock_irqrestore(instance->host_lock, flags); 1415 spin_unlock_irqrestore(instance->host_lock, flags);
1416 return IRQ_HANDLED; 1416 return IRQ_HANDLED;
1417 } 1417 }
1418 DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->pid)) 1418 DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number))
1419 hostdata->connected = NULL; 1419 hostdata->connected = NULL;
1420 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); 1420 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
1421 hostdata->state = S_UNCONNECTED; 1421 hostdata->state = S_UNCONNECTED;
@@ -1440,7 +1440,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1440 */ 1440 */
1441 1441
1442 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER); 1442 write_3393(hostdata, WD_SOURCE_ID, SRCID_ER);
1443 DB(DB_INTR, printk("DISC-%ld", cmd->pid)) 1443 DB(DB_INTR, printk("DISC-%ld", cmd->serial_number))
1444 if (cmd == NULL) { 1444 if (cmd == NULL) {
1445 printk(" - Already disconnected! "); 1445 printk(" - Already disconnected! ");
1446 hostdata->state = S_UNCONNECTED; 1446 hostdata->state = S_UNCONNECTED;
@@ -1573,7 +1573,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
1573 } else 1573 } else
1574 hostdata->state = S_CONNECTED; 1574 hostdata->state = S_CONNECTED;
1575 1575
1576 DB(DB_INTR, printk("-%ld", cmd->pid)) 1576 DB(DB_INTR, printk("-%ld", cmd->serial_number))
1577 break; 1577 break;
1578 1578
1579 default: 1579 default:
@@ -1702,7 +1702,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
1702 prev->host_scribble = cmd->host_scribble; 1702 prev->host_scribble = cmd->host_scribble;
1703 cmd->host_scribble = NULL; 1703 cmd->host_scribble = NULL;
1704 cmd->result = DID_ABORT << 16; 1704 cmd->result = DID_ABORT << 16;
1705 printk(KERN_WARNING "scsi%d: Abort - removing command %ld from input_Q. ", instance->host_no, cmd->pid); 1705 printk(KERN_WARNING "scsi%d: Abort - removing command %ld from input_Q. ", instance->host_no, cmd->serial_number);
1706 cmd->scsi_done(cmd); 1706 cmd->scsi_done(cmd);
1707 return SUCCESS; 1707 return SUCCESS;
1708 } 1708 }
@@ -1723,7 +1723,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
1723 1723
1724 if (hostdata->connected == cmd) { 1724 if (hostdata->connected == cmd) {
1725 1725
1726 printk(KERN_WARNING "scsi%d: Aborting connected command %ld - ", instance->host_no, cmd->pid); 1726 printk(KERN_WARNING "scsi%d: Aborting connected command %ld - ", instance->host_no, cmd->serial_number);
1727 1727
1728 printk("sending wd33c93 ABORT command - "); 1728 printk("sending wd33c93 ABORT command - ");
1729 write_3393(hostdata, WD_CONTROL, CTRL_IDI | CTRL_EDI | CTRL_POLLED); 1729 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 strcat(bp, "\nconnected: "); 2268 strcat(bp, "\nconnected: ");
2269 if (hd->connected) { 2269 if (hd->connected) {
2270 cmd = (Scsi_Cmnd *) hd->connected; 2270 cmd = (Scsi_Cmnd *) hd->connected;
2271 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2271 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2272 strcat(bp, tbuf); 2272 strcat(bp, tbuf);
2273 } 2273 }
2274 } 2274 }
@@ -2276,7 +2276,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
2276 strcat(bp, "\ninput_Q: "); 2276 strcat(bp, "\ninput_Q: ");
2277 cmd = (Scsi_Cmnd *) hd->input_Q; 2277 cmd = (Scsi_Cmnd *) hd->input_Q;
2278 while (cmd) { 2278 while (cmd) {
2279 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2279 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2280 strcat(bp, tbuf); 2280 strcat(bp, tbuf);
2281 cmd = (Scsi_Cmnd *) cmd->host_scribble; 2281 cmd = (Scsi_Cmnd *) cmd->host_scribble;
2282 } 2282 }
@@ -2285,7 +2285,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
2285 strcat(bp, "\ndisconnected_Q:"); 2285 strcat(bp, "\ndisconnected_Q:");
2286 cmd = (Scsi_Cmnd *) hd->disconnected_Q; 2286 cmd = (Scsi_Cmnd *) hd->disconnected_Q;
2287 while (cmd) { 2287 while (cmd) {
2288 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2288 sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2289 strcat(bp, tbuf); 2289 strcat(bp, tbuf);
2290 cmd = (Scsi_Cmnd *) cmd->host_scribble; 2290 cmd = (Scsi_Cmnd *) cmd->host_scribble;
2291 } 2291 }
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 91fa66c3ec98..016c462bc771 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -8143,12 +8143,7 @@ static int ncr53c8xx_abort(struct scsi_cmnd *cmd)
8143 unsigned long flags; 8143 unsigned long flags;
8144 struct scsi_cmnd *done_list; 8144 struct scsi_cmnd *done_list;
8145 8145
8146#if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS 8146 printk("ncr53c8xx_abort: command pid %lu\n", cmd->serial_number);
8147 printk("ncr53c8xx_abort: pid=%lu serial_number=%ld\n",
8148 cmd->pid, cmd->serial_number);
8149#else
8150 printk("ncr53c8xx_abort: command pid %lu\n", cmd->pid);
8151#endif
8152 8147
8153 NCR_LOCK_NCB(np, flags); 8148 NCR_LOCK_NCB(np, flags);
8154 8149
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 54d8bdf86852..fba8aa8a81b5 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -4086,7 +4086,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd)
4086 } */ 4086 } */
4087 printk(" tag=%d, transfersize=0x%x \n", 4087 printk(" tag=%d, transfersize=0x%x \n",
4088 cmd->tag, cmd->transfersize); 4088 cmd->tag, cmd->transfersize);
4089 printk(" Pid=%li, SP=0x%p\n", cmd->pid, CMD_SP(cmd)); 4089 printk(" Pid=%li, SP=0x%p\n", cmd->serial_number, CMD_SP(cmd));
4090 printk(" underflow size = 0x%x, direction=0x%x\n", 4090 printk(" underflow size = 0x%x, direction=0x%x\n",
4091 cmd->underflow, cmd->sc_data_direction); 4091 cmd->underflow, cmd->sc_data_direction);
4092} 4092}
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index a5de1a829a76..07a7c2a70a3f 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -442,7 +442,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
442#endif 442#endif
443 443
444/* 444/*
445 * Assign a serial number and pid to the request for error recovery 445 * Assign a serial number to the request for error recovery
446 * and debugging purposes. Protected by the Host_Lock of host. 446 * and debugging purposes. Protected by the Host_Lock of host.
447 */ 447 */
448static inline void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd *cmd) 448static 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 cmd->serial_number = host->cmd_serial_number++; 450 cmd->serial_number = host->cmd_serial_number++;
451 if (cmd->serial_number == 0) 451 if (cmd->serial_number == 0)
452 cmd->serial_number = host->cmd_serial_number++; 452 cmd->serial_number = host->cmd_serial_number++;
453
454 cmd->pid = host->cmd_pid++;
455 if (cmd->pid == 0)
456 cmd->pid = host->cmd_pid++;
457} 453}
458 454
459/* 455/*
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index c05d020bf926..44e6721ddea6 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1681,12 +1681,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
1681 1681
1682 init_timer(&scmd->eh_timeout); 1682 init_timer(&scmd->eh_timeout);
1683 1683
1684 /*
1685 * Sometimes the command can get back into the timer chain,
1686 * so use the pid as an identifier.
1687 */
1688 scmd->pid = 0;
1689
1690 spin_lock_irqsave(shost->host_lock, flags); 1684 spin_lock_irqsave(shost->host_lock, flags);
1691 shost->tmf_in_progress = 1; 1685 shost->tmf_in_progress = 1;
1692 spin_unlock_irqrestore(shost->host_lock, flags); 1686 spin_unlock_irqrestore(shost->host_lock, flags);
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index 5db1520f8ba9..5c72ca31a47a 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -567,12 +567,12 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr
567 pDCB->TagMask |= 1 << tag[1]; 567 pDCB->TagMask |= 1 << tag[1];
568 pSRB->TagNumber = tag[1]; 568 pSRB->TagNumber = tag[1];
569 DC390_write8(ScsiFifo, tag[1]); 569 DC390_write8(ScsiFifo, tag[1]);
570 DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->pid, pSRB, tag[1])); 570 DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->serial_number, pSRB, tag[1]));
571 cmd = SEL_W_ATN3; 571 cmd = SEL_W_ATN3;
572 } else { 572 } else {
573 /* No TagQ */ 573 /* No TagQ */
574//no_tag: 574//no_tag:
575 DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->pid, pSRB)); 575 DEBUG1(printk(KERN_INFO "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->serial_number, pSRB));
576 } 576 }
577 577
578 pSRB->SRBState = SRB_START_; 578 pSRB->SRBState = SRB_START_;
@@ -623,7 +623,7 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr
623 { 623 {
624 dc390_freetag (pDCB, pSRB); 624 dc390_freetag (pDCB, pSRB);
625 DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n", 625 DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n",
626 scmd->pid, scmd->device->id, scmd->device->lun)); 626 scmd->serial_number, scmd->device->id, scmd->device->lun));
627 pSRB->SRBState = SRB_READY; 627 pSRB->SRBState = SRB_READY;
628 //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); 628 //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
629 pACB->SelLost++; 629 pACB->SelLost++;
@@ -1708,7 +1708,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
1708 status = pSRB->TargetStatus; 1708 status = pSRB->TargetStatus;
1709 1709
1710 DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\ 1710 DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\
1711 pSRB, pcmd->pid)); 1711 pSRB, pcmd->serial_number));
1712 if(pSRB->SRBFlag & AUTO_REQSENSE) 1712 if(pSRB->SRBFlag & AUTO_REQSENSE)
1713 { /* Last command was a Request Sense */ 1713 { /* Last command was a Request Sense */
1714 pSRB->SRBFlag &= ~AUTO_REQSENSE; 1714 pSRB->SRBFlag &= ~AUTO_REQSENSE;
@@ -1729,7 +1729,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
1729 } else { 1729 } else {
1730 SET_RES_DRV(pcmd->result, DRIVER_SENSE); 1730 SET_RES_DRV(pcmd->result, DRIVER_SENSE);
1731 //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8); 1731 //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8);
1732 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1732 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->serial_number, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1733 pSRB->TotalXferredLen = 0; 1733 pSRB->TotalXferredLen = 0;
1734 SET_RES_DID(pcmd->result, DID_SOFT_ERROR); 1734 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1735 } 1735 }
@@ -1749,7 +1749,7 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
1749 else if (status == SAM_STAT_TASK_SET_FULL) 1749 else if (status == SAM_STAT_TASK_SET_FULL)
1750 { 1750 {
1751 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1); 1751 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
1752 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1752 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->serial_number, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1753 pSRB->TotalXferredLen = 0; 1753 pSRB->TotalXferredLen = 0;
1754 SET_RES_DID(pcmd->result, DID_SOFT_ERROR); 1754 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
1755 } 1755 }
@@ -1803,7 +1803,7 @@ cmd_done:
1803 /* Add to free list */ 1803 /* Add to free list */
1804 dc390_Free_insert (pACB, pSRB); 1804 dc390_Free_insert (pACB, pSRB);
1805 1805
1806 DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid)); 1806 DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->serial_number));
1807 pcmd->scsi_done (pcmd); 1807 pcmd->scsi_done (pcmd);
1808 1808
1809 return; 1809 return;
@@ -1998,7 +1998,7 @@ static int DC390_abort(struct scsi_cmnd *cmd)
1998 struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; 1998 struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata;
1999 1999
2000 scmd_printk(KERN_WARNING, cmd, 2000 scmd_printk(KERN_WARNING, cmd,
2001 "DC390: Abort command (pid %li)\n", cmd->pid); 2001 "DC390: Abort command (pid %li)\n", cmd->serial_number);
2002 2002
2003 /* abort() is too stupid for already sent commands at the moment. 2003 /* abort() is too stupid for already sent commands at the moment.
2004 * If it's called we are in trouble anyway, so let's dump some info 2004 * 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 dc390_dumpinfo(pACB, pDCB, NULL); 2006 dc390_dumpinfo(pACB, pDCB, NULL);
2007 2007
2008 pDCB->DCBFlag |= ABORT_DEV_; 2008 pDCB->DCBFlag |= ABORT_DEV_;
2009 printk(KERN_INFO "DC390: Aborted pid %li\n", cmd->pid); 2009 printk(KERN_INFO "DC390: Aborted pid %li\n", cmd->serial_number);
2010 2010
2011 return FAILED; 2011 return FAILED;
2012} 2012}
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
index 9e8232a1f169..fc9f51818e8f 100644
--- a/drivers/scsi/u14-34f.c
+++ b/drivers/scsi/u14-34f.c
@@ -1254,7 +1254,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
1254 1254
1255 if (SCpnt->host_scribble) 1255 if (SCpnt->host_scribble)
1256 panic("%s: qcomm, pid %ld, SCpnt %p already active.\n", 1256 panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
1257 BN(j), SCpnt->pid, SCpnt); 1257 BN(j), SCpnt->serial_number, SCpnt);
1258 1258
1259 /* i is the mailbox number, look for the first free mailbox 1259 /* i is the mailbox number, look for the first free mailbox
1260 starting from last_cp_used */ 1260 starting from last_cp_used */
@@ -1285,7 +1285,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
1285 1285
1286 if (do_trace) printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n", 1286 if (do_trace) printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n",
1287 BN(j), i, SCpnt->device->channel, SCpnt->device->id, 1287 BN(j), i, SCpnt->device->channel, SCpnt->device->id,
1288 SCpnt->device->lun, SCpnt->pid); 1288 SCpnt->device->lun, SCpnt->serial_number);
1289 1289
1290 cpp->opcode = OP_SCSI; 1290 cpp->opcode = OP_SCSI;
1291 cpp->channel = SCpnt->device->channel; 1291 cpp->channel = SCpnt->device->channel;
@@ -1312,7 +1312,7 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs
1312 unmap_dma(i, j); 1312 unmap_dma(i, j);
1313 SCpnt->host_scribble = NULL; 1313 SCpnt->host_scribble = NULL;
1314 scmd_printk(KERN_INFO, SCpnt, 1314 scmd_printk(KERN_INFO, SCpnt,
1315 "qcomm, pid %ld, adapter busy.\n", SCpnt->pid); 1315 "qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
1316 return 1; 1316 return 1;
1317 } 1317 }
1318 1318
@@ -1333,13 +1333,13 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) {
1333 1333
1334 if (SCarg->host_scribble == NULL) { 1334 if (SCarg->host_scribble == NULL) {
1335 scmd_printk(KERN_INFO, SCarg, "abort, pid %ld inactive.\n", 1335 scmd_printk(KERN_INFO, SCarg, "abort, pid %ld inactive.\n",
1336 SCarg->pid); 1336 SCarg->serial_number);
1337 return SUCCESS; 1337 return SUCCESS;
1338 } 1338 }
1339 1339
1340 i = *(unsigned int *)SCarg->host_scribble; 1340 i = *(unsigned int *)SCarg->host_scribble;
1341 scmd_printk(KERN_INFO, SCarg, "abort, mbox %d, pid %ld.\n", 1341 scmd_printk(KERN_INFO, SCarg, "abort, mbox %d, pid %ld.\n",
1342 i, SCarg->pid); 1342 i, SCarg->serial_number);
1343 1343
1344 if (i >= sh[j]->can_queue) 1344 if (i >= sh[j]->can_queue)
1345 panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j)); 1345 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 SCarg->host_scribble = NULL; 1383 SCarg->host_scribble = NULL;
1384 HD(j)->cp_stat[i] = FREE; 1384 HD(j)->cp_stat[i] = FREE;
1385 printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n", 1385 printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
1386 BN(j), i, SCarg->pid); 1386 BN(j), i, SCarg->serial_number);
1387 SCarg->scsi_done(SCarg); 1387 SCarg->scsi_done(SCarg);
1388 return SUCCESS; 1388 return SUCCESS;
1389 } 1389 }
@@ -1397,12 +1397,12 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
1397 struct scsi_cmnd *SCpnt; 1397 struct scsi_cmnd *SCpnt;
1398 1398
1399 j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; 1399 j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number;
1400 scmd_printk(KERN_INFO, SCarg, "reset, enter, pid %ld.\n", SCarg->pid); 1400 scmd_printk(KERN_INFO, SCarg, "reset, enter, pid %ld.\n", SCarg->serial_number);
1401 1401
1402 spin_lock_irq(sh[j]->host_lock); 1402 spin_lock_irq(sh[j]->host_lock);
1403 1403
1404 if (SCarg->host_scribble == NULL) 1404 if (SCarg->host_scribble == NULL)
1405 printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid); 1405 printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->serial_number);
1406 1406
1407 if (HD(j)->in_reset) { 1407 if (HD(j)->in_reset) {
1408 printk("%s: reset, exit, already in reset.\n", BN(j)); 1408 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 if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) { 1440 if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) {
1441 HD(j)->cp_stat[i] = ABORTING; 1441 HD(j)->cp_stat[i] = ABORTING;
1442 printk("%s: reset, mbox %d aborting, pid %ld.\n", 1442 printk("%s: reset, mbox %d aborting, pid %ld.\n",
1443 BN(j), i, SCpnt->pid); 1443 BN(j), i, SCpnt->serial_number);
1444 } 1444 }
1445 1445
1446 else { 1446 else {
1447 HD(j)->cp_stat[i] = IN_RESET; 1447 HD(j)->cp_stat[i] = IN_RESET;
1448 printk("%s: reset, mbox %d in reset, pid %ld.\n", 1448 printk("%s: reset, mbox %d in reset, pid %ld.\n",
1449 BN(j), i, SCpnt->pid); 1449 BN(j), i, SCpnt->serial_number);
1450 } 1450 }
1451 1451
1452 if (SCpnt->host_scribble == NULL) 1452 if (SCpnt->host_scribble == NULL)
@@ -1495,7 +1495,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
1495 HD(j)->cp_stat[i] = LOCKED; 1495 HD(j)->cp_stat[i] = LOCKED;
1496 1496
1497 printk("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n", 1497 printk("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
1498 BN(j), i, SCpnt->pid); 1498 BN(j), i, SCpnt->serial_number);
1499 } 1499 }
1500 1500
1501 else if (HD(j)->cp_stat[i] == ABORTING) { 1501 else if (HD(j)->cp_stat[i] == ABORTING) {
@@ -1508,7 +1508,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
1508 HD(j)->cp_stat[i] = FREE; 1508 HD(j)->cp_stat[i] = FREE;
1509 1509
1510 printk("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n", 1510 printk("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
1511 BN(j), i, SCpnt->pid); 1511 BN(j), i, SCpnt->serial_number);
1512 } 1512 }
1513 1513
1514 else 1514 else
@@ -1522,7 +1522,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
1522 HD(j)->in_reset = FALSE; 1522 HD(j)->in_reset = FALSE;
1523 do_trace = FALSE; 1523 do_trace = FALSE;
1524 1524
1525 if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid); 1525 if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->serial_number);
1526 else printk("%s: reset, exit.\n", BN(j)); 1526 else printk("%s: reset, exit.\n", BN(j));
1527 1527
1528 spin_unlock_irq(sh[j]->host_lock); 1528 spin_unlock_irq(sh[j]->host_lock);
@@ -1639,7 +1639,7 @@ static int reorder(unsigned int j, unsigned long cursec,
1639 1639
1640 if (!input_only) for (n = 0; n < n_ready; n++) { 1640 if (!input_only) for (n = 0; n < n_ready; n++) {
1641 k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; 1641 k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
1642 ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->pid; 1642 ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->serial_number;
1643 1643
1644 if (!n) continue; 1644 if (!n) continue;
1645 1645
@@ -1666,7 +1666,7 @@ static int reorder(unsigned int j, unsigned long cursec,
1666 printk("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"\ 1666 printk("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"\
1667 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", 1667 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
1668 (ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target, 1668 (ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target,
1669 SCpnt->lun, SCpnt->pid, k, flushcount, n_ready, 1669 SCpnt->lun, SCpnt->serial_number, k, flushcount, n_ready,
1670 SCpnt->request->sector, SCpnt->request->nr_sectors, cursec, 1670 SCpnt->request->sector, SCpnt->request->nr_sectors, cursec,
1671 YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only), 1671 YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only),
1672 YESNO(overlap), cpp->xdir); 1672 YESNO(overlap), cpp->xdir);
@@ -1703,7 +1703,7 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned in
1703 scmd_printk(KERN_INFO, SCpnt, 1703 scmd_printk(KERN_INFO, SCpnt,
1704 "%s, pid %ld, mbox %d, adapter" 1704 "%s, pid %ld, mbox %d, adapter"
1705 " busy, will abort.\n", (ihdlr ? "ihdlr" : "qcomm"), 1705 " busy, will abort.\n", (ihdlr ? "ihdlr" : "qcomm"),
1706 SCpnt->pid, k); 1706 SCpnt->serial_number, k);
1707 HD(j)->cp_stat[k] = ABORTING; 1707 HD(j)->cp_stat[k] = ABORTING;
1708 continue; 1708 continue;
1709 } 1709 }
@@ -1787,11 +1787,11 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
1787 1787
1788 if (SCpnt->host_scribble == NULL) 1788 if (SCpnt->host_scribble == NULL)
1789 panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", BN(j), i, 1789 panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", BN(j), i,
1790 SCpnt->pid, SCpnt); 1790 SCpnt->serial_number, SCpnt);
1791 1791
1792 if (*(unsigned int *)SCpnt->host_scribble != i) 1792 if (*(unsigned int *)SCpnt->host_scribble != i)
1793 panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n", 1793 panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
1794 BN(j), i, SCpnt->pid, *(unsigned int *)SCpnt->host_scribble); 1794 BN(j), i, SCpnt->serial_number, *(unsigned int *)SCpnt->host_scribble);
1795 1795
1796 sync_dma(i, j); 1796 sync_dma(i, j);
1797 1797
@@ -1835,12 +1835,12 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
1835 (SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) 1835 (SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
1836 scmd_printk(KERN_INFO, SCpnt, 1836 scmd_printk(KERN_INFO, SCpnt,
1837 "ihdlr, pid %ld, target_status 0x%x, sense key 0x%x.\n", 1837 "ihdlr, pid %ld, target_status 0x%x, sense key 0x%x.\n",
1838 SCpnt->pid, spp->target_status, 1838 SCpnt->serial_number, spp->target_status,
1839 SCpnt->sense_buffer[2]); 1839 SCpnt->sense_buffer[2]);
1840 1840
1841 HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] = 0; 1841 HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] = 0;
1842 1842
1843 if (HD(j)->last_retried_pid == SCpnt->pid) HD(j)->retries = 0; 1843 if (HD(j)->last_retried_pid == SCpnt->serial_number) HD(j)->retries = 0;
1844 1844
1845 break; 1845 break;
1846 case ASST: /* Selection Time Out */ 1846 case ASST: /* Selection Time Out */
@@ -1877,7 +1877,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
1877#endif 1877#endif
1878 1878
1879 HD(j)->retries++; 1879 HD(j)->retries++;
1880 HD(j)->last_retried_pid = SCpnt->pid; 1880 HD(j)->last_retried_pid = SCpnt->serial_number;
1881 } 1881 }
1882 else 1882 else
1883 status = DID_ERROR << 16; 1883 status = DID_ERROR << 16;
@@ -1907,7 +1907,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) {
1907#endif 1907#endif
1908 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"\ 1908 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"\
1909 " pid %ld, reg 0x%x, count %d.\n", 1909 " pid %ld, reg 0x%x, count %d.\n",
1910 i, spp->adapter_status, spp->target_status, SCpnt->pid, 1910 i, spp->adapter_status, spp->target_status, SCpnt->serial_number,
1911 reg, HD(j)->iocount); 1911 reg, HD(j)->iocount);
1912 1912
1913 unmap_dma(i, j); 1913 unmap_dma(i, j);
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index b92ff047af38..0e8e642fd3b0 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -381,7 +381,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
381 hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; 381 hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata;
382 382
383 DB(DB_QUEUE_COMMAND, 383 DB(DB_QUEUE_COMMAND,
384 printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->pid)) 384 printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->serial_number))
385 385
386/* Set up a few fields in the scsi_cmnd structure for our own use: 386/* Set up a few fields in the scsi_cmnd structure for our own use:
387 * - host_scribble is the pointer to the next cmd in the input queue 387 * - host_scribble is the pointer to the next cmd in the input queue
@@ -463,7 +463,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
463 463
464 wd33c93_execute(cmd->device->host); 464 wd33c93_execute(cmd->device->host);
465 465
466 DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->pid)) 466 DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->serial_number))
467 467
468 spin_unlock_irq(&hostdata->lock); 468 spin_unlock_irq(&hostdata->lock);
469 return 0; 469 return 0;
@@ -686,7 +686,7 @@ wd33c93_execute(struct Scsi_Host *instance)
686 */ 686 */
687 687
688 DB(DB_EXECUTE, 688 DB(DB_EXECUTE,
689 printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->pid)) 689 printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->serial_number))
690} 690}
691 691
692static void 692static void
@@ -963,7 +963,7 @@ wd33c93_intr(struct Scsi_Host *instance)
963 case CSR_XFER_DONE | PHS_COMMAND: 963 case CSR_XFER_DONE | PHS_COMMAND:
964 case CSR_UNEXP | PHS_COMMAND: 964 case CSR_UNEXP | PHS_COMMAND:
965 case CSR_SRV_REQ | PHS_COMMAND: 965 case CSR_SRV_REQ | PHS_COMMAND:
966 DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->pid)) 966 DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->serial_number))
967 transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, 967 transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR,
968 hostdata); 968 hostdata);
969 hostdata->state = S_CONNECTED; 969 hostdata->state = S_CONNECTED;
@@ -1007,7 +1007,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1007 switch (msg) { 1007 switch (msg) {
1008 1008
1009 case COMMAND_COMPLETE: 1009 case COMMAND_COMPLETE:
1010 DB(DB_INTR, printk("CCMP-%ld", cmd->pid)) 1010 DB(DB_INTR, printk("CCMP-%ld", cmd->serial_number))
1011 write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK); 1011 write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK);
1012 hostdata->state = S_PRE_CMP_DISC; 1012 hostdata->state = S_PRE_CMP_DISC;
1013 break; 1013 break;
@@ -1174,7 +1174,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1174 1174
1175 write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); 1175 write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
1176 if (phs == 0x60) { 1176 if (phs == 0x60) {
1177 DB(DB_INTR, printk("SX-DONE-%ld", cmd->pid)) 1177 DB(DB_INTR, printk("SX-DONE-%ld", cmd->serial_number))
1178 cmd->SCp.Message = COMMAND_COMPLETE; 1178 cmd->SCp.Message = COMMAND_COMPLETE;
1179 lun = read_wd33c93(regs, WD_TARGET_LUN); 1179 lun = read_wd33c93(regs, WD_TARGET_LUN);
1180 DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) 1180 DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun))
@@ -1201,7 +1201,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1201 } else { 1201 } else {
1202 printk 1202 printk
1203 ("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", 1203 ("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---",
1204 asr, sr, phs, cmd->pid); 1204 asr, sr, phs, cmd->serial_number);
1205 spin_unlock_irqrestore(&hostdata->lock, flags); 1205 spin_unlock_irqrestore(&hostdata->lock, flags);
1206 } 1206 }
1207 break; 1207 break;
@@ -1266,7 +1266,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1266 spin_unlock_irqrestore(&hostdata->lock, flags); 1266 spin_unlock_irqrestore(&hostdata->lock, flags);
1267 return; 1267 return;
1268 } 1268 }
1269 DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->pid)) 1269 DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number))
1270 hostdata->connected = NULL; 1270 hostdata->connected = NULL;
1271 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); 1271 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
1272 hostdata->state = S_UNCONNECTED; 1272 hostdata->state = S_UNCONNECTED;
@@ -1292,7 +1292,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1292 */ 1292 */
1293 1293
1294 write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); 1294 write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
1295 DB(DB_INTR, printk("DISC-%ld", cmd->pid)) 1295 DB(DB_INTR, printk("DISC-%ld", cmd->serial_number))
1296 if (cmd == NULL) { 1296 if (cmd == NULL) {
1297 printk(" - Already disconnected! "); 1297 printk(" - Already disconnected! ");
1298 hostdata->state = S_UNCONNECTED; 1298 hostdata->state = S_UNCONNECTED;
@@ -1491,7 +1491,7 @@ wd33c93_intr(struct Scsi_Host *instance)
1491 } else 1491 } else
1492 hostdata->state = S_CONNECTED; 1492 hostdata->state = S_CONNECTED;
1493 1493
1494 DB(DB_INTR, printk("-%ld", cmd->pid)) 1494 DB(DB_INTR, printk("-%ld", cmd->serial_number))
1495 spin_unlock_irqrestore(&hostdata->lock, flags); 1495 spin_unlock_irqrestore(&hostdata->lock, flags);
1496 break; 1496 break;
1497 1497
@@ -1638,7 +1638,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
1638 cmd->result = DID_ABORT << 16; 1638 cmd->result = DID_ABORT << 16;
1639 printk 1639 printk
1640 ("scsi%d: Abort - removing command %ld from input_Q. ", 1640 ("scsi%d: Abort - removing command %ld from input_Q. ",
1641 instance->host_no, cmd->pid); 1641 instance->host_no, cmd->serial_number);
1642 enable_irq(cmd->device->host->irq); 1642 enable_irq(cmd->device->host->irq);
1643 cmd->scsi_done(cmd); 1643 cmd->scsi_done(cmd);
1644 return SUCCESS; 1644 return SUCCESS;
@@ -1663,7 +1663,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
1663 unsigned long timeout; 1663 unsigned long timeout;
1664 1664
1665 printk("scsi%d: Aborting connected command %ld - ", 1665 printk("scsi%d: Aborting connected command %ld - ",
1666 instance->host_no, cmd->pid); 1666 instance->host_no, cmd->serial_number);
1667 1667
1668 printk("stopping DMA - "); 1668 printk("stopping DMA - ");
1669 if (hostdata->dma == D_DMA_RUNNING) { 1669 if (hostdata->dma == D_DMA_RUNNING) {
@@ -1730,7 +1730,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
1730 if (tmp == cmd) { 1730 if (tmp == cmd) {
1731 printk 1731 printk
1732 ("scsi%d: Abort - command %ld found on disconnected_Q - ", 1732 ("scsi%d: Abort - command %ld found on disconnected_Q - ",
1733 instance->host_no, cmd->pid); 1733 instance->host_no, cmd->serial_number);
1734 printk("Abort SNOOZE. "); 1734 printk("Abort SNOOZE. ");
1735 enable_irq(cmd->device->host->irq); 1735 enable_irq(cmd->device->host->irq);
1736 return FAILED; 1736 return FAILED;
@@ -2184,7 +2184,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
2184 if (hd->connected) { 2184 if (hd->connected) {
2185 cmd = (struct scsi_cmnd *) hd->connected; 2185 cmd = (struct scsi_cmnd *) hd->connected;
2186 sprintf(tbuf, " %ld-%d:%d(%02x)", 2186 sprintf(tbuf, " %ld-%d:%d(%02x)",
2187 cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2187 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2188 strcat(bp, tbuf); 2188 strcat(bp, tbuf);
2189 } 2189 }
2190 } 2190 }
@@ -2193,7 +2193,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
2193 cmd = (struct scsi_cmnd *) hd->input_Q; 2193 cmd = (struct scsi_cmnd *) hd->input_Q;
2194 while (cmd) { 2194 while (cmd) {
2195 sprintf(tbuf, " %ld-%d:%d(%02x)", 2195 sprintf(tbuf, " %ld-%d:%d(%02x)",
2196 cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2196 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2197 strcat(bp, tbuf); 2197 strcat(bp, tbuf);
2198 cmd = (struct scsi_cmnd *) cmd->host_scribble; 2198 cmd = (struct scsi_cmnd *) cmd->host_scribble;
2199 } 2199 }
@@ -2203,7 +2203,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
2203 cmd = (struct scsi_cmnd *) hd->disconnected_Q; 2203 cmd = (struct scsi_cmnd *) hd->disconnected_Q;
2204 while (cmd) { 2204 while (cmd) {
2205 sprintf(tbuf, " %ld-%d:%d(%02x)", 2205 sprintf(tbuf, " %ld-%d:%d(%02x)",
2206 cmd->pid, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2206 cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2207 strcat(bp, tbuf); 2207 strcat(bp, tbuf);
2208 cmd = (struct scsi_cmnd *) cmd->host_scribble; 2208 cmd = (struct scsi_cmnd *) cmd->host_scribble;
2209 } 2209 }
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 53e170586c26..4fddef727467 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -39,14 +39,12 @@ struct scsi_cmnd {
39 * A SCSI Command is assigned a nonzero serial_number before passed 39 * A SCSI Command is assigned a nonzero serial_number before passed
40 * to the driver's queue command function. The serial_number is 40 * to the driver's queue command function. The serial_number is
41 * cleared when scsi_done is entered indicating that the command 41 * cleared when scsi_done is entered indicating that the command
42 * has been completed. It currently doesn't have much use other 42 * has been completed. It is a bug for LLDDs to use this number
43 * than printk's. Some lldd's use this number for other purposes. 43 * for purposes other than printk (and even that is only useful
44 * It's almost certain that such usages are either incorrect or 44 * for debugging).
45 * meaningless. Please kill all usages other than printk's. Also,
46 * as this number is always identical to ->pid, please convert
47 * printk's to use ->pid, so that we can kill this field.
48 */ 45 */
49 unsigned long serial_number; 46 unsigned long serial_number;
47
50 /* 48 /*
51 * This is set to jiffies as it was when the command was first 49 * This is set to jiffies as it was when the command was first
52 * allocated. It is used to time how long the command has 50 * allocated. It is used to time how long the command has
@@ -116,7 +114,6 @@ struct scsi_cmnd {
116 int result; /* Status code from lower level driver */ 114 int result; /* Status code from lower level driver */
117 115
118 unsigned char tag; /* SCSI-II queued command tag */ 116 unsigned char tag; /* SCSI-II queued command tag */
119 unsigned long pid; /* Process ID, starts at 0. Unique per host. */
120}; 117};
121 118
122extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); 119extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 5b79697a3a80..7d210cd6c38d 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -580,7 +580,7 @@ struct Scsi_Host {
580 * Used to assign serial numbers to the cmds. 580 * Used to assign serial numbers to the cmds.
581 * Protected by the host lock. 581 * Protected by the host lock.
582 */ 582 */
583 unsigned long cmd_serial_number, cmd_pid; 583 unsigned long cmd_serial_number;
584 584
585 unsigned active_mode:2; 585 unsigned active_mode:2;
586 unsigned unchecked_isa_dma:1; 586 unsigned unchecked_isa_dma:1;