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 kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
scsi
/
ultrastor.c
diff --git
a/drivers/scsi/ultrastor.c
b/drivers/scsi/ultrastor.c
index
65554c4
..
e681681
100644
(file)
--- a/
drivers/scsi/ultrastor.c
+++ b/
drivers/scsi/ultrastor.c
@@
-137,15
+137,15
@@
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
#include <linux/stat.h>
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
#include <linux/stat.h>
+#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/io.h>
-#include <asm/bitops.h>
#include <asm/system.h>
#include <asm/dma.h>
#define ULTRASTOR_PRIVATE /* Get the private stuff from ultrastor.h */
#include "scsi.h"
#include <asm/system.h>
#include <asm/dma.h>
#define ULTRASTOR_PRIVATE /* Get the private stuff from ultrastor.h */
#include "scsi.h"
-#include
"hosts.h"
+#include
<scsi/scsi_host.h>
#include "ultrastor.h"
#define FALSE 0
#include "ultrastor.h"
#define FALSE 0
@@
-259,7
+259,7
@@
static struct ultrastor_config
} config = {0};
/* Set this to 1 to reset the SCSI bus on error. */
} config = {0};
/* Set this to 1 to reset the SCSI bus on error. */
-int ultrastor_bus_reset;
+
static
int ultrastor_bus_reset;
/* Allowed BIOS base addresses (NULL indicates reserved) */
/* Allowed BIOS base addresses (NULL indicates reserved) */
@@
-343,7
+343,7
@@
static void log_ultrastor_abort(struct ultrastor_config *config,
}
#endif
}
#endif
-static int ultrastor_14f_detect(
Scsi_Host_T
emplate * tpnt)
+static int ultrastor_14f_detect(
struct scsi_host_t
emplate * tpnt)
{
size_t i;
unsigned char in_byte, version_byte = 0;
{
size_t i;
unsigned char in_byte, version_byte = 0;
@@
-525,7
+525,7
@@
out_release_port:
return FALSE;
}
return FALSE;
}
-static int ultrastor_24f_detect(
Scsi_Host_T
emplate * tpnt)
+static int ultrastor_24f_detect(
struct scsi_host_t
emplate * tpnt)
{
int i;
struct Scsi_Host * shpnt = NULL;
{
int i;
struct Scsi_Host * shpnt = NULL;
@@
-637,7
+637,7
@@
static int ultrastor_24f_detect(Scsi_Host_Template * tpnt)
return FALSE;
}
return FALSE;
}
-static int ultrastor_detect(
Scsi_Host_T
emplate * tpnt)
+static int ultrastor_detect(
struct scsi_host_t
emplate * tpnt)
{
tpnt->proc_name = "ultrastor";
return ultrastor_14f_detect(tpnt) || ultrastor_24f_detect(tpnt);
{
tpnt->proc_name = "ultrastor";
return ultrastor_14f_detect(tpnt) || ultrastor_24f_detect(tpnt);
@@
-879,7
+879,7
@@
static int ultrastor_abort(Scsi_Cmnd *SCpnt)
ogm_addr = (unsigned int)isa_bus_to_virt(inl(port0 + 23));
icm_status = inb(port0 + 27);
icm_addr = (unsigned int)isa_bus_to_virt(inl(port0 + 28));
ogm_addr = (unsigned int)isa_bus_to_virt(inl(port0 + 23));
icm_status = inb(port0 + 27);
icm_addr = (unsigned int)isa_bus_to_virt(inl(port0 + 28));
- spin_
lock_irqsav
e(host->host_lock, flags);
+ spin_
unlock_irqrestor
e(host->host_lock, flags);
}
/* First check to see if an interrupt is pending. I suspect the SiS
}
/* First check to see if an interrupt is pending. I suspect the SiS
@@
-945,18
+945,16
@@
static int ultrastor_abort(Scsi_Cmnd *SCpnt)
config.mscp[mscp_index].SCint, SCpnt);
#endif
if (config.mscp[mscp_index].SCint == 0)
config.mscp[mscp_index].SCint, SCpnt);
#endif
if (config.mscp[mscp_index].SCint == 0)
- return
SCSI_ABORT_NOT_RUNNING
;
+ return
FAILED
;
if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort");
- config.mscp[mscp_index].SCint =
0
;
+ config.mscp[mscp_index].SCint =
NULL
;
done = config.mscp[mscp_index].done;
done = config.mscp[mscp_index].done;
- config.mscp[mscp_index].done =
0
;
+ config.mscp[mscp_index].done =
NULL
;
SCpnt->result = DID_ABORT << 16;
/* Take the host lock to guard against scsi layer re-entry */
SCpnt->result = DID_ABORT << 16;
/* Take the host lock to guard against scsi layer re-entry */
- spin_lock_irqsave(host->host_lock, flags);
done(SCpnt);
done(SCpnt);
- spin_unlock_irqrestore(host->host_lock, flags);
/* Need to set a timeout here in case command never completes. */
return SUCCESS;
/* Need to set a timeout here in case command never completes. */
return SUCCESS;
@@
-1000,9
+998,9
@@
static int ultrastor_host_reset(Scsi_Cmnd * SCpnt)
{
config.mscp[i].SCint->result = DID_RESET << 16;
config.mscp[i].done(config.mscp[i].SCint);
{
config.mscp[i].SCint->result = DID_RESET << 16;
config.mscp[i].done(config.mscp[i].SCint);
- config.mscp[i].done =
0
;
+ config.mscp[i].done =
NULL
;
}
}
- config.mscp[i].SCint =
0
;
+ config.mscp[i].SCint =
NULL
;
}
#endif
}
#endif
@@
-1020,7
+1018,7
@@
static int ultrastor_host_reset(Scsi_Cmnd * SCpnt)
#endif
spin_unlock_irqrestore(host->host_lock, flags);
#endif
spin_unlock_irqrestore(host->host_lock, flags);
- return S
CSI_RESET_S
UCCESS;
+ return SUCCESS;
}
}
@@
-1083,7
+1081,7
@@
static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (icm_status == 3) {
void (*done)(Scsi_Cmnd *) = mscp->done;
if (done) {
if (icm_status == 3) {
void (*done)(Scsi_Cmnd *) = mscp->done;
if (done) {
- mscp->done =
0
;
+ mscp->done =
NULL
;
mscp->SCint->result = DID_ABORT << 16;
done(mscp->SCint);
}
mscp->SCint->result = DID_ABORT << 16;
done(mscp->SCint);
}
@@
-1114,7
+1112,7
@@
static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
once we call done, we may get another command queued before this
interrupt service routine can return. */
done = mscp->done;
once we call done, we may get another command queued before this
interrupt service routine can return. */
done = mscp->done;
- mscp->done =
0
;
+ mscp->done =
NULL
;
/* Let the higher levels know that we're done */
switch (mscp->adapter_status)
/* Let the higher levels know that we're done */
switch (mscp->adapter_status)
@@
-1138,7
+1136,7
@@
static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
SCtmp->result = status | mscp->target_status;
SCtmp->result = status | mscp->target_status;
- SCtmp->host_scribble =
0
;
+ SCtmp->host_scribble =
NULL
;
/* Free up mscp block for next command */
#if ULTRASTOR_MAX_CMDS == 1
/* Free up mscp block for next command */
#if ULTRASTOR_MAX_CMDS == 1
@@
-1186,7
+1184,7
@@
static irqreturn_t do_ultrastor_interrupt(int irq, void *dev_id,
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
-static
Scsi_Host_T
emplate driver_template = {
+static
struct scsi_host_t
emplate driver_template = {
.name = "UltraStor 14F/24F/34F",
.detect = ultrastor_detect,
.release = ultrastor_release,
.name = "UltraStor 14F/24F/34F",
.detect = ultrastor_detect,
.release = ultrastor_release,