aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/nsp_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pcmcia/nsp_cs.c')
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c42
1 files changed, 22 insertions, 20 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