diff options
author | Henrik Kretzschmar <henne@nachtwindheim.de> | 2006-10-10 17:41:41 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-25 18:12:42 -0400 |
commit | 0fc82d5e84825ab43006f40935633120d23c2e15 (patch) | |
tree | 91b6c70efac493e06c7ba3076f9aa4f1ada32be7 /drivers/scsi/pcmcia/nsp_cs.c | |
parent | c543a3739c2a3034c80d77a189bd187c43a00feb (diff) |
[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: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/pcmcia/nsp_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 42 |
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 | */ |
186 | static void nsp_scsi_done(Scsi_Cmnd *SCpnt) | 186 | static 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 | ||
195 | static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) | 195 | static 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 | */ |
368 | static int nsphw_start_selection(Scsi_Cmnd *SCpnt) | 369 | static 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 | */ |
449 | static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) | 450 | static 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 | */ |
507 | static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time) | 508 | static 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 | */ |
520 | static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str) | 521 | static 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 | */ |
547 | static int nsp_expect_signal(Scsi_Cmnd *SCpnt, | 549 | static 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 | */ |
582 | static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase) | 584 | static 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 | */ |
622 | static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt) | 624 | static 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 | */ |
654 | static int nsp_reselected(Scsi_Cmnd *SCpnt) | 656 | static 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 | */ |
693 | static int nsp_fifo_count(Scsi_Cmnd *SCpnt) | 695 | static 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 | */ |
720 | static void nsp_pio_read(Scsi_Cmnd *SCpnt) | 722 | static 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 | */ |
815 | static void nsp_pio_write(Scsi_Cmnd *SCpnt) | 817 | static 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 | */ |
908 | static int nsp_nexus(Scsi_Cmnd *SCpnt) | 910 | static 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 | /* |
1533 | static int nsp_eh_abort(Scsi_Cmnd *SCpnt) | 1535 | static 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 | ||
1561 | static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt) | 1563 | static 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 | ||
1570 | static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt) | 1572 | static 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 | ||