]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/wd33c93.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6-omap-h63xx.git] / drivers / scsi / wd33c93.c
index fa4e08e508ad68b35c7c2d490e0639c64f7c4384..0e8e642fd3b031f28dbea5adec68b41e64206474 100644 (file)
@@ -89,6 +89,8 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
 
+#include <asm/irq.h>
+
 #include "wd33c93.h"
 
 #define optimum_sx_per(hostdata) (hostdata)->sx_table[1].period_ns
@@ -379,7 +381,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
        hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata;
 
        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:
  *  - host_scribble is the pointer to the next cmd in the input queue
@@ -461,7 +463,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd,
 
        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);
        return 0;
@@ -684,7 +686,7 @@ wd33c93_execute(struct Scsi_Host *instance)
         */
 
        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
@@ -961,7 +963,7 @@ wd33c93_intr(struct Scsi_Host *instance)
        case CSR_XFER_DONE | PHS_COMMAND:
        case CSR_UNEXP | 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,
                                 hostdata);
                hostdata->state = S_CONNECTED;
@@ -1005,7 +1007,7 @@ wd33c93_intr(struct Scsi_Host *instance)
                switch (msg) {
 
                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);
                        hostdata->state = S_PRE_CMP_DISC;
                        break;
@@ -1172,7 +1174,7 @@ wd33c93_intr(struct Scsi_Host *instance)
 
                write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
                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;
                        lun = read_wd33c93(regs, WD_TARGET_LUN);
                        DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun))
@@ -1199,7 +1201,7 @@ wd33c93_intr(struct Scsi_Host *instance)
                } else {
                        printk
                            ("%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);
                }
                break;
@@ -1264,7 +1266,7 @@ wd33c93_intr(struct Scsi_Host *instance)
                        spin_unlock_irqrestore(&hostdata->lock, flags);
                        return;
                }
-               DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->pid))
+               DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number))
                    hostdata->connected = NULL;
                hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
                hostdata->state = S_UNCONNECTED;
@@ -1290,7 +1292,7 @@ wd33c93_intr(struct Scsi_Host *instance)
  */
 
                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) {
                        printk(" - Already disconnected! ");
                        hostdata->state = S_UNCONNECTED;
@@ -1489,7 +1491,7 @@ wd33c93_intr(struct Scsi_Host *instance)
                } else
                        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);
                break;
 
@@ -1636,7 +1638,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
                        cmd->result = DID_ABORT << 16;
                        printk
                            ("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);
                        cmd->scsi_done(cmd);
                        return SUCCESS;
@@ -1661,7 +1663,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
                unsigned long timeout;
 
                printk("scsi%d: Aborting connected command %ld - ",
-                      instance->host_no, cmd->pid);
+                      instance->host_no, cmd->serial_number);
 
                printk("stopping DMA - ");
                if (hostdata->dma == D_DMA_RUNNING) {
@@ -1728,7 +1730,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
                if (tmp == cmd) {
                        printk
                            ("scsi%d: Abort - command %ld found on disconnected_Q - ",
-                            instance->host_no, cmd->pid);
+                            instance->host_no, cmd->serial_number);
                        printk("Abort SNOOZE. ");
                        enable_irq(cmd->device->host->irq);
                        return FAILED;
@@ -1762,7 +1764,7 @@ static char setup_buffer[SETUP_BUFFER_SIZE];
 static char setup_used[MAX_SETUP_ARGS];
 static int done_setup = 0;
 
-int
+static int
 wd33c93_setup(char *str)
 {
        int i;
@@ -2182,7 +2184,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
                if (hd->connected) {
                        cmd = (struct scsi_cmnd *) hd->connected;
                        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);
                }
        }
@@ -2191,7 +2193,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
                cmd = (struct scsi_cmnd *) hd->input_Q;
                while (cmd) {
                        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);
                        cmd = (struct scsi_cmnd *) cmd->host_scribble;
                }
@@ -2201,7 +2203,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
                cmd = (struct scsi_cmnd *) hd->disconnected_Q;
                while (cmd) {
                        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);
                        cmd = (struct scsi_cmnd *) cmd->host_scribble;
                }