]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/seagate.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[~andy/linux] / drivers / scsi / seagate.c
index a0cace9aeb7991aae6abd9d0ab2e408d36b45d95..4e6666ceae26b80ccd528978659731c2ceb27c5d 100644 (file)
@@ -94,7 +94,6 @@
 #include <linux/string.h>
 #include <linux/proc_fs.h>
 #include <linux/init.h>
-#include <linux/delay.h>
 #include <linux/blkdev.h>
 #include <linux/stat.h>
 #include <linux/delay.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi.h>
+
 #include <scsi/scsi_dbg.h>
 #include <scsi/scsi_host.h>
-#include "seagate.h"
 
-#include <scsi/scsi_ioctl.h>
 
 #ifdef DEBUG
 #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0)
@@ -312,7 +312,7 @@ static Signature __initdata signatures[] = {
        {"IBM F1 V1.2009/22/93", 5, 25, FD},
 };
 
-#define NUM_SIGNATURES (sizeof(signatures) / sizeof(Signature))
+#define NUM_SIGNATURES ARRAY_SIZE(signatures)
 #endif                         /* n OVERRIDE */
 
 /*
@@ -322,6 +322,7 @@ static Signature __initdata signatures[] = {
 static int hostno = -1;
 static void seagate_reconnect_intr (int, void *, struct pt_regs *);
 static irqreturn_t do_seagate_reconnect_intr (int, void *, struct pt_regs *);
+static int seagate_st0x_bus_reset(struct scsi_cmnd *);
 
 #ifdef FAST
 static int fast = 1;
@@ -418,7 +419,7 @@ static inline void borken_wait (void)
 #define ULOOP( i ) for (clock = i*8;;)
 #define TIMEOUT (!(clock--))
 
-int __init seagate_st0x_detect (Scsi_Host_Template * tpnt)
+int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
 {
        struct Scsi_Host *instance;
        int i, j;
@@ -457,7 +458,7 @@ int __init seagate_st0x_detect (Scsi_Host_Template * tpnt)
  * space for the on-board RAM instead.
  */
 
-               for (i = 0; i < (sizeof (seagate_bases) / sizeof (unsigned int)); ++i) {
+               for (i = 0; i < ARRAY_SIZE(seagate_bases); ++i) {
                        void __iomem *p = ioremap(seagate_bases[i], 0x2000);
                        if (!p)
                                continue;
@@ -497,7 +498,7 @@ int __init seagate_st0x_detect (Scsi_Host_Template * tpnt)
                return 0;
 
        hostno = instance->host_no;
-       if (request_irq (irq, do_seagate_reconnect_intr, SA_INTERRUPT, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) {
+       if (request_irq (irq, do_seagate_reconnect_intr, IRQF_DISABLED, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) {
                printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq);
                return 0;
        }
@@ -585,8 +586,8 @@ static int linked_connected = 0;
 static unsigned char linked_target, linked_lun;
 #endif
 
-static void (*done_fn) (Scsi_Cmnd *) = NULL;
-static Scsi_Cmnd *SCint = NULL;
+static void (*done_fn) (struct scsi_cmnd *) = NULL;
+static struct scsi_cmnd *SCint = NULL;
 
 /*
  * These control whether or not disconnect / reconnect will be attempted,
@@ -633,7 +634,7 @@ static irqreturn_t do_seagate_reconnect_intr(int irq, void *dev_id,
 static void seagate_reconnect_intr (int irq, void *dev_id, struct pt_regs *regs)
 {
        int temp;
-       Scsi_Cmnd *SCtmp;
+       struct scsi_cmnd *SCtmp;
 
        DPRINTK (PHASE_RESELECT, "scsi%d : seagate_reconnect_intr() called\n", hostno);
 
@@ -675,10 +676,11 @@ static void seagate_reconnect_intr (int irq, void *dev_id, struct pt_regs *regs)
 
 static int recursion_depth = 0;
 
-static int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int seagate_st0x_queue_command(struct scsi_cmnd * SCpnt,
+                                     void (*done) (struct scsi_cmnd *))
 {
        int result, reconnect;
-       Scsi_Cmnd *SCtmp;
+       struct scsi_cmnd *SCtmp;
 
        DANY ("seagate: que_command");
        done_fn = done;
@@ -1002,7 +1004,7 @@ connect_loop:
                        }
 #endif
 
-                       buffer = (struct scatterlist *) SCint->buffer;
+                       buffer = (struct scatterlist *) SCint->request_buffer;
                        len = buffer->length;
                        data = page_address(buffer->page) + buffer->offset;
                } else {
@@ -1609,7 +1611,7 @@ connect_loop:
        return retcode (st0x_aborted);
 }                              /* end of internal_command */
 
-static int seagate_st0x_abort (Scsi_Cmnd * SCpnt)
+static int seagate_st0x_abort(struct scsi_cmnd * SCpnt)
 {
        st0x_aborted = DID_ABORT;
        return SUCCESS;
@@ -1624,7 +1626,7 @@ static int seagate_st0x_abort (Scsi_Cmnd * SCpnt)
  * May be called with SCpnt = NULL
  */
 
-static int seagate_st0x_bus_reset(Scsi_Cmnd * SCpnt)
+static int seagate_st0x_bus_reset(struct scsi_cmnd * SCpnt)
 {
        /* No timeouts - this command is going to fail because it was reset. */
        DANY ("scsi%d: Reseting bus... ", hostno);
@@ -1649,7 +1651,7 @@ static int seagate_st0x_release(struct Scsi_Host *shost)
        return 0;
 }
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
        .detect                 = seagate_st0x_detect,
        .release                = seagate_st0x_release,
        .info                   = seagate_st0x_info,