git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
scsi
/
seagate.c
diff --git
a/drivers/scsi/seagate.c
b/drivers/scsi/seagate.c
index
0ff83dd
..
ff62e97
100644
(file)
--- a/
drivers/scsi/seagate.c
+++ b/
drivers/scsi/seagate.c
@@
-94,26
+94,27
@@
#include <linux/string.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#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 <linux/blkdev.h>
#include <linux/stat.h>
#include <linux/delay.h>
+#include <linux/io.h>
-#include <asm/io.h>
#include <asm/system.h>
#include <asm/uaccess.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 <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)
#else
#define DPRINTK( when, msg... ) do { } while (0)
#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 );
#endif
#define DANY( msg... ) DPRINTK( 0xffff, msg );
@@
-312,7
+313,7
@@
static Signature __initdata signatures[] = {
{"IBM F1 V1.2009/22/93", 5, 25, FD},
};
{"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 */
/*
#endif /* n OVERRIDE */
/*
@@
-320,8
+321,9
@@
static Signature __initdata signatures[] = {
*/
static int hostno = -1;
*/
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;
#ifdef FAST
static int fast = 1;
@@
-457,7
+459,7
@@
int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
* space for the on-board RAM instead.
*/
* 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;
void __iomem *p = ioremap(seagate_bases[i], 0x2000);
if (!p)
continue;
@@
-497,7
+499,7
@@
int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
return 0;
hostno = instance->host_no;
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;
}
printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq);
return 0;
}
@@
-522,7
+524,7
@@
int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
#ifdef ARBITRATE
" ARBITRATE"
#endif
#ifdef ARBITRATE
" ARBITRATE"
#endif
-#if
def
DEBUG
+#if DEBUG
" DEBUG"
#endif
#ifdef FAST
" DEBUG"
#endif
#ifdef FAST
@@
-585,8
+587,8
@@
static int linked_connected = 0;
static unsigned char linked_target, linked_lun;
#endif
static unsigned char linked_target, linked_lun;
#endif
-static void (*done_fn) (
Scsi_C
mnd *) = NULL;
-static
Scsi_C
mnd *SCint = NULL;
+static void (*done_fn) (
struct scsi_c
mnd *) = NULL;
+static
struct scsi_c
mnd *SCint = NULL;
/*
* These control whether or not disconnect / reconnect will be attempted,
/*
* These control whether or not disconnect / reconnect will be attempted,
@@
-618,22
+620,21
@@
static int should_reconnect = 0;
* asserting SEL.
*/
* 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);
{
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;
}
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;
{
int temp;
-
Scsi_C
mnd *SCtmp;
+
struct scsi_c
mnd *SCtmp;
DPRINTK (PHASE_RESELECT, "scsi%d : seagate_reconnect_intr() called\n", hostno);
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 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;
{
int result, reconnect;
-
Scsi_C
mnd *SCtmp;
+
struct scsi_c
mnd *SCtmp;
DANY ("seagate: que_command");
done_fn = done;
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;
unsigned char *data = NULL;
struct scatterlist *buffer = NULL;
int clock, temp, nobuffs = 0, done = 0, len = 0;
-#if
def
DEBUG
+#if DEBUG
int transfered = 0, phase = 0, newphase;
#endif
register unsigned char status_read;
int transfered = 0, phase = 0, newphase;
#endif
register unsigned char status_read;
@@
-1002,7
+1004,7
@@
connect_loop:
}
#endif
}
#endif
- buffer = (struct scatterlist *) SCint->buffer;
+ buffer = (struct scatterlist *) SCint->
request_
buffer;
len = buffer->length;
data = page_address(buffer->page) + buffer->offset;
} else {
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 */
return retcode (st0x_aborted);
} /* end of internal_command */
-static int seagate_st0x_abort
(Scsi_C
mnd * SCpnt)
+static int seagate_st0x_abort
(struct scsi_c
mnd * SCpnt)
{
st0x_aborted = DID_ABORT;
return SUCCESS;
{
st0x_aborted = DID_ABORT;
return SUCCESS;
@@
-1624,7
+1626,7
@@
static int seagate_st0x_abort (Scsi_Cmnd * SCpnt)
* May be called with SCpnt = NULL
*/
* May be called with SCpnt = NULL
*/
-static int seagate_st0x_bus_reset(
Scsi_C
mnd * SCpnt)
+static int seagate_st0x_bus_reset(
struct scsi_c
mnd * SCpnt)
{
/* No timeouts - this command is going to fail because it was reset. */
DANY ("scsi%d: Reseting bus... ", hostno);
{
/* No timeouts - this command is going to fail because it was reset. */
DANY ("scsi%d: Reseting bus... ", hostno);