X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fscsi%2Fseagate.c;h=ce80fa9ad815906d6a234fad52f9d2ae44443c53;hb=28ebe4f66beda8f142569d24fe3b168f8a08a6a6;hp=2679ea8bff1a98365225ff22662c7a3990239321;hpb=48cb37bd9e053429aacb7c2726da3300aba60c68;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index 2679ea8bff1a..ce80fa9ad815 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c @@ -94,26 +94,27 @@ #include #include #include -#include #include #include #include +#include -#include #include #include -#include "scsi.h" +#include +#include +#include + #include #include -#include "seagate.h" -#include #ifdef DEBUG #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0) #else #define DPRINTK( when, msg... ) do { } while (0) +#define DEBUG 0 #endif #define DANY( msg... ) DPRINTK( 0xffff, msg ); @@ -320,8 +321,9 @@ 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 void seagate_reconnect_intr (int, void *); +static irqreturn_t do_seagate_reconnect_intr (int, void *); +static int seagate_st0x_bus_reset(struct scsi_cmnd *); #ifdef FAST static int fast = 1; @@ -418,7 +420,7 @@ static inline void borken_wait (void) #define ULOOP( i ) for (clock = i*8;;) #define TIMEOUT (!(clock--)) -int __init seagate_st0x_detect (struct scsi_host_template * tpnt) +static int __init seagate_st0x_detect (struct scsi_host_template * tpnt) { struct Scsi_Host *instance; int i, j; @@ -522,7 +524,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) #ifdef ARBITRATE " ARBITRATE" #endif -#ifdef DEBUG +#if DEBUG " DEBUG" #endif #ifdef FAST @@ -585,8 +587,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, @@ -618,22 +620,21 @@ static int should_reconnect = 0; * asserting SEL. */ -static irqreturn_t do_seagate_reconnect_intr(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t do_seagate_reconnect_intr(int irq, void *dev_id) { unsigned long flags; struct Scsi_Host *dev = dev_id; spin_lock_irqsave (dev->host_lock, flags); - seagate_reconnect_intr (irq, dev_id, regs); + seagate_reconnect_intr (irq, dev_id); spin_unlock_irqrestore (dev->host_lock, flags); return IRQ_HANDLED; } -static void seagate_reconnect_intr (int irq, void *dev_id, struct pt_regs *regs) +static void seagate_reconnect_intr (int irq, void *dev_id) { 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; @@ -732,7 +734,7 @@ static int internal_command (unsigned char target, unsigned char lun, unsigned char *data = NULL; struct scatterlist *buffer = NULL; int clock, temp, nobuffs = 0, done = 0, len = 0; -#ifdef DEBUG +#if DEBUG int transfered = 0, phase = 0, newphase; #endif register unsigned char status_read; @@ -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);