From: Richard Knutsson <ricknu-0@student.ltu.se>
To: James.Bottomley@SteelEye.com
Cc: kernel-janitors@vger.kernel.org, trivial@kernel.org,
linux-scsi@vger.kernel.org,
Richard Knutsson <ricknu-0@student.ltu.se>
Subject: [PATCH 20/33][SCSI] in2000: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
Date: Sun, 06 Jan 2008 03:04:32 +0000 [thread overview]
Message-ID: <20080106030432.30002.67676.sendpatchset@thinktank.campus.ltu.se> (raw)
In-Reply-To: <20080106030250.30002.96493.sendpatchset@thinktank.campus.ltu.se>
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index c8b452f..05737ef 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -255,7 +255,7 @@ static unsigned long read_3393_count(struct IN2000_hostdata *hostdata)
* will be a DATA_OUT phase with this command, false otherwise.
* (Thanks to Joerg Dorchain for the research and suggestion.)
*/
-static int is_dir_out(Scsi_Cmnd * cmd)
+static int is_dir_out(struct scsi_cmnd *cmd)
{
switch (cmd->cmnd[0]) {
case WRITE_6:
@@ -334,18 +334,18 @@ static uchar calc_sync_xfer(unsigned int period, unsigned int offset)
static void in2000_execute(struct Scsi_Host *instance);
-static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int in2000_queuecommand(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp;
+ struct scsi_cmnd *tmp;
instance = cmd->device->host;
hostdata = (struct IN2000_hostdata *) instance->hostdata;
DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->serial_number))
-/* Set up a few fields in the Scsi_Cmnd structure for our own use:
+/* Set up a few fields in the scsi_cmnd structure for our own use:
* - host_scribble is the pointer to the next cmd in the input queue
* - scsi_done points to the routine we call when a cmd is finished
* - result is what you'd expect
@@ -417,7 +417,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
cmd->host_scribble = (uchar *) hostdata->input_Q;
hostdata->input_Q = cmd;
} else { /* find the end of the queue */
- for (tmp = (Scsi_Cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble);
+ for (tmp = (struct scsi_cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble);
tmp->host_scribble = (uchar *) cmd;
}
@@ -444,7 +444,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
static void in2000_execute(struct Scsi_Host *instance)
{
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *cmd, *prev;
+ struct scsi_cmnd *cmd, *prev;
int i;
unsigned short *sp;
unsigned short f;
@@ -467,13 +467,13 @@ static void in2000_execute(struct Scsi_Host *instance)
* for an idle target/lun.
*/
- cmd = (Scsi_Cmnd *) hostdata->input_Q;
+ cmd = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (cmd) {
if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun)))
break;
prev = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* quit if queue empty or all possible targets are busy */
@@ -490,7 +490,7 @@ static void in2000_execute(struct Scsi_Host *instance)
if (prev)
prev->host_scribble = cmd->host_scribble;
else
- hostdata->input_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->input_Q = (struct scsi_cmnd *) cmd->host_scribble;
#ifdef PROC_STATISTICS
hostdata->cmd_cnt[cmd->device->id]++;
@@ -539,9 +539,9 @@ static void in2000_execute(struct Scsi_Host *instance)
goto yes;
if (!(hostdata->input_Q)) /* input_Q empty? */
goto no;
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble) {
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble) {
if ((prev->device->id != cmd->device->id) || (prev->device->lun != cmd->device->lun)) {
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble)
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble)
prev->SCp.phase = 1;
goto yes;
}
@@ -743,7 +743,7 @@ static void transfer_pio(uchar * buf, int cnt, int data_in_dir, struct IN2000_ho
-static void transfer_bytes(Scsi_Cmnd * cmd, int data_in_dir)
+static void transfer_bytes(struct scsi_cmnd *cmd, int data_in_dir)
{
struct IN2000_hostdata *hostdata;
unsigned short *sp;
@@ -833,7 +833,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
{
struct Scsi_Host *instance = dev_id;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *patch, *cmd;
+ struct scsi_cmnd *patch, *cmd;
uchar asr, sr, phs, id, lun, *ucp, msg;
int i, j;
unsigned long length;
@@ -909,7 +909,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* (Big thanks to Bill Earnest for getting me out of the mud in here.)
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
CHECK_NULL(cmd, "fifo_int")
if (hostdata->fifo = FI_FIFO_READING) {
@@ -991,7 +991,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* detailed info from FIFO_READING and FIFO_WRITING (see below).
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear the interrupt */
phs = read_3393(hostdata, WD_COMMAND_PHASE);
@@ -1068,7 +1068,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->state = S_RUNNING_LEVEL2)
hostdata->connected = NULL;
else {
- cmd = (Scsi_Cmnd *) hostdata->selecting; /* get a valid cmd */
+ cmd = (struct scsi_cmnd *) hostdata->selecting; /* get a valid cmd */
CHECK_NULL(cmd, "csr_timeout")
hostdata->selecting = NULL;
}
@@ -1090,7 +1090,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
case CSR_SELECT:
DB(DB_INTR, printk("SELECT"))
- hostdata->connected = cmd = (Scsi_Cmnd *) hostdata->selecting;
+ hostdata->connected = cmd = (struct scsi_cmnd *) hostdata->selecting;
CHECK_NULL(cmd, "csr_select")
hostdata->selecting = NULL;
@@ -1491,7 +1491,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->level2 <= L2_NONE) {
if (hostdata->selecting) {
- cmd = (Scsi_Cmnd *) hostdata->selecting;
+ cmd = (struct scsi_cmnd *) hostdata->selecting;
hostdata->selecting = NULL;
hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
cmd->host_scribble = (uchar *) hostdata->input_Q;
@@ -1532,13 +1532,13 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
/* Now we look for the command that's reconnecting. */
- cmd = (Scsi_Cmnd *) hostdata->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hostdata->disconnected_Q;
patch = NULL;
while (cmd) {
if (id = cmd->device->id && lun = cmd->device->lun)
break;
patch = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* Hmm. Couldn't find a valid command.... What to do? */
@@ -1553,7 +1553,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (patch)
patch->host_scribble = cmd->host_scribble;
else
- hostdata->disconnected_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->disconnected_Q = (struct scsi_cmnd *) cmd->host_scribble;
hostdata->connected = cmd;
/* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]'
@@ -1639,7 +1639,7 @@ static int reset_hardware(struct Scsi_Host *instance, int type)
-static int in2000_bus_reset(Scsi_Cmnd * cmd)
+static int in2000_bus_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
@@ -1675,11 +1675,11 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int __in2000_abort(Scsi_Cmnd * cmd)
+static int __in2000_abort(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp, *prev;
+ struct scsi_cmnd *tmp, *prev;
uchar sr, asr;
unsigned long timeout;
@@ -1694,7 +1694,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* from the inout_Q.
*/
- tmp = (Scsi_Cmnd *) hostdata->input_Q;
+ tmp = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (tmp) {
if (tmp = cmd) {
@@ -1707,7 +1707,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
prev = tmp;
- tmp = (Scsi_Cmnd *) tmp->host_scribble;
+ tmp = (struct scsi_cmnd *) tmp->host_scribble;
}
/*
@@ -1774,7 +1774,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* an ABORT_SNOOZE and hope for the best...
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_Q; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_Q; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd = tmp) {
printk(KERN_DEBUG "scsi%d: unable to abort disconnected command.\n", instance->host_no);
return FAILED;
@@ -1796,7 +1796,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int in2000_abort(Scsi_Cmnd * cmd)
+static int in2000_abort(struct scsi_cmnd *cmd)
{
int rc;
@@ -2175,7 +2175,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
char tbuf[128];
unsigned long flags;
struct IN2000_hostdata *hd;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
int x, i;
static int stop = 0;
@@ -2267,27 +2267,27 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
if (hd->proc & PR_CONNECTED) {
strcat(bp, "\nconnected: ");
if (hd->connected) {
- cmd = (Scsi_Cmnd *) hd->connected;
+ cmd = (struct scsi_cmnd *) hd->connected;
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
}
}
if (hd->proc & PR_INPUTQ) {
strcat(bp, "\ninput_Q: ");
- cmd = (Scsi_Cmnd *) hd->input_Q;
+ cmd = (struct scsi_cmnd *) hd->input_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_DISCQ) {
strcat(bp, "\ndisconnected_Q:");
- cmd = (Scsi_Cmnd *) hd->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hd->disconnected_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_TEST) {
diff --git a/drivers/scsi/in2000.h b/drivers/scsi/in2000.h
index 0fb8b06..2f3085f 100644
--- a/drivers/scsi/in2000.h
+++ b/drivers/scsi/in2000.h
@@ -283,10 +283,10 @@ struct IN2000_hostdata {
unsigned int dip_switch; /* dip switch settings */
unsigned int hrev; /* hardware revision of card */
volatile uchar busy[8]; /* index = target, bit = lun */
- volatile Scsi_Cmnd *input_Q; /* commands waiting to be started */
- volatile Scsi_Cmnd *selecting; /* trying to select this command */
- volatile Scsi_Cmnd *connected; /* currently connected command */
- volatile Scsi_Cmnd *disconnected_Q;/* commands waiting for reconnect */
+ volatile struct scsi_cmnd *input_Q; /* commands waiting to be started */
+ volatile struct scsi_cmnd *selecting; /* trying to select this command */
+ volatile struct scsi_cmnd *connected; /* currently connected command */
+ volatile struct scsi_cmnd *disconnected_Q;/* commands waiting for reconnect */
uchar state; /* what we are currently doing */
uchar fifo; /* what the FIFO is up to */
uchar level2; /* extent to which Level-2 commands are used */
@@ -396,12 +396,12 @@ struct IN2000_hostdata {
flags)
static int in2000_detect(struct scsi_host_template *) in2000__INIT;
-static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int in2000_abort(Scsi_Cmnd *);
+static int in2000_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int in2000_abort(struct scsi_cmnd *);
static void in2000_setup(char *, int *) in2000__INIT;
static int in2000_biosparam(struct scsi_device *, struct block_device *,
sector_t, int *);
-static int in2000_bus_reset(Scsi_Cmnd *);
+static int in2000_bus_reset(struct scsi_cmnd *);
#define IN2000_CAN_Q 16
WARNING: multiple messages have this Message-ID (diff)
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: James.Bottomley@SteelEye.com
Cc: kernel-janitors@vger.kernel.org, trivial@kernel.org,
linux-scsi@vger.kernel.org,
Richard Knutsson <ricknu-0@student.ltu.se>
Subject: [PATCH 20/33][SCSI] in2000: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd'
Date: Sun, 6 Jan 2008 04:04:32 +0100 (MET) [thread overview]
Message-ID: <20080106030432.30002.67676.sendpatchset@thinktank.campus.ltu.se> (raw)
In-Reply-To: <20080106030250.30002.96493.sendpatchset@thinktank.campus.ltu.se>
Convert the typedef'ed 'Scsi_Cmnd' to 'struct scsi_cmnd'.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Last item before 'drivers/scsi/scsi_typedefs.h' can be removed.
Cleaned up checkpatch.pl-errors (so no '> 80 lines'-warning).
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index c8b452f..05737ef 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -255,7 +255,7 @@ static unsigned long read_3393_count(struct IN2000_hostdata *hostdata)
* will be a DATA_OUT phase with this command, false otherwise.
* (Thanks to Joerg Dorchain for the research and suggestion.)
*/
-static int is_dir_out(Scsi_Cmnd * cmd)
+static int is_dir_out(struct scsi_cmnd *cmd)
{
switch (cmd->cmnd[0]) {
case WRITE_6:
@@ -334,18 +334,18 @@ static uchar calc_sync_xfer(unsigned int period, unsigned int offset)
static void in2000_execute(struct Scsi_Host *instance);
-static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+static int in2000_queuecommand(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *))
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp;
+ struct scsi_cmnd *tmp;
instance = cmd->device->host;
hostdata = (struct IN2000_hostdata *) instance->hostdata;
DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->serial_number))
-/* Set up a few fields in the Scsi_Cmnd structure for our own use:
+/* Set up a few fields in the scsi_cmnd structure for our own use:
* - host_scribble is the pointer to the next cmd in the input queue
* - scsi_done points to the routine we call when a cmd is finished
* - result is what you'd expect
@@ -417,7 +417,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
cmd->host_scribble = (uchar *) hostdata->input_Q;
hostdata->input_Q = cmd;
} else { /* find the end of the queue */
- for (tmp = (Scsi_Cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble);
+ for (tmp = (struct scsi_cmnd *) hostdata->input_Q; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble);
tmp->host_scribble = (uchar *) cmd;
}
@@ -444,7 +444,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
static void in2000_execute(struct Scsi_Host *instance)
{
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *cmd, *prev;
+ struct scsi_cmnd *cmd, *prev;
int i;
unsigned short *sp;
unsigned short f;
@@ -467,13 +467,13 @@ static void in2000_execute(struct Scsi_Host *instance)
* for an idle target/lun.
*/
- cmd = (Scsi_Cmnd *) hostdata->input_Q;
+ cmd = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (cmd) {
if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun)))
break;
prev = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* quit if queue empty or all possible targets are busy */
@@ -490,7 +490,7 @@ static void in2000_execute(struct Scsi_Host *instance)
if (prev)
prev->host_scribble = cmd->host_scribble;
else
- hostdata->input_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->input_Q = (struct scsi_cmnd *) cmd->host_scribble;
#ifdef PROC_STATISTICS
hostdata->cmd_cnt[cmd->device->id]++;
@@ -539,9 +539,9 @@ static void in2000_execute(struct Scsi_Host *instance)
goto yes;
if (!(hostdata->input_Q)) /* input_Q empty? */
goto no;
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble) {
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble) {
if ((prev->device->id != cmd->device->id) || (prev->device->lun != cmd->device->lun)) {
- for (prev = (Scsi_Cmnd *) hostdata->input_Q; prev; prev = (Scsi_Cmnd *) prev->host_scribble)
+ for (prev = (struct scsi_cmnd *) hostdata->input_Q; prev; prev = (struct scsi_cmnd *) prev->host_scribble)
prev->SCp.phase = 1;
goto yes;
}
@@ -743,7 +743,7 @@ static void transfer_pio(uchar * buf, int cnt, int data_in_dir, struct IN2000_ho
-static void transfer_bytes(Scsi_Cmnd * cmd, int data_in_dir)
+static void transfer_bytes(struct scsi_cmnd *cmd, int data_in_dir)
{
struct IN2000_hostdata *hostdata;
unsigned short *sp;
@@ -833,7 +833,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
{
struct Scsi_Host *instance = dev_id;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *patch, *cmd;
+ struct scsi_cmnd *patch, *cmd;
uchar asr, sr, phs, id, lun, *ucp, msg;
int i, j;
unsigned long length;
@@ -909,7 +909,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* (Big thanks to Bill Earnest for getting me out of the mud in here.)
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
CHECK_NULL(cmd, "fifo_int")
if (hostdata->fifo == FI_FIFO_READING) {
@@ -991,7 +991,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
* detailed info from FIFO_READING and FIFO_WRITING (see below).
*/
- cmd = (Scsi_Cmnd *) hostdata->connected; /* assume we're connected */
+ cmd = (struct scsi_cmnd *) hostdata->connected; /* assume we're connected */
sr = read_3393(hostdata, WD_SCSI_STATUS); /* clear the interrupt */
phs = read_3393(hostdata, WD_COMMAND_PHASE);
@@ -1068,7 +1068,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->state == S_RUNNING_LEVEL2)
hostdata->connected = NULL;
else {
- cmd = (Scsi_Cmnd *) hostdata->selecting; /* get a valid cmd */
+ cmd = (struct scsi_cmnd *) hostdata->selecting; /* get a valid cmd */
CHECK_NULL(cmd, "csr_timeout")
hostdata->selecting = NULL;
}
@@ -1090,7 +1090,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
case CSR_SELECT:
DB(DB_INTR, printk("SELECT"))
- hostdata->connected = cmd = (Scsi_Cmnd *) hostdata->selecting;
+ hostdata->connected = cmd = (struct scsi_cmnd *) hostdata->selecting;
CHECK_NULL(cmd, "csr_select")
hostdata->selecting = NULL;
@@ -1491,7 +1491,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (hostdata->level2 <= L2_NONE) {
if (hostdata->selecting) {
- cmd = (Scsi_Cmnd *) hostdata->selecting;
+ cmd = (struct scsi_cmnd *) hostdata->selecting;
hostdata->selecting = NULL;
hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun);
cmd->host_scribble = (uchar *) hostdata->input_Q;
@@ -1532,13 +1532,13 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
/* Now we look for the command that's reconnecting. */
- cmd = (Scsi_Cmnd *) hostdata->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hostdata->disconnected_Q;
patch = NULL;
while (cmd) {
if (id == cmd->device->id && lun == cmd->device->lun)
break;
patch = cmd;
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
/* Hmm. Couldn't find a valid command.... What to do? */
@@ -1553,7 +1553,7 @@ static irqreturn_t in2000_intr(int irqnum, void *dev_id)
if (patch)
patch->host_scribble = cmd->host_scribble;
else
- hostdata->disconnected_Q = (Scsi_Cmnd *) cmd->host_scribble;
+ hostdata->disconnected_Q = (struct scsi_cmnd *) cmd->host_scribble;
hostdata->connected = cmd;
/* We don't need to worry about 'initialize_SCp()' or 'hostdata->busy[]'
@@ -1639,7 +1639,7 @@ static int reset_hardware(struct Scsi_Host *instance, int type)
-static int in2000_bus_reset(Scsi_Cmnd * cmd)
+static int in2000_bus_reset(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
@@ -1675,11 +1675,11 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int __in2000_abort(Scsi_Cmnd * cmd)
+static int __in2000_abort(struct scsi_cmnd *cmd)
{
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
- Scsi_Cmnd *tmp, *prev;
+ struct scsi_cmnd *tmp, *prev;
uchar sr, asr;
unsigned long timeout;
@@ -1694,7 +1694,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* from the inout_Q.
*/
- tmp = (Scsi_Cmnd *) hostdata->input_Q;
+ tmp = (struct scsi_cmnd *) hostdata->input_Q;
prev = NULL;
while (tmp) {
if (tmp == cmd) {
@@ -1707,7 +1707,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
prev = tmp;
- tmp = (Scsi_Cmnd *) tmp->host_scribble;
+ tmp = (struct scsi_cmnd *) tmp->host_scribble;
}
/*
@@ -1774,7 +1774,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
* an ABORT_SNOOZE and hope for the best...
*/
- for (tmp = (Scsi_Cmnd *) hostdata->disconnected_Q; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble)
+ for (tmp = (struct scsi_cmnd *) hostdata->disconnected_Q; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble)
if (cmd == tmp) {
printk(KERN_DEBUG "scsi%d: unable to abort disconnected command.\n", instance->host_no);
return FAILED;
@@ -1796,7 +1796,7 @@ static int __in2000_abort(Scsi_Cmnd * cmd)
return SUCCESS;
}
-static int in2000_abort(Scsi_Cmnd * cmd)
+static int in2000_abort(struct scsi_cmnd *cmd)
{
int rc;
@@ -2175,7 +2175,7 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
char tbuf[128];
unsigned long flags;
struct IN2000_hostdata *hd;
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
int x, i;
static int stop = 0;
@@ -2267,27 +2267,27 @@ static int in2000_proc_info(struct Scsi_Host *instance, char *buf, char **start,
if (hd->proc & PR_CONNECTED) {
strcat(bp, "\nconnected: ");
if (hd->connected) {
- cmd = (Scsi_Cmnd *) hd->connected;
+ cmd = (struct scsi_cmnd *) hd->connected;
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
}
}
if (hd->proc & PR_INPUTQ) {
strcat(bp, "\ninput_Q: ");
- cmd = (Scsi_Cmnd *) hd->input_Q;
+ cmd = (struct scsi_cmnd *) hd->input_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_DISCQ) {
strcat(bp, "\ndisconnected_Q:");
- cmd = (Scsi_Cmnd *) hd->disconnected_Q;
+ cmd = (struct scsi_cmnd *) hd->disconnected_Q;
while (cmd) {
sprintf(tbuf, " %ld-%d:%d(%02x)", cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
strcat(bp, tbuf);
- cmd = (Scsi_Cmnd *) cmd->host_scribble;
+ cmd = (struct scsi_cmnd *) cmd->host_scribble;
}
}
if (hd->proc & PR_TEST) {
diff --git a/drivers/scsi/in2000.h b/drivers/scsi/in2000.h
index 0fb8b06..2f3085f 100644
--- a/drivers/scsi/in2000.h
+++ b/drivers/scsi/in2000.h
@@ -283,10 +283,10 @@ struct IN2000_hostdata {
unsigned int dip_switch; /* dip switch settings */
unsigned int hrev; /* hardware revision of card */
volatile uchar busy[8]; /* index = target, bit = lun */
- volatile Scsi_Cmnd *input_Q; /* commands waiting to be started */
- volatile Scsi_Cmnd *selecting; /* trying to select this command */
- volatile Scsi_Cmnd *connected; /* currently connected command */
- volatile Scsi_Cmnd *disconnected_Q;/* commands waiting for reconnect */
+ volatile struct scsi_cmnd *input_Q; /* commands waiting to be started */
+ volatile struct scsi_cmnd *selecting; /* trying to select this command */
+ volatile struct scsi_cmnd *connected; /* currently connected command */
+ volatile struct scsi_cmnd *disconnected_Q;/* commands waiting for reconnect */
uchar state; /* what we are currently doing */
uchar fifo; /* what the FIFO is up to */
uchar level2; /* extent to which Level-2 commands are used */
@@ -396,12 +396,12 @@ struct IN2000_hostdata {
flags)
static int in2000_detect(struct scsi_host_template *) in2000__INIT;
-static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int in2000_abort(Scsi_Cmnd *);
+static int in2000_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
+static int in2000_abort(struct scsi_cmnd *);
static void in2000_setup(char *, int *) in2000__INIT;
static int in2000_biosparam(struct scsi_device *, struct block_device *,
sector_t, int *);
-static int in2000_bus_reset(Scsi_Cmnd *);
+static int in2000_bus_reset(struct scsi_cmnd *);
#define IN2000_CAN_Q 16
next prev parent reply other threads:[~2008-01-06 3:04 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 3:02 [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' Richard Knutsson
2008-01-06 3:02 ` Richard Knutsson
2008-01-06 3:02 ` [PATCH 1/33][SCSI] 3w-xxxx: Convert 'Scsi_Cmnd' to 'struct scsi_cmnd' Richard Knutsson
2008-01-06 3:02 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 2/33][SCSI] advansys: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 3/33][SCSI] aha152x: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 4/33][SCSI] aha1542: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 5/33][SCSI] aha1740: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 6/33][SCSI] atari_NCR5380: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 7/33][SCSI] atari_scsi: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 8/33][SCSI] blz1230: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 9/33][SCSI] blz2060: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 10/33][SCSI] cyberstorm: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 11/33][SCSI] cyberstormII: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 12/33][SCSI] dtc: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:03 ` [PATCH 13/33][SCSI] fastlane: " Richard Knutsson
2008-01-06 3:03 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 14/33][SCSI] fd_mcs: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 15/33][SCSI] gdth: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 16/33][SCSI] gdth_proc: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 17/33][SCSI] g_NCR5380: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 18/33][SCSI] ibmmca: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 19/33][SCSI] ibmvscsi: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson [this message]
2008-01-06 3:04 ` [PATCH 20/33][SCSI] in2000: " Richard Knutsson
2008-01-06 3:04 ` [PATCH 21/33][SCSI] mac_esp: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 22/33][SCSI] mca_53c9x: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 23/33][SCSI] megaraid: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 24/33][SCSI] NCR5380: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:04 ` [PATCH 25/33][SCSI] NCR53c406a: " Richard Knutsson
2008-01-06 3:04 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 26/33][SCSI] NCR53C9x: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 27/33][SCSI] nsp32_debug: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 28/33][SCSI] oktagon_esp: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 29/33][SCSI] pas16: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 30/33][SCSI] sun3x_esp: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 31/33][SCSI] sym53c416: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 32/33][SCSI] wd7000: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 33a/33] include/scsi/scsi_tcq.h: " Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 3:05 ` [PATCH 33b/33] include/scsi/scsi_tcq.h: Correct the parameter-name Richard Knutsson
2008-01-06 3:05 ` Richard Knutsson
2008-01-06 19:51 ` [PATCH 0/33][SCSI] Arrange for removal of 'scsi_typedefs.h' James Bottomley
2008-01-06 19:51 ` James Bottomley
2008-01-06 21:18 ` Richard Knutsson
2008-01-06 21:18 ` Richard Knutsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080106030432.30002.67676.sendpatchset@thinktank.campus.ltu.se \
--to=ricknu-0@student.ltu.se \
--cc=James.Bottomley@SteelEye.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.