Commit 0fc82d5e authored by Henrik Kretzschmar's avatar Henrik Kretzschmar Committed by James Bottomley

[SCSI] convert ninja driver to struct scsi_cmnd

Changes the obsolete typedefd Scsi_Cmnd to struct scsi_cmnd in
the ninja scsi pcmcia driver.
Signed-off-by: default avatarHenrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent c543a373
...@@ -183,7 +183,7 @@ static void nsp_cs_dmessage(const char *func, int line, int mask, char *fmt, ... ...@@ -183,7 +183,7 @@ static void nsp_cs_dmessage(const char *func, int line, int mask, char *fmt, ...
* Clenaup parameters and call done() functions. * Clenaup parameters and call done() functions.
* You must be set SCpnt->result before call this function. * You must be set SCpnt->result before call this function.
*/ */
static void nsp_scsi_done(Scsi_Cmnd *SCpnt) static void nsp_scsi_done(struct scsi_cmnd *SCpnt)
{ {
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
...@@ -192,7 +192,8 @@ static void nsp_scsi_done(Scsi_Cmnd *SCpnt) ...@@ -192,7 +192,8 @@ static void nsp_scsi_done(Scsi_Cmnd *SCpnt)
SCpnt->scsi_done(SCpnt); SCpnt->scsi_done(SCpnt);
} }
static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) static int nsp_queuecommand(struct scsi_cmnd *SCpnt,
void (*done)(struct scsi_cmnd *))
{ {
#ifdef NSP_DEBUG #ifdef NSP_DEBUG
/*unsigned int host_id = SCpnt->device->host->this_id;*/ /*unsigned int host_id = SCpnt->device->host->this_id;*/
...@@ -365,7 +366,7 @@ static int nsphw_init(nsp_hw_data *data) ...@@ -365,7 +366,7 @@ static int nsphw_init(nsp_hw_data *data)
/* /*
* Start selection phase * Start selection phase
*/ */
static int nsphw_start_selection(Scsi_Cmnd *SCpnt) static int nsphw_start_selection(struct scsi_cmnd *SCpnt)
{ {
unsigned int host_id = SCpnt->device->host->this_id; unsigned int host_id = SCpnt->device->host->this_id;
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
...@@ -446,7 +447,7 @@ static struct nsp_sync_table nsp_sync_table_20M[] = { ...@@ -446,7 +447,7 @@ static struct nsp_sync_table nsp_sync_table_20M[] = {
/* /*
* setup synchronous data transfer mode * setup synchronous data transfer mode
*/ */
static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) static int nsp_analyze_sdtr(struct scsi_cmnd *SCpnt)
{ {
unsigned char target = scmd_id(SCpnt); unsigned char target = scmd_id(SCpnt);
// unsigned char lun = SCpnt->device->lun; // unsigned char lun = SCpnt->device->lun;
...@@ -504,7 +505,7 @@ static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) ...@@ -504,7 +505,7 @@ static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt)
/* /*
* start ninja hardware timer * start ninja hardware timer
*/ */
static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time) static void nsp_start_timer(struct scsi_cmnd *SCpnt, int time)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
...@@ -517,7 +518,8 @@ static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time) ...@@ -517,7 +518,8 @@ static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time)
/* /*
* wait for bus phase change * wait for bus phase change
*/ */
static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str) static int nsp_negate_signal(struct scsi_cmnd *SCpnt, unsigned char mask,
char *str)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned char reg; unsigned char reg;
...@@ -544,9 +546,9 @@ static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str) ...@@ -544,9 +546,9 @@ static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str)
/* /*
* expect Ninja Irq * expect Ninja Irq
*/ */
static int nsp_expect_signal(Scsi_Cmnd *SCpnt, static int nsp_expect_signal(struct scsi_cmnd *SCpnt,
unsigned char current_phase, unsigned char current_phase,
unsigned char mask) unsigned char mask)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
int time_out; int time_out;
...@@ -579,7 +581,7 @@ static int nsp_expect_signal(Scsi_Cmnd *SCpnt, ...@@ -579,7 +581,7 @@ static int nsp_expect_signal(Scsi_Cmnd *SCpnt,
/* /*
* transfer SCSI message * transfer SCSI message
*/ */
static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase) static int nsp_xfer(struct scsi_cmnd *SCpnt, int phase)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
...@@ -619,7 +621,7 @@ static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase) ...@@ -619,7 +621,7 @@ static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase)
/* /*
* get extra SCSI data from fifo * get extra SCSI data from fifo
*/ */
static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt) static int nsp_dataphase_bypass(struct scsi_cmnd *SCpnt)
{ {
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
unsigned int count; unsigned int count;
...@@ -651,7 +653,7 @@ static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt) ...@@ -651,7 +653,7 @@ static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt)
/* /*
* accept reselection * accept reselection
*/ */
static int nsp_reselected(Scsi_Cmnd *SCpnt) static int nsp_reselected(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned int host_id = SCpnt->device->host->this_id; unsigned int host_id = SCpnt->device->host->this_id;
...@@ -690,7 +692,7 @@ static int nsp_reselected(Scsi_Cmnd *SCpnt) ...@@ -690,7 +692,7 @@ static int nsp_reselected(Scsi_Cmnd *SCpnt)
/* /*
* count how many data transferd * count how many data transferd
*/ */
static int nsp_fifo_count(Scsi_Cmnd *SCpnt) static int nsp_fifo_count(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned int count; unsigned int count;
...@@ -717,7 +719,7 @@ static int nsp_fifo_count(Scsi_Cmnd *SCpnt) ...@@ -717,7 +719,7 @@ static int nsp_fifo_count(Scsi_Cmnd *SCpnt)
/* /*
* read data in DATA IN phase * read data in DATA IN phase
*/ */
static void nsp_pio_read(Scsi_Cmnd *SCpnt) static void nsp_pio_read(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned long mmio_base = SCpnt->device->host->base; unsigned long mmio_base = SCpnt->device->host->base;
...@@ -812,7 +814,7 @@ static void nsp_pio_read(Scsi_Cmnd *SCpnt) ...@@ -812,7 +814,7 @@ static void nsp_pio_read(Scsi_Cmnd *SCpnt)
/* /*
* write data in DATA OUT phase * write data in DATA OUT phase
*/ */
static void nsp_pio_write(Scsi_Cmnd *SCpnt) static void nsp_pio_write(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned long mmio_base = SCpnt->device->host->base; unsigned long mmio_base = SCpnt->device->host->base;
...@@ -905,7 +907,7 @@ static void nsp_pio_write(Scsi_Cmnd *SCpnt) ...@@ -905,7 +907,7 @@ static void nsp_pio_write(Scsi_Cmnd *SCpnt)
/* /*
* setup synchronous/asynchronous data transfer mode * setup synchronous/asynchronous data transfer mode
*/ */
static int nsp_nexus(Scsi_Cmnd *SCpnt) static int nsp_nexus(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
unsigned char target = scmd_id(SCpnt); unsigned char target = scmd_id(SCpnt);
...@@ -952,7 +954,7 @@ static irqreturn_t nspintr(int irq, void *dev_id) ...@@ -952,7 +954,7 @@ static irqreturn_t nspintr(int irq, void *dev_id)
{ {
unsigned int base; unsigned int base;
unsigned char irq_status, irq_phase, phase; unsigned char irq_status, irq_phase, phase;
Scsi_Cmnd *tmpSC; struct scsi_cmnd *tmpSC;
unsigned char target, lun; unsigned char target, lun;
unsigned int *sync_neg; unsigned int *sync_neg;
int i, tmp; int i, tmp;
...@@ -1530,7 +1532,7 @@ nsp_proc_info( ...@@ -1530,7 +1532,7 @@ nsp_proc_info(
/*---------------------------------------------------------------*/ /*---------------------------------------------------------------*/
/* /*
static int nsp_eh_abort(Scsi_Cmnd *SCpnt) static int nsp_eh_abort(struct scsi_cmnd *SCpnt)
{ {
nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt); nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt);
...@@ -1558,7 +1560,7 @@ static int nsp_bus_reset(nsp_hw_data *data) ...@@ -1558,7 +1560,7 @@ static int nsp_bus_reset(nsp_hw_data *data)
return SUCCESS; return SUCCESS;
} }
static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt) static int nsp_eh_bus_reset(struct scsi_cmnd *SCpnt)
{ {
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
...@@ -1567,7 +1569,7 @@ static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt) ...@@ -1567,7 +1569,7 @@ static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt)
return nsp_bus_reset(data); return nsp_bus_reset(data);
} }
static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt) static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt)
{ {
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
......
...@@ -266,7 +266,7 @@ typedef struct _nsp_hw_data { ...@@ -266,7 +266,7 @@ typedef struct _nsp_hw_data {
int TimerCount; int TimerCount;
int SelectionTimeOut; int SelectionTimeOut;
Scsi_Cmnd *CurrentSC; struct scsi_cmnd *CurrentSC;
//int CurrnetTarget; //int CurrnetTarget;
int FifoCount; int FifoCount;
...@@ -319,30 +319,34 @@ static int nsp_proc_info ( ...@@ -319,30 +319,34 @@ static int nsp_proc_info (
int hostno, int hostno,
#endif #endif
int inout); int inout);
static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (* done)(Scsi_Cmnd *SCpnt)); static int nsp_queuecommand(struct scsi_cmnd *SCpnt,
void (* done)(struct scsi_cmnd *SCpnt));
/* Error handler */ /* Error handler */
/*static int nsp_eh_abort (Scsi_Cmnd *SCpnt);*/ /*static int nsp_eh_abort (struct scsi_cmnd *SCpnt);*/
/*static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt);*/ /*static int nsp_eh_device_reset(struct scsi_cmnd *SCpnt);*/
static int nsp_eh_bus_reset (Scsi_Cmnd *SCpnt); static int nsp_eh_bus_reset (struct scsi_cmnd *SCpnt);
static int nsp_eh_host_reset (Scsi_Cmnd *SCpnt); static int nsp_eh_host_reset (struct scsi_cmnd *SCpnt);
static int nsp_bus_reset (nsp_hw_data *data); static int nsp_bus_reset (nsp_hw_data *data);
/* */ /* */
static int nsphw_init (nsp_hw_data *data); static int nsphw_init (nsp_hw_data *data);
static int nsphw_start_selection(Scsi_Cmnd *SCpnt); static int nsphw_start_selection(struct scsi_cmnd *SCpnt);
static void nsp_start_timer (Scsi_Cmnd *SCpnt, int time); static void nsp_start_timer (struct scsi_cmnd *SCpnt, int time);
static int nsp_fifo_count (Scsi_Cmnd *SCpnt); static int nsp_fifo_count (struct scsi_cmnd *SCpnt);
static void nsp_pio_read (Scsi_Cmnd *SCpnt); static void nsp_pio_read (struct scsi_cmnd *SCpnt);
static void nsp_pio_write (Scsi_Cmnd *SCpnt); static void nsp_pio_write (struct scsi_cmnd *SCpnt);
static int nsp_nexus (Scsi_Cmnd *SCpnt); static int nsp_nexus (struct scsi_cmnd *SCpnt);
static void nsp_scsi_done (Scsi_Cmnd *SCpnt); static void nsp_scsi_done (struct scsi_cmnd *SCpnt);
static int nsp_analyze_sdtr (Scsi_Cmnd *SCpnt); static int nsp_analyze_sdtr (struct scsi_cmnd *SCpnt);
static int nsp_negate_signal (Scsi_Cmnd *SCpnt, unsigned char mask, char *str); static int nsp_negate_signal (struct scsi_cmnd *SCpnt,
static int nsp_expect_signal (Scsi_Cmnd *SCpnt, unsigned char current_phase, unsigned char mask); unsigned char mask, char *str);
static int nsp_xfer (Scsi_Cmnd *SCpnt, int phase); static int nsp_expect_signal (struct scsi_cmnd *SCpnt,
static int nsp_dataphase_bypass (Scsi_Cmnd *SCpnt); unsigned char current_phase,
static int nsp_reselected (Scsi_Cmnd *SCpnt); unsigned char mask);
static int nsp_xfer (struct scsi_cmnd *SCpnt, int phase);
static int nsp_dataphase_bypass (struct scsi_cmnd *SCpnt);
static int nsp_reselected (struct scsi_cmnd *SCpnt);
static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht); static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht);
/* Interrupt handler */ /* Interrupt handler */
...@@ -355,8 +359,8 @@ static void __exit nsp_cs_exit(void); ...@@ -355,8 +359,8 @@ static void __exit nsp_cs_exit(void);
/* Debug */ /* Debug */
#ifdef NSP_DEBUG #ifdef NSP_DEBUG
static void show_command (Scsi_Cmnd *SCpnt); static void show_command (struct scsi_cmnd *SCpnt);
static void show_phase (Scsi_Cmnd *SCpnt); static void show_phase (struct scsi_cmnd *SCpnt);
static void show_busphase(unsigned char stat); static void show_busphase(unsigned char stat);
static void show_message (nsp_hw_data *data); static void show_message (nsp_hw_data *data);
#else #else
......
...@@ -138,12 +138,12 @@ static void print_commandk (unsigned char *command) ...@@ -138,12 +138,12 @@ static void print_commandk (unsigned char *command)
printk("\n"); printk("\n");
} }
static void show_command(Scsi_Cmnd *SCpnt) static void show_command(struct scsi_cmnd *SCpnt)
{ {
print_commandk(SCpnt->cmnd); print_commandk(SCpnt->cmnd);
} }
static void show_phase(Scsi_Cmnd *SCpnt) static void show_phase(struct scsi_cmnd *SCpnt)
{ {
int i = SCpnt->SCp.phase; int i = SCpnt->SCp.phase;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */ /* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */
static void nsp_message_in(Scsi_Cmnd *SCpnt) static void nsp_message_in(struct scsi_cmnd *SCpnt)
{ {
unsigned int base = SCpnt->device->host->io_port; unsigned int base = SCpnt->device->host->io_port;
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
...@@ -50,7 +50,7 @@ static void nsp_message_in(Scsi_Cmnd *SCpnt) ...@@ -50,7 +50,7 @@ static void nsp_message_in(Scsi_Cmnd *SCpnt)
} }
static void nsp_message_out(Scsi_Cmnd *SCpnt) static void nsp_message_out(struct scsi_cmnd *SCpnt)
{ {
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
int ret = 1; int ret = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment