aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c42
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.h46
-rw-r--r--drivers/scsi/pcmcia/nsp_debug.c4
-rw-r--r--drivers/scsi/pcmcia/nsp_message.c4
4 files changed, 51 insertions, 45 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index b1d346049525..f2d79c3f0b8e 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -183,7 +183,7 @@ static void nsp_cs_dmessage(const char *func, int line, int mask, char *fmt, ...
183 * Clenaup parameters and call done() functions. 183 * Clenaup parameters and call done() functions.
184 * You must be set SCpnt->result before call this function. 184 * You must be set SCpnt->result before call this function.
185 */ 185 */
186static void nsp_scsi_done(Scsi_Cmnd *SCpnt) 186static void nsp_scsi_done(struct scsi_cmnd *SCpnt)
187{ 187{
188 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 188 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
189 189
@@ -192,7 +192,8 @@ static void nsp_scsi_done(Scsi_Cmnd *SCpnt)
192 SCpnt->scsi_done(SCpnt); 192 SCpnt->scsi_done(SCpnt);
193} 193}
194 194
195static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) 195static int nsp_queuecommand(struct scsi_cmnd *SCpnt,
196 void (*done)(struct scsi_cmnd *))
196{ 197{
197#ifdef NSP_DEBUG 198#ifdef NSP_DEBUG
198 /*unsigned int host_id = SCpnt->device->host->this_id;*/ 199 /*unsigned int host_id = SCpnt->device->host->this_id;*/
@@ -365,7 +366,7 @@ static int nsphw_init(nsp_hw_data *data)
365/* 366/*
366 * Start selection phase 367 * Start selection phase
367 */ 368 */
368static int nsphw_start_selection(Scsi_Cmnd *SCpnt) 369static int nsphw_start_selection(struct scsi_cmnd *SCpnt)
369{ 370{
370 unsigned int host_id = SCpnt->device->host->this_id; 371 unsigned int host_id = SCpnt->device->host->this_id;
371 unsigned int base = SCpnt->device->host->io_port; 372 unsigned int base = SCpnt->device->host->io_port;
@@ -446,7 +447,7 @@ static struct nsp_sync_table nsp_sync_table_20M[] = {
446/* 447/*
447 * setup synchronous data transfer mode 448 * setup synchronous data transfer mode
448 */ 449 */
449static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) 450static int nsp_analyze_sdtr(struct scsi_cmnd *SCpnt)
450{ 451{
451 unsigned char target = scmd_id(SCpnt); 452 unsigned char target = scmd_id(SCpnt);
452// unsigned char lun = SCpnt->device->lun; 453// unsigned char lun = SCpnt->device->lun;
@@ -504,7 +505,7 @@ static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt)
504/* 505/*
505 * start ninja hardware timer 506 * start ninja hardware timer
506 */ 507 */
507static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time) 508static void nsp_start_timer(struct scsi_cmnd *SCpnt, int time)
508{ 509{
509 unsigned int base = SCpnt->device->host->io_port; 510 unsigned int base = SCpnt->device->host->io_port;
510 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 511 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/* 518/*
518 * wait for bus phase change 519 * wait for bus phase change
519 */ 520 */
520static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str) 521static int nsp_negate_signal(struct scsi_cmnd *SCpnt, unsigned char mask,
522 char *str)
521{ 523{
522 unsigned int base = SCpnt->device->host->io_port; 524 unsigned int base = SCpnt->device->host->io_port;
523 unsigned char reg; 525 unsigned char reg;
@@ -544,9 +546,9 @@ static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str)
544/* 546/*
545 * expect Ninja Irq 547 * expect Ninja Irq
546 */ 548 */
547static int nsp_expect_signal(Scsi_Cmnd *SCpnt, 549static int nsp_expect_signal(struct scsi_cmnd *SCpnt,
548 unsigned char current_phase, 550 unsigned char current_phase,
549 unsigned char mask) 551 unsigned char mask)
550{ 552{
551 unsigned int base = SCpnt->device->host->io_port; 553 unsigned int base = SCpnt->device->host->io_port;
552 int time_out; 554 int time_out;
@@ -579,7 +581,7 @@ static int nsp_expect_signal(Scsi_Cmnd *SCpnt,
579/* 581/*
580 * transfer SCSI message 582 * transfer SCSI message
581 */ 583 */
582static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase) 584static int nsp_xfer(struct scsi_cmnd *SCpnt, int phase)
583{ 585{
584 unsigned int base = SCpnt->device->host->io_port; 586 unsigned int base = SCpnt->device->host->io_port;
585 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 587 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/* 621/*
620 * get extra SCSI data from fifo 622 * get extra SCSI data from fifo
621 */ 623 */
622static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt) 624static int nsp_dataphase_bypass(struct scsi_cmnd *SCpnt)
623{ 625{
624 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 626 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
625 unsigned int count; 627 unsigned int count;
@@ -651,7 +653,7 @@ static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt)
651/* 653/*
652 * accept reselection 654 * accept reselection
653 */ 655 */
654static int nsp_reselected(Scsi_Cmnd *SCpnt) 656static int nsp_reselected(struct scsi_cmnd *SCpnt)
655{ 657{
656 unsigned int base = SCpnt->device->host->io_port; 658 unsigned int base = SCpnt->device->host->io_port;
657 unsigned int host_id = SCpnt->device->host->this_id; 659 unsigned int host_id = SCpnt->device->host->this_id;
@@ -690,7 +692,7 @@ static int nsp_reselected(Scsi_Cmnd *SCpnt)
690/* 692/*
691 * count how many data transferd 693 * count how many data transferd
692 */ 694 */
693static int nsp_fifo_count(Scsi_Cmnd *SCpnt) 695static int nsp_fifo_count(struct scsi_cmnd *SCpnt)
694{ 696{
695 unsigned int base = SCpnt->device->host->io_port; 697 unsigned int base = SCpnt->device->host->io_port;
696 unsigned int count; 698 unsigned int count;
@@ -717,7 +719,7 @@ static int nsp_fifo_count(Scsi_Cmnd *SCpnt)
717/* 719/*
718 * read data in DATA IN phase 720 * read data in DATA IN phase
719 */ 721 */
720static void nsp_pio_read(Scsi_Cmnd *SCpnt) 722static void nsp_pio_read(struct scsi_cmnd *SCpnt)
721{ 723{
722 unsigned int base = SCpnt->device->host->io_port; 724 unsigned int base = SCpnt->device->host->io_port;
723 unsigned long mmio_base = SCpnt->device->host->base; 725 unsigned long mmio_base = SCpnt->device->host->base;
@@ -812,7 +814,7 @@ static void nsp_pio_read(Scsi_Cmnd *SCpnt)
812/* 814/*
813 * write data in DATA OUT phase 815 * write data in DATA OUT phase
814 */ 816 */
815static void nsp_pio_write(Scsi_Cmnd *SCpnt) 817static void nsp_pio_write(struct scsi_cmnd *SCpnt)
816{ 818{
817 unsigned int base = SCpnt->device->host->io_port; 819 unsigned int base = SCpnt->device->host->io_port;
818 unsigned long mmio_base = SCpnt->device->host->base; 820 unsigned long mmio_base = SCpnt->device->host->base;
@@ -905,7 +907,7 @@ static void nsp_pio_write(Scsi_Cmnd *SCpnt)
905/* 907/*
906 * setup synchronous/asynchronous data transfer mode 908 * setup synchronous/asynchronous data transfer mode
907 */ 909 */
908static int nsp_nexus(Scsi_Cmnd *SCpnt) 910static int nsp_nexus(struct scsi_cmnd *SCpnt)
909{ 911{
910 unsigned int base = SCpnt->device->host->io_port; 912 unsigned int base = SCpnt->device->host->io_port;
911 unsigned char target = scmd_id(SCpnt); 913 unsigned char target = scmd_id(SCpnt);
@@ -952,7 +954,7 @@ static irqreturn_t nspintr(int irq, void *dev_id)
952{ 954{
953 unsigned int base; 955 unsigned int base;
954 unsigned char irq_status, irq_phase, phase; 956 unsigned char irq_status, irq_phase, phase;
955 Scsi_Cmnd *tmpSC; 957 struct scsi_cmnd *tmpSC;
956 unsigned char target, lun; 958 unsigned char target, lun;
957 unsigned int *sync_neg; 959 unsigned int *sync_neg;
958 int i, tmp; 960 int i, tmp;
@@ -1530,7 +1532,7 @@ nsp_proc_info(
1530/*---------------------------------------------------------------*/ 1532/*---------------------------------------------------------------*/
1531 1533
1532/* 1534/*
1533static int nsp_eh_abort(Scsi_Cmnd *SCpnt) 1535static int nsp_eh_abort(struct scsi_cmnd *SCpnt)
1534{ 1536{
1535 nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt); 1537 nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt);
1536 1538
@@ -1558,7 +1560,7 @@ static int nsp_bus_reset(nsp_hw_data *data)
1558 return SUCCESS; 1560 return SUCCESS;
1559} 1561}
1560 1562
1561static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt) 1563static int nsp_eh_bus_reset(struct scsi_cmnd *SCpnt)
1562{ 1564{
1563 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 1565 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
1564 1566
@@ -1567,7 +1569,7 @@ static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt)
1567 return nsp_bus_reset(data); 1569 return nsp_bus_reset(data);
1568} 1570}
1569 1571
1570static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt) 1572static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt)
1571{ 1573{
1572 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 1574 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
1573 1575
diff --git a/drivers/scsi/pcmcia/nsp_cs.h b/drivers/scsi/pcmcia/nsp_cs.h
index a88714f4c05b..625ca97da52d 100644
--- a/drivers/scsi/pcmcia/nsp_cs.h
+++ b/drivers/scsi/pcmcia/nsp_cs.h
@@ -266,7 +266,7 @@ typedef struct _nsp_hw_data {
266 266
267 int TimerCount; 267 int TimerCount;
268 int SelectionTimeOut; 268 int SelectionTimeOut;
269 Scsi_Cmnd *CurrentSC; 269 struct scsi_cmnd *CurrentSC;
270 //int CurrnetTarget; 270 //int CurrnetTarget;
271 271
272 int FifoCount; 272 int FifoCount;
@@ -319,30 +319,34 @@ static int nsp_proc_info (
319 int hostno, 319 int hostno,
320#endif 320#endif
321 int inout); 321 int inout);
322static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (* done)(Scsi_Cmnd *SCpnt)); 322static int nsp_queuecommand(struct scsi_cmnd *SCpnt,
323 void (* done)(struct scsi_cmnd *SCpnt));
323 324
324/* Error handler */ 325/* Error handler */
325/*static int nsp_eh_abort (Scsi_Cmnd *SCpnt);*/ 326/*static int nsp_eh_abort (struct scsi_cmnd *SCpnt);*/
326/*static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt);*/ 327/*static int nsp_eh_device_reset(struct scsi_cmnd *SCpnt);*/
327static int nsp_eh_bus_reset (Scsi_Cmnd *SCpnt); 328static int nsp_eh_bus_reset (struct scsi_cmnd *SCpnt);
328static int nsp_eh_host_reset (Scsi_Cmnd *SCpnt); 329static int nsp_eh_host_reset (struct scsi_cmnd *SCpnt);
329static int nsp_bus_reset (nsp_hw_data *data); 330static int nsp_bus_reset (nsp_hw_data *data);
330 331
331/* */ 332/* */
332static int nsphw_init (nsp_hw_data *data); 333static int nsphw_init (nsp_hw_data *data);
333static int nsphw_start_selection(Scsi_Cmnd *SCpnt); 334static int nsphw_start_selection(struct scsi_cmnd *SCpnt);
334static void nsp_start_timer (Scsi_Cmnd *SCpnt, int time); 335static void nsp_start_timer (struct scsi_cmnd *SCpnt, int time);
335static int nsp_fifo_count (Scsi_Cmnd *SCpnt); 336static int nsp_fifo_count (struct scsi_cmnd *SCpnt);
336static void nsp_pio_read (Scsi_Cmnd *SCpnt); 337static void nsp_pio_read (struct scsi_cmnd *SCpnt);
337static void nsp_pio_write (Scsi_Cmnd *SCpnt); 338static void nsp_pio_write (struct scsi_cmnd *SCpnt);
338static int nsp_nexus (Scsi_Cmnd *SCpnt); 339static int nsp_nexus (struct scsi_cmnd *SCpnt);
339static void nsp_scsi_done (Scsi_Cmnd *SCpnt); 340static void nsp_scsi_done (struct scsi_cmnd *SCpnt);
340static int nsp_analyze_sdtr (Scsi_Cmnd *SCpnt); 341static int nsp_analyze_sdtr (struct scsi_cmnd *SCpnt);
341static int nsp_negate_signal (Scsi_Cmnd *SCpnt, unsigned char mask, char *str); 342static int nsp_negate_signal (struct scsi_cmnd *SCpnt,
342static int nsp_expect_signal (Scsi_Cmnd *SCpnt, unsigned char current_phase, unsigned char mask); 343 unsigned char mask, char *str);
343static int nsp_xfer (Scsi_Cmnd *SCpnt, int phase); 344static int nsp_expect_signal (struct scsi_cmnd *SCpnt,
344static int nsp_dataphase_bypass (Scsi_Cmnd *SCpnt); 345 unsigned char current_phase,
345static int nsp_reselected (Scsi_Cmnd *SCpnt); 346 unsigned char mask);
347static int nsp_xfer (struct scsi_cmnd *SCpnt, int phase);
348static int nsp_dataphase_bypass (struct scsi_cmnd *SCpnt);
349static int nsp_reselected (struct scsi_cmnd *SCpnt);
346static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht); 350static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht);
347 351
348/* Interrupt handler */ 352/* Interrupt handler */
@@ -355,8 +359,8 @@ static void __exit nsp_cs_exit(void);
355 359
356/* Debug */ 360/* Debug */
357#ifdef NSP_DEBUG 361#ifdef NSP_DEBUG
358static void show_command (Scsi_Cmnd *SCpnt); 362static void show_command (struct scsi_cmnd *SCpnt);
359static void show_phase (Scsi_Cmnd *SCpnt); 363static void show_phase (struct scsi_cmnd *SCpnt);
360static void show_busphase(unsigned char stat); 364static void show_busphase(unsigned char stat);
361static void show_message (nsp_hw_data *data); 365static void show_message (nsp_hw_data *data);
362#else 366#else
diff --git a/drivers/scsi/pcmcia/nsp_debug.c b/drivers/scsi/pcmcia/nsp_debug.c
index 62e5c60067fd..2f75fe6e35a7 100644
--- a/drivers/scsi/pcmcia/nsp_debug.c
+++ b/drivers/scsi/pcmcia/nsp_debug.c
@@ -138,12 +138,12 @@ static void print_commandk (unsigned char *command)
138 printk("\n"); 138 printk("\n");
139} 139}
140 140
141static void show_command(Scsi_Cmnd *SCpnt) 141static void show_command(struct scsi_cmnd *SCpnt)
142{ 142{
143 print_commandk(SCpnt->cmnd); 143 print_commandk(SCpnt->cmnd);
144} 144}
145 145
146static void show_phase(Scsi_Cmnd *SCpnt) 146static void show_phase(struct scsi_cmnd *SCpnt)
147{ 147{
148 int i = SCpnt->SCp.phase; 148 int i = SCpnt->SCp.phase;
149 149
diff --git a/drivers/scsi/pcmcia/nsp_message.c b/drivers/scsi/pcmcia/nsp_message.c
index d7057737ff34..ef593b70d0f0 100644
--- a/drivers/scsi/pcmcia/nsp_message.c
+++ b/drivers/scsi/pcmcia/nsp_message.c
@@ -8,7 +8,7 @@
8 8
9/* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */ 9/* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */
10 10
11static void nsp_message_in(Scsi_Cmnd *SCpnt) 11static void nsp_message_in(struct scsi_cmnd *SCpnt)
12{ 12{
13 unsigned int base = SCpnt->device->host->io_port; 13 unsigned int base = SCpnt->device->host->io_port;
14 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 14 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
@@ -50,7 +50,7 @@ static void nsp_message_in(Scsi_Cmnd *SCpnt)
50 50
51} 51}
52 52
53static void nsp_message_out(Scsi_Cmnd *SCpnt) 53static void nsp_message_out(struct scsi_cmnd *SCpnt)
54{ 54{
55 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 55 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
56 int ret = 1; 56 int ret = 1;