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
/
esp.c
diff --git
a/drivers/scsi/esp.c
b/drivers/scsi/esp.c
index
3bbfba0
..
87a8c3d
100644
(file)
--- a/
drivers/scsi/esp.c
+++ b/
drivers/scsi/esp.c
@@
-25,9
+25,8
@@
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
+#include <linux/module.h>
-#include "scsi.h"
-#include "hosts.h"
#include "esp.h"
#include <asm/sbus.h>
#include "esp.h"
#include <asm/sbus.h>
@@
-38,13
+37,19
@@
#include <asm/oplib.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/oplib.h>
#include <asm/io.h>
#include <asm/irq.h>
-
#ifndef __sparc_v9__
#include <asm/machines.h>
#include <asm/idprom.h>
#endif
#ifndef __sparc_v9__
#include <asm/machines.h>
#include <asm/idprom.h>
#endif
-#include <linux/module.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
+
+#define DRV_VERSION "1.101"
#define DEBUG_ESP
/* #define DEBUG_ESP_HME */
#define DEBUG_ESP
/* #define DEBUG_ESP_HME */
@@
-182,7
+187,7
@@
enum {
/* The master ring of all esp hosts we are managing in this driver. */
static struct esp *espchain;
/* The master ring of all esp hosts we are managing in this driver. */
static struct esp *espchain;
-static
spinlock_t espchain_lock = SPIN_LOCK_UNLOCKED
;
+static
DEFINE_SPINLOCK(espchain_lock)
;
static int esps_running = 0;
/* Forward declarations. */
static int esps_running = 0;
/* Forward declarations. */
@@
-366,7
+371,7
@@
static char *phase_string(int phase)
}
#ifdef DEBUG_STATE_MACHINE
}
#ifdef DEBUG_STATE_MACHINE
-static inline void esp_advance_phase(
Scsi_C
mnd *s, int newphase)
+static inline void esp_advance_phase(
struct scsi_c
mnd *s, int newphase)
{
ESPLOG(("<%s>", phase_string(newphase)));
s->SCp.sent_command = s->SCp.phase;
{
ESPLOG(("<%s>", phase_string(newphase)));
s->SCp.sent_command = s->SCp.phase;
@@
-419,48
+424,48
@@
static inline void esp_cmd(struct esp *esp, u8 cmd)
* Note that these are per-ESP queues, not global queues like
* the aha152x driver uses.
*/
* Note that these are per-ESP queues, not global queues like
* the aha152x driver uses.
*/
-static inline void append_SC(
Scsi_Cmnd **SC, Scsi_C
mnd *new_SC)
+static inline void append_SC(
struct scsi_cmnd **SC, struct scsi_c
mnd *new_SC)
{
{
-
Scsi_C
mnd *end;
+
struct scsi_c
mnd *end;
new_SC->host_scribble = (unsigned char *) NULL;
if (!*SC)
*SC = new_SC;
else {
new_SC->host_scribble = (unsigned char *) NULL;
if (!*SC)
*SC = new_SC;
else {
- for (end=*SC;end->host_scribble;end=(
Scsi_C
mnd *)end->host_scribble)
+ for (end=*SC;end->host_scribble;end=(
struct scsi_c
mnd *)end->host_scribble)
;
end->host_scribble = (unsigned char *) new_SC;
}
}
;
end->host_scribble = (unsigned char *) new_SC;
}
}
-static inline void prepend_SC(
Scsi_Cmnd **SC, Scsi_C
mnd *new_SC)
+static inline void prepend_SC(
struct scsi_cmnd **SC, struct scsi_c
mnd *new_SC)
{
new_SC->host_scribble = (unsigned char *) *SC;
*SC = new_SC;
}
{
new_SC->host_scribble = (unsigned char *) *SC;
*SC = new_SC;
}
-static inline
Scsi_Cmnd *remove_first_SC(Scsi_C
mnd **SC)
+static inline
struct scsi_cmnd *remove_first_SC(struct scsi_c
mnd **SC)
{
{
-
Scsi_C
mnd *ptr;
+
struct scsi_c
mnd *ptr;
ptr = *SC;
if (ptr)
ptr = *SC;
if (ptr)
- *SC = (
Scsi_C
mnd *) (*SC)->host_scribble;
+ *SC = (
struct scsi_c
mnd *) (*SC)->host_scribble;
return ptr;
}
return ptr;
}
-static inline
Scsi_Cmnd *remove_SC(Scsi_C
mnd **SC, int target, int lun)
+static inline
struct scsi_cmnd *remove_SC(struct scsi_c
mnd **SC, int target, int lun)
{
{
-
Scsi_C
mnd *ptr, *prev;
+
struct scsi_c
mnd *ptr, *prev;
for (ptr = *SC, prev = NULL;
ptr && ((ptr->device->id != target) || (ptr->device->lun != lun));
for (ptr = *SC, prev = NULL;
ptr && ((ptr->device->id != target) || (ptr->device->lun != lun));
- prev = ptr, ptr = (
Scsi_C
mnd *) ptr->host_scribble)
+ prev = ptr, ptr = (
struct scsi_c
mnd *) ptr->host_scribble)
;
if (ptr) {
if (prev)
prev->host_scribble=ptr->host_scribble;
else
;
if (ptr) {
if (prev)
prev->host_scribble=ptr->host_scribble;
else
- *SC=(
Scsi_C
mnd *)ptr->host_scribble;
+ *SC=(
struct scsi_c
mnd *)ptr->host_scribble;
}
return ptr;
}
}
return ptr;
}
@@
-1062,7
+1067,7
@@
static void __init esp_init_swstate(struct esp *esp)
esp->prev_hme_dmacsr = 0xffffffff;
}
esp->prev_hme_dmacsr = 0xffffffff;
}
-static int __init detect_one_esp(
Scsi_Host_T
emplate *tpnt, struct sbus_dev *esp_dev,
+static int __init detect_one_esp(
struct scsi_host_t
emplate *tpnt, struct sbus_dev *esp_dev,
struct sbus_dev *espdma, struct sbus_bus *sbus,
int id, int hme)
{
struct sbus_dev *espdma, struct sbus_bus *sbus,
int id, int hme)
{
@@
-1137,12
+1142,12
@@
fail_unlink:
#include <asm/sun4paddr.h>
#include <asm/sun4paddr.h>
-static int __init esp_detect(
Scsi_Host_T
emplate *tpnt)
+static int __init esp_detect(
struct scsi_host_t
emplate *tpnt)
{
static struct sbus_dev esp_dev;
int esps_in_use = 0;
{
static struct sbus_dev esp_dev;
int esps_in_use = 0;
- espchain =
0
;
+ espchain =
NULL
;
if (sun4_esp_physaddr) {
memset (&esp_dev, 0, sizeof(esp_dev));
if (sun4_esp_physaddr) {
memset (&esp_dev, 0, sizeof(esp_dev));
@@
-1162,7
+1167,7
@@
static int __init esp_detect(Scsi_Host_Template *tpnt)
#else /* !CONFIG_SUN4 */
#else /* !CONFIG_SUN4 */
-static int __init esp_detect(
Scsi_Host_T
emplate *tpnt)
+static int __init esp_detect(
struct scsi_host_t
emplate *tpnt)
{
struct sbus_bus *sbus;
struct sbus_dev *esp_dev, *sbdev_iter;
{
struct sbus_bus *sbus;
struct sbus_dev *esp_dev, *sbdev_iter;
@@
-1428,7
+1433,7
@@
static int esp_proc_info(struct Scsi_Host *host, char *buffer, char **start, off
return esp_host_info(esp, buffer, offset, length);
}
return esp_host_info(esp, buffer, offset, length);
}
-static void esp_get_dmabufs(struct esp *esp,
Scsi_C
mnd *sp)
+static void esp_get_dmabufs(struct esp *esp,
struct scsi_c
mnd *sp)
{
if (sp->use_sg == 0) {
sp->SCp.this_residual = sp->request_bufflen;
{
if (sp->use_sg == 0) {
sp->SCp.this_residual = sp->request_bufflen;
@@
-1437,7
+1442,7
@@
static void esp_get_dmabufs(struct esp *esp, Scsi_Cmnd *sp)
if (sp->request_bufflen) {
sp->SCp.have_data_in = sbus_map_single(esp->sdev, sp->SCp.buffer,
sp->SCp.this_residual,
if (sp->request_bufflen) {
sp->SCp.have_data_in = sbus_map_single(esp->sdev, sp->SCp.buffer,
sp->SCp.this_residual,
- s
csi_to_sbus_dma_dir(sp->sc_data_direction)
);
+ s
p->sc_data_direction
);
sp->SCp.ptr = (char *) ((unsigned long)sp->SCp.have_data_in);
} else {
sp->SCp.ptr = NULL;
sp->SCp.ptr = (char *) ((unsigned long)sp->SCp.have_data_in);
} else {
sp->SCp.ptr = NULL;
@@
-1447,26
+1452,26
@@
static void esp_get_dmabufs(struct esp *esp, Scsi_Cmnd *sp)
sp->SCp.buffers_residual = sbus_map_sg(esp->sdev,
sp->SCp.buffer,
sp->use_sg,
sp->SCp.buffers_residual = sbus_map_sg(esp->sdev,
sp->SCp.buffer,
sp->use_sg,
- s
csi_to_sbus_dma_dir(sp->sc_data_direction)
);
+ s
p->sc_data_direction
);
sp->SCp.this_residual = sg_dma_len(sp->SCp.buffer);
sp->SCp.ptr = (char *) ((unsigned long)sg_dma_address(sp->SCp.buffer));
}
}
sp->SCp.this_residual = sg_dma_len(sp->SCp.buffer);
sp->SCp.ptr = (char *) ((unsigned long)sg_dma_address(sp->SCp.buffer));
}
}
-static void esp_release_dmabufs(struct esp *esp,
Scsi_C
mnd *sp)
+static void esp_release_dmabufs(struct esp *esp,
struct scsi_c
mnd *sp)
{
if (sp->use_sg) {
sbus_unmap_sg(esp->sdev, sp->buffer, sp->use_sg,
{
if (sp->use_sg) {
sbus_unmap_sg(esp->sdev, sp->buffer, sp->use_sg,
- s
csi_to_sbus_dma_dir(sp->sc_data_direction)
);
+ s
p->sc_data_direction
);
} else if (sp->request_bufflen) {
sbus_unmap_single(esp->sdev,
sp->SCp.have_data_in,
sp->request_bufflen,
} else if (sp->request_bufflen) {
sbus_unmap_single(esp->sdev,
sp->SCp.have_data_in,
sp->request_bufflen,
- s
csi_to_sbus_dma_dir(sp->sc_data_direction)
);
+ s
p->sc_data_direction
);
}
}
}
}
-static void esp_restore_pointers(struct esp *esp,
Scsi_C
mnd *sp)
+static void esp_restore_pointers(struct esp *esp,
struct scsi_c
mnd *sp)
{
struct esp_pointers *ep = &esp->data_pointers[sp->device->id];
{
struct esp_pointers *ep = &esp->data_pointers[sp->device->id];
@@
-1476,7
+1481,7
@@
static void esp_restore_pointers(struct esp *esp, Scsi_Cmnd *sp)
sp->SCp.buffers_residual = ep->saved_buffers_residual;
}
sp->SCp.buffers_residual = ep->saved_buffers_residual;
}
-static void esp_save_pointers(struct esp *esp,
Scsi_C
mnd *sp)
+static void esp_save_pointers(struct esp *esp,
struct scsi_c
mnd *sp)
{
struct esp_pointers *ep = &esp->data_pointers[sp->device->id];
{
struct esp_pointers *ep = &esp->data_pointers[sp->device->id];
@@
-1506,7
+1511,7
@@
static void esp_save_pointers(struct esp *esp, Scsi_Cmnd *sp)
* case where we could see an interrupt is where we have disconnected
* commands active and they are trying to reselect us.
*/
* case where we could see an interrupt is where we have disconnected
* commands active and they are trying to reselect us.
*/
-static inline void esp_check_cmd(struct esp *esp,
Scsi_C
mnd *sp)
+static inline void esp_check_cmd(struct esp *esp,
struct scsi_c
mnd *sp)
{
switch (sp->cmd_len) {
case 6:
{
switch (sp->cmd_len) {
case 6:
@@
-1557,8
+1562,8
@@
static inline void build_wide_nego_msg(struct esp *esp, int size)
static void esp_exec_cmd(struct esp *esp)
{
static void esp_exec_cmd(struct esp *esp)
{
-
Scsi_C
mnd *SCptr;
-
Scsi_D
evice *SDptr;
+
struct scsi_c
mnd *SCptr;
+
struct scsi_d
evice *SDptr;
struct esp_device *esp_dev;
volatile u8 *cmdp = esp->esp_command;
u8 the_esp_command;
struct esp_device *esp_dev;
volatile u8 *cmdp = esp->esp_command;
u8 the_esp_command;
@@
-1834,7
+1839,7
@@
after_nego_msg_built:
}
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
}
/* Queue a SCSI command delivered from the mid-level Linux SCSI code. */
-static int esp_queue(
Scsi_Cmnd *SCpnt, void (*done)(Scsi_C
mnd *))
+static int esp_queue(
struct scsi_cmnd *SCpnt, void (*done)(struct scsi_c
mnd *))
{
struct esp *esp;
{
struct esp *esp;
@@
-1871,7
+1876,7
@@
static int esp_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
}
/* Dump driver state. */
}
/* Dump driver state. */
-static void esp_dump_cmd(
Scsi_C
mnd *SCptr)
+static void esp_dump_cmd(
struct scsi_c
mnd *SCptr)
{
ESPLOG(("[tgt<%02x> lun<%02x> "
"pphase<%s> cphase<%s>]",
{
ESPLOG(("[tgt<%02x> lun<%02x> "
"pphase<%s> cphase<%s>]",
@@
-1882,7
+1887,7
@@
static void esp_dump_cmd(Scsi_Cmnd *SCptr)
static void esp_dump_state(struct esp *esp)
{
static void esp_dump_state(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
#ifdef DEBUG_ESP_CMDS
int i;
#endif
#ifdef DEBUG_ESP_CMDS
int i;
#endif
@@
-1921,13
+1926,13
@@
static void esp_dump_state(struct esp *esp)
ESPLOG(("esp%d: disconnected ", esp->esp_id));
while (SCptr) {
esp_dump_cmd(SCptr);
ESPLOG(("esp%d: disconnected ", esp->esp_id));
while (SCptr) {
esp_dump_cmd(SCptr);
- SCptr = (
Scsi_C
mnd *) SCptr->host_scribble;
+ SCptr = (
struct scsi_c
mnd *) SCptr->host_scribble;
}
ESPLOG(("\n"));
}
/* Abort a command. The host_lock is acquired by caller. */
}
ESPLOG(("\n"));
}
/* Abort a command. The host_lock is acquired by caller. */
-static int esp_abort(
Scsi_C
mnd *SCptr)
+static int esp_abort(
struct scsi_c
mnd *SCptr)
{
struct esp *esp = (struct esp *) SCptr->device->host->hostdata;
int don;
{
struct esp *esp = (struct esp *) SCptr->device->host->hostdata;
int don;
@@
-1957,14
+1962,14
@@
static int esp_abort(Scsi_Cmnd *SCptr)
ESP_INTSOFF(esp->dregs);
}
if (esp->issue_SC) {
ESP_INTSOFF(esp->dregs);
}
if (esp->issue_SC) {
-
Scsi_C
mnd **prev, *this;
+
struct scsi_c
mnd **prev, *this;
for (prev = (&esp->issue_SC), this = esp->issue_SC;
this != NULL;
for (prev = (&esp->issue_SC), this = esp->issue_SC;
this != NULL;
- prev = (
Scsi_C
mnd **) &(this->host_scribble),
- this = (
Scsi_C
mnd *) this->host_scribble) {
+ prev = (
struct scsi_c
mnd **) &(this->host_scribble),
+ this = (
struct scsi_c
mnd *) this->host_scribble) {
if (this == SCptr) {
if (this == SCptr) {
- *prev = (
Scsi_C
mnd *) this->host_scribble;
+ *prev = (
struct scsi_c
mnd *) this->host_scribble;
this->host_scribble = NULL;
esp_release_dmabufs(esp, this);
this->host_scribble = NULL;
esp_release_dmabufs(esp, this);
@@
-2010,7
+2015,7
@@
static int esp_abort(Scsi_Cmnd *SCptr)
*/
static int esp_finish_reset(struct esp *esp)
{
*/
static int esp_finish_reset(struct esp *esp)
{
-
Scsi_C
mnd *sp = esp->current_SC;
+
struct scsi_c
mnd *sp = esp->current_SC;
/* Clean up currently executing command, if any. */
if (sp != NULL) {
/* Clean up currently executing command, if any. */
if (sp != NULL) {
@@
-2059,25
+2064,23
@@
static int esp_do_resetbus(struct esp *esp)
*
* The host_lock is acquired by caller.
*/
*
* The host_lock is acquired by caller.
*/
-static int esp_reset(
Scsi_C
mnd *SCptr)
+static int esp_reset(
struct scsi_c
mnd *SCptr)
{
struct esp *esp = (struct esp *) SCptr->device->host->hostdata;
{
struct esp *esp = (struct esp *) SCptr->device->host->hostdata;
+ spin_lock_irq(esp->ehost->host_lock);
(void) esp_do_resetbus(esp);
(void) esp_do_resetbus(esp);
-
spin_unlock_irq(esp->ehost->host_lock);
wait_event(esp->reset_queue, (esp->resetting_bus == 0));
spin_unlock_irq(esp->ehost->host_lock);
wait_event(esp->reset_queue, (esp->resetting_bus == 0));
- spin_lock_irq(esp->ehost->host_lock);
-
return SUCCESS;
}
/* Internal ESP done function. */
static void esp_done(struct esp *esp, int error)
{
return SUCCESS;
}
/* Internal ESP done function. */
static void esp_done(struct esp *esp, int error)
{
-
Scsi_C
mnd *done_SC = esp->current_SC;
+
struct scsi_c
mnd *done_SC = esp->current_SC;
esp->current_SC = NULL;
esp->current_SC = NULL;
@@
-2168,7
+2171,7
@@
static inline void hme_fifo_push(struct esp *esp, u8 *bytes, u8 count)
/* We try to avoid some interrupts by jumping ahead and see if the ESP
* has gotten far enough yet. Hence the following.
*/
/* We try to avoid some interrupts by jumping ahead and see if the ESP
* has gotten far enough yet. Hence the following.
*/
-static inline int skipahead1(struct esp *esp,
Scsi_C
mnd *scp,
+static inline int skipahead1(struct esp *esp,
struct scsi_c
mnd *scp,
int prev_phase, int new_phase)
{
if (scp->SCp.sent_command != prev_phase)
int prev_phase, int new_phase)
{
if (scp->SCp.sent_command != prev_phase)
@@
-2202,7
+2205,7
@@
static inline int skipahead1(struct esp *esp, Scsi_Cmnd *scp,
return do_intr_end;
}
return do_intr_end;
}
-static inline int skipahead2(struct esp *esp,
Scsi_C
mnd *scp,
+static inline int skipahead2(struct esp *esp,
struct scsi_c
mnd *scp,
int prev_phase1, int prev_phase2, int new_phase)
{
if (scp->SCp.sent_command != prev_phase1 &&
int prev_phase1, int prev_phase2, int new_phase)
{
if (scp->SCp.sent_command != prev_phase1 &&
@@
-2318,7
+2321,7
@@
static inline void dma_flashclear(struct esp *esp)
dma_invalidate(esp);
}
dma_invalidate(esp);
}
-static int dma_can_transfer(struct esp *esp,
Scsi_C
mnd *sp)
+static int dma_can_transfer(struct esp *esp,
struct scsi_c
mnd *sp)
{
__u32 base, end, sz;
{
__u32 base, end, sz;
@@
-2379,7
+2382,7
@@
static int dma_can_transfer(struct esp *esp, Scsi_Cmnd *sp)
* tell the ESP to eat the extraneous byte so that we can proceed
* to the next phase.
*/
* tell the ESP to eat the extraneous byte so that we can proceed
* to the next phase.
*/
-static int esp100_sync_hwbug(struct esp *esp,
Scsi_C
mnd *sp, int fifocnt)
+static int esp100_sync_hwbug(struct esp *esp,
struct scsi_c
mnd *sp, int fifocnt)
{
/* Do not touch this piece of code. */
if ((!(esp->erev == esp100)) ||
{
/* Do not touch this piece of code. */
if ((!(esp->erev == esp100)) ||
@@
-2479,7
+2482,7
@@
static inline int reconnect_lun(struct esp *esp)
/* This puts the driver in a state where it can revitalize a command that
* is being continued due to reselection.
*/
/* This puts the driver in a state where it can revitalize a command that
* is being continued due to reselection.
*/
-static inline void esp_connect(struct esp *esp,
Scsi_C
mnd *sp)
+static inline void esp_connect(struct esp *esp,
struct scsi_c
mnd *sp)
{
struct esp_device *esp_dev = sp->device->hostdata;
{
struct esp_device *esp_dev = sp->device->hostdata;
@@
-2502,13
+2505,13
@@
static inline void esp_connect(struct esp *esp, Scsi_Cmnd *sp)
/* This will place the current working command back into the issue queue
* if we are to receive a reselection amidst a selection attempt.
*/
/* This will place the current working command back into the issue queue
* if we are to receive a reselection amidst a selection attempt.
*/
-static inline void esp_reconnect(struct esp *esp,
Scsi_C
mnd *sp)
+static inline void esp_reconnect(struct esp *esp,
struct scsi_c
mnd *sp)
{
if (!esp->disconnected_SC)
ESPLOG(("esp%d: Weird, being reselected but disconnected "
"command queue is empty.\n", esp->esp_id));
esp->snip = 0;
{
if (!esp->disconnected_SC)
ESPLOG(("esp%d: Weird, being reselected but disconnected "
"command queue is empty.\n", esp->esp_id));
esp->snip = 0;
- esp->current_SC =
0
;
+ esp->current_SC =
NULL
;
sp->SCp.phase = not_issued;
append_SC(&esp->issue_SC, sp);
}
sp->SCp.phase = not_issued;
append_SC(&esp->issue_SC, sp);
}
@@
-2540,7
+2543,7
@@
static inline int esp_bytes_sent(struct esp *esp, int fifo_count)
return rval - fifo_count;
}
return rval - fifo_count;
}
-static inline void advance_sg(
Scsi_C
mnd *sp)
+static inline void advance_sg(
struct scsi_c
mnd *sp)
{
++sp->SCp.buffer;
--sp->SCp.buffers_residual;
{
++sp->SCp.buffer;
--sp->SCp.buffers_residual;
@@
-2568,7
+2571,7
@@
static inline void advance_sg(Scsi_Cmnd *sp)
*/
static int esp_do_data(struct esp *esp)
{
*/
static int esp_do_data(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
int thisphase, hmuch;
ESPDATA(("esp_do_data: "));
int thisphase, hmuch;
ESPDATA(("esp_do_data: "));
@@
-2619,7
+2622,7
@@
static int esp_do_data(struct esp *esp)
/* See how successful the data transfer was. */
static int esp_do_data_finale(struct esp *esp)
{
/* See how successful the data transfer was. */
static int esp_do_data_finale(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
int bogus_data = 0, bytes_sent = 0, fifocnt, ecount = 0;
struct esp_device *esp_dev = SCptr->device->hostdata;
int bogus_data = 0, bytes_sent = 0, fifocnt, ecount = 0;
@@
-2800,7
+2803,7
@@
static int esp_do_data_finale(struct esp *esp)
* a tape, we don't want to go into a loop re-negotiating
* synchronous capabilities over and over.
*/
* a tape, we don't want to go into a loop re-negotiating
* synchronous capabilities over and over.
*/
-static int esp_should_clear_sync(
Scsi_C
mnd *sp)
+static int esp_should_clear_sync(
struct scsi_c
mnd *sp)
{
u8 cmd1 = sp->cmnd[0];
u8 cmd2 = sp->data_cmnd[0];
{
u8 cmd1 = sp->cmnd[0];
u8 cmd2 = sp->data_cmnd[0];
@@
-2834,7
+2837,7
@@
static int esp_should_clear_sync(Scsi_Cmnd *sp)
*/
static int esp_do_freebus(struct esp *esp)
{
*/
static int esp_do_freebus(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
int rval;
struct esp_device *esp_dev = SCptr->device->hostdata;
int rval;
@@
-2905,7
+2908,7
@@
static int esp_do_freebus(struct esp *esp)
*/
static int esp_bad_reconnect(struct esp *esp)
{
*/
static int esp_bad_reconnect(struct esp *esp)
{
-
Scsi_C
mnd *sp;
+
struct scsi_c
mnd *sp;
ESPLOG(("esp%d: Eieeee, reconnecting unknown command!\n",
esp->esp_id));
ESPLOG(("esp%d: Eieeee, reconnecting unknown command!\n",
esp->esp_id));
@@
-2914,7
+2917,7
@@
static int esp_bad_reconnect(struct esp *esp)
ESPLOG(("esp%d: issue_SC[", esp->esp_id));
while (sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
ESPLOG(("esp%d: issue_SC[", esp->esp_id));
while (sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
- sp = (
Scsi_C
mnd *) sp->host_scribble;
+ sp = (
struct scsi_c
mnd *) sp->host_scribble;
}
ESPLOG(("]\n"));
sp = esp->current_SC;
}
ESPLOG(("]\n"));
sp = esp->current_SC;
@@
-2928,7
+2931,7
@@
static int esp_bad_reconnect(struct esp *esp)
ESPLOG(("esp%d: disconnected_SC[", esp->esp_id));
while (sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
ESPLOG(("esp%d: disconnected_SC[", esp->esp_id));
while (sp) {
ESPLOG(("<%02x,%02x>", sp->device->id, sp->device->lun));
- sp = (
Scsi_C
mnd *) sp->host_scribble;
+ sp = (
struct scsi_c
mnd *) sp->host_scribble;
}
ESPLOG(("]\n"));
return do_reset_bus;
}
ESPLOG(("]\n"));
return do_reset_bus;
@@
-2938,7
+2941,7
@@
static int esp_bad_reconnect(struct esp *esp)
static int esp_do_reconnect(struct esp *esp)
{
int lun, target;
static int esp_do_reconnect(struct esp *esp)
{
int lun, target;
-
Scsi_C
mnd *SCptr;
+
struct scsi_c
mnd *SCptr;
/* Check for all bogus conditions first. */
target = reconnect_target(esp);
/* Check for all bogus conditions first. */
target = reconnect_target(esp);
@@
-2988,7
+2991,7
@@
static int esp_do_reconnect(struct esp *esp)
*/
static int esp_do_status(struct esp *esp)
{
*/
static int esp_do_status(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
int intr, rval;
rval = skipahead1(esp, SCptr, in_the_dark, in_status);
int intr, rval;
rval = skipahead1(esp, SCptr, in_the_dark, in_status);
@@
-3133,7
+3136,7
@@
static int esp_enter_status(struct esp *esp)
static int esp_disconnect_amidst_phases(struct esp *esp)
{
static int esp_disconnect_amidst_phases(struct esp *esp)
{
-
Scsi_C
mnd *sp = esp->current_SC;
+
struct scsi_c
mnd *sp = esp->current_SC;
struct esp_device *esp_dev = sp->device->hostdata;
/* This means real problems if we see this
struct esp_device *esp_dev = sp->device->hostdata;
/* This means real problems if we see this
@@
-3226,7
+3229,7
@@
static int esp_do_phase_determine(struct esp *esp)
/* First interrupt after exec'ing a cmd comes here. */
static int esp_select_complete(struct esp *esp)
{
/* First interrupt after exec'ing a cmd comes here. */
static int esp_select_complete(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
int cmd_bytes_sent, fcnt;
struct esp_device *esp_dev = SCptr->device->hostdata;
int cmd_bytes_sent, fcnt;
@@
-3582,7
+3585,7
@@
static int check_singlebyte_msg(struct esp *esp)
* this because so many initiators cannot cope with this occurring.
*/
static int target_with_ants_in_pants(struct esp *esp,
* this because so many initiators cannot cope with this occurring.
*/
static int target_with_ants_in_pants(struct esp *esp,
-
Scsi_C
mnd *SCptr,
+
struct scsi_c
mnd *SCptr,
struct esp_device *esp_dev)
{
if (esp_dev->sync || SCptr->device->borken) {
struct esp_device *esp_dev)
{
if (esp_dev->sync || SCptr->device->borken) {
@@
-3641,7
+3644,7
@@
static void sync_report(struct esp *esp)
static int check_multibyte_msg(struct esp *esp)
{
static int check_multibyte_msg(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
struct esp_device *esp_dev = SCptr->device->hostdata;
u8 regval = 0;
int message_out = 0;
struct esp_device *esp_dev = SCptr->device->hostdata;
u8 regval = 0;
int message_out = 0;
@@
-3822,7
+3825,7
@@
finish:
static int esp_do_msgindone(struct esp *esp)
{
static int esp_do_msgindone(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
int message_out = 0, it = 0, rval;
rval = skipahead1(esp, SCptr, in_msgin, in_msgindone);
int message_out = 0, it = 0, rval;
rval = skipahead1(esp, SCptr, in_msgin, in_msgindone);
@@
-3904,7
+3907,7
@@
static int esp_do_msgindone(struct esp *esp)
static int esp_do_cmdbegin(struct esp *esp)
{
static int esp_do_cmdbegin(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
esp_advance_phase(SCptr, in_cmdend);
if (esp->erev == fashme) {
esp_advance_phase(SCptr, in_cmdend);
if (esp->erev == fashme) {
@@
-4125,7
+4128,7
@@
static espfunc_t bus_vector[] = {
/* This is the second tier in our dual-level SCSI state machine. */
static int esp_work_bus(struct esp *esp)
{
/* This is the second tier in our dual-level SCSI state machine. */
static int esp_work_bus(struct esp *esp)
{
-
Scsi_C
mnd *SCptr = esp->current_SC;
+
struct scsi_c
mnd *SCptr = esp->current_SC;
unsigned int phase;
ESPBUS(("esp_work_bus: "));
unsigned int phase;
ESPBUS(("esp_work_bus: "));
@@
-4143,7
+4146,7
@@
static int esp_work_bus(struct esp *esp)
}
static espfunc_t isvc_vector[] = {
}
static espfunc_t isvc_vector[] = {
-
0
,
+
NULL
,
esp_do_phase_determine,
esp_do_resetbus,
esp_finish_reset,
esp_do_phase_determine,
esp_do_resetbus,
esp_finish_reset,
@@
-4153,7
+4156,7
@@
static espfunc_t isvc_vector[] = {
/* Main interrupt handler for an esp adapter. */
static void esp_handle(struct esp *esp)
{
/* Main interrupt handler for an esp adapter. */
static void esp_handle(struct esp *esp)
{
-
Scsi_C
mnd *SCptr;
+
struct scsi_c
mnd *SCptr;
int what_next = do_intr_end;
SCptr = esp->current_SC;
int what_next = do_intr_end;
SCptr = esp->current_SC;
@@
-4353,7
+4356,7
@@
static irqreturn_t esp_intr(int irq, void *dev_id, struct pt_regs *pregs)
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
-static int esp_slave_alloc(
Scsi_D
evice *SDptr)
+static int esp_slave_alloc(
struct scsi_d
evice *SDptr)
{
struct esp_device *esp_dev =
kmalloc(sizeof(struct esp_device), GFP_ATOMIC);
{
struct esp_device *esp_dev =
kmalloc(sizeof(struct esp_device), GFP_ATOMIC);
@@
-4365,7
+4368,7
@@
static int esp_slave_alloc(Scsi_Device *SDptr)
return 0;
}
return 0;
}
-static void esp_slave_destroy(
Scsi_D
evice *SDptr)
+static void esp_slave_destroy(
struct scsi_d
evice *SDptr)
{
struct esp *esp = (struct esp *) SDptr->host->hostdata;
{
struct esp *esp = (struct esp *) SDptr->host->hostdata;
@@
-4374,7
+4377,7
@@
static void esp_slave_destroy(Scsi_Device *SDptr)
SDptr->hostdata = NULL;
}
SDptr->hostdata = NULL;
}
-static
Scsi_Host_T
emplate driver_template = {
+static
struct scsi_host_t
emplate driver_template = {
.proc_name = "esp",
.proc_info = esp_proc_info,
.name = "Sun ESP 100/100a/200",
.proc_name = "esp",
.proc_info = esp_proc_info,
.name = "Sun ESP 100/100a/200",
@@
-4395,5
+4398,8
@@
static Scsi_Host_Template driver_template = {
#include "scsi_module.c"
#include "scsi_module.c"
+MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver");
+MODULE_AUTHOR("David S. Miller (davem@redhat.com)");
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);