Commit 0fc82d5e84825ab43006f40935633120d23c2e15
Committed by
James Bottomley
1 parent
c543a3739c
Exists in
master
and in
7 other branches
[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>
Showing 4 changed files with 51 additions and 45 deletions Side-by-side Diff
drivers/scsi/pcmcia/nsp_cs.c
... | ... | @@ -183,7 +183,7 @@ |
183 | 183 | * Clenaup parameters and call done() functions. |
184 | 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 | 188 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
189 | 189 | |
... | ... | @@ -192,7 +192,8 @@ |
192 | 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 | 198 | #ifdef NSP_DEBUG |
198 | 199 | /*unsigned int host_id = SCpnt->device->host->this_id;*/ |
... | ... | @@ -365,7 +366,7 @@ |
365 | 366 | /* |
366 | 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 | 371 | unsigned int host_id = SCpnt->device->host->this_id; |
371 | 372 | unsigned int base = SCpnt->device->host->io_port; |
... | ... | @@ -446,7 +447,7 @@ |
446 | 447 | /* |
447 | 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 | 452 | unsigned char target = scmd_id(SCpnt); |
452 | 453 | // unsigned char lun = SCpnt->device->lun; |
... | ... | @@ -504,7 +505,7 @@ |
504 | 505 | /* |
505 | 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 | 510 | unsigned int base = SCpnt->device->host->io_port; |
510 | 511 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
... | ... | @@ -517,7 +518,8 @@ |
517 | 518 | /* |
518 | 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 | 524 | unsigned int base = SCpnt->device->host->io_port; |
523 | 525 | unsigned char reg; |
... | ... | @@ -544,9 +546,9 @@ |
544 | 546 | /* |
545 | 547 | * expect Ninja Irq |
546 | 548 | */ |
547 | -static int nsp_expect_signal(Scsi_Cmnd *SCpnt, | |
548 | - unsigned char current_phase, | |
549 | - unsigned char mask) | |
549 | +static int nsp_expect_signal(struct scsi_cmnd *SCpnt, | |
550 | + unsigned char current_phase, | |
551 | + unsigned char mask) | |
550 | 552 | { |
551 | 553 | unsigned int base = SCpnt->device->host->io_port; |
552 | 554 | int time_out; |
... | ... | @@ -579,7 +581,7 @@ |
579 | 581 | /* |
580 | 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 | 586 | unsigned int base = SCpnt->device->host->io_port; |
585 | 587 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
... | ... | @@ -619,7 +621,7 @@ |
619 | 621 | /* |
620 | 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 | 626 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
625 | 627 | unsigned int count; |
... | ... | @@ -651,7 +653,7 @@ |
651 | 653 | /* |
652 | 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 | 658 | unsigned int base = SCpnt->device->host->io_port; |
657 | 659 | unsigned int host_id = SCpnt->device->host->this_id; |
... | ... | @@ -690,7 +692,7 @@ |
690 | 692 | /* |
691 | 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 | 697 | unsigned int base = SCpnt->device->host->io_port; |
696 | 698 | unsigned int count; |
... | ... | @@ -717,7 +719,7 @@ |
717 | 719 | /* |
718 | 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 | 724 | unsigned int base = SCpnt->device->host->io_port; |
723 | 725 | unsigned long mmio_base = SCpnt->device->host->base; |
... | ... | @@ -812,7 +814,7 @@ |
812 | 814 | /* |
813 | 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 | 819 | unsigned int base = SCpnt->device->host->io_port; |
818 | 820 | unsigned long mmio_base = SCpnt->device->host->base; |
... | ... | @@ -905,7 +907,7 @@ |
905 | 907 | /* |
906 | 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 | 912 | unsigned int base = SCpnt->device->host->io_port; |
911 | 913 | unsigned char target = scmd_id(SCpnt); |
... | ... | @@ -952,7 +954,7 @@ |
952 | 954 | { |
953 | 955 | unsigned int base; |
954 | 956 | unsigned char irq_status, irq_phase, phase; |
955 | - Scsi_Cmnd *tmpSC; | |
957 | + struct scsi_cmnd *tmpSC; | |
956 | 958 | unsigned char target, lun; |
957 | 959 | unsigned int *sync_neg; |
958 | 960 | int i, tmp; |
... | ... | @@ -1530,7 +1532,7 @@ |
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 | 1537 | nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt); |
1536 | 1538 | |
... | ... | @@ -1558,7 +1560,7 @@ |
1558 | 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 | 1565 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
1564 | 1566 | |
... | ... | @@ -1567,7 +1569,7 @@ |
1567 | 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 | 1574 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
1573 | 1575 |
drivers/scsi/pcmcia/nsp_cs.h
... | ... | @@ -266,7 +266,7 @@ |
266 | 266 | |
267 | 267 | int TimerCount; |
268 | 268 | int SelectionTimeOut; |
269 | - Scsi_Cmnd *CurrentSC; | |
269 | + struct scsi_cmnd *CurrentSC; | |
270 | 270 | //int CurrnetTarget; |
271 | 271 | |
272 | 272 | int FifoCount; |
273 | 273 | |
274 | 274 | |
... | ... | @@ -319,30 +319,34 @@ |
319 | 319 | int hostno, |
320 | 320 | #endif |
321 | 321 | int inout); |
322 | -static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (* done)(Scsi_Cmnd *SCpnt)); | |
322 | +static int nsp_queuecommand(struct scsi_cmnd *SCpnt, | |
323 | + void (* done)(struct scsi_cmnd *SCpnt)); | |
323 | 324 | |
324 | 325 | /* Error handler */ |
325 | -/*static int nsp_eh_abort (Scsi_Cmnd *SCpnt);*/ | |
326 | -/*static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt);*/ | |
327 | -static int nsp_eh_bus_reset (Scsi_Cmnd *SCpnt); | |
328 | -static int nsp_eh_host_reset (Scsi_Cmnd *SCpnt); | |
326 | +/*static int nsp_eh_abort (struct scsi_cmnd *SCpnt);*/ | |
327 | +/*static int nsp_eh_device_reset(struct scsi_cmnd *SCpnt);*/ | |
328 | +static int nsp_eh_bus_reset (struct scsi_cmnd *SCpnt); | |
329 | +static int nsp_eh_host_reset (struct scsi_cmnd *SCpnt); | |
329 | 330 | static int nsp_bus_reset (nsp_hw_data *data); |
330 | 331 | |
331 | 332 | /* */ |
332 | 333 | static int nsphw_init (nsp_hw_data *data); |
333 | -static int nsphw_start_selection(Scsi_Cmnd *SCpnt); | |
334 | -static void nsp_start_timer (Scsi_Cmnd *SCpnt, int time); | |
335 | -static int nsp_fifo_count (Scsi_Cmnd *SCpnt); | |
336 | -static void nsp_pio_read (Scsi_Cmnd *SCpnt); | |
337 | -static void nsp_pio_write (Scsi_Cmnd *SCpnt); | |
338 | -static int nsp_nexus (Scsi_Cmnd *SCpnt); | |
339 | -static void nsp_scsi_done (Scsi_Cmnd *SCpnt); | |
340 | -static int nsp_analyze_sdtr (Scsi_Cmnd *SCpnt); | |
341 | -static int nsp_negate_signal (Scsi_Cmnd *SCpnt, unsigned char mask, char *str); | |
342 | -static int nsp_expect_signal (Scsi_Cmnd *SCpnt, unsigned char current_phase, unsigned char mask); | |
343 | -static int nsp_xfer (Scsi_Cmnd *SCpnt, int phase); | |
344 | -static int nsp_dataphase_bypass (Scsi_Cmnd *SCpnt); | |
345 | -static int nsp_reselected (Scsi_Cmnd *SCpnt); | |
334 | +static int nsphw_start_selection(struct scsi_cmnd *SCpnt); | |
335 | +static void nsp_start_timer (struct scsi_cmnd *SCpnt, int time); | |
336 | +static int nsp_fifo_count (struct scsi_cmnd *SCpnt); | |
337 | +static void nsp_pio_read (struct scsi_cmnd *SCpnt); | |
338 | +static void nsp_pio_write (struct scsi_cmnd *SCpnt); | |
339 | +static int nsp_nexus (struct scsi_cmnd *SCpnt); | |
340 | +static void nsp_scsi_done (struct scsi_cmnd *SCpnt); | |
341 | +static int nsp_analyze_sdtr (struct scsi_cmnd *SCpnt); | |
342 | +static int nsp_negate_signal (struct scsi_cmnd *SCpnt, | |
343 | + unsigned char mask, char *str); | |
344 | +static int nsp_expect_signal (struct scsi_cmnd *SCpnt, | |
345 | + unsigned char current_phase, | |
346 | + unsigned char mask); | |
347 | +static int nsp_xfer (struct scsi_cmnd *SCpnt, int phase); | |
348 | +static int nsp_dataphase_bypass (struct scsi_cmnd *SCpnt); | |
349 | +static int nsp_reselected (struct scsi_cmnd *SCpnt); | |
346 | 350 | static struct Scsi_Host *nsp_detect(struct scsi_host_template *sht); |
347 | 351 | |
348 | 352 | /* Interrupt handler */ |
... | ... | @@ -355,8 +359,8 @@ |
355 | 359 | |
356 | 360 | /* Debug */ |
357 | 361 | #ifdef NSP_DEBUG |
358 | -static void show_command (Scsi_Cmnd *SCpnt); | |
359 | -static void show_phase (Scsi_Cmnd *SCpnt); | |
362 | +static void show_command (struct scsi_cmnd *SCpnt); | |
363 | +static void show_phase (struct scsi_cmnd *SCpnt); | |
360 | 364 | static void show_busphase(unsigned char stat); |
361 | 365 | static void show_message (nsp_hw_data *data); |
362 | 366 | #else |
drivers/scsi/pcmcia/nsp_debug.c
... | ... | @@ -138,12 +138,12 @@ |
138 | 138 | printk("\n"); |
139 | 139 | } |
140 | 140 | |
141 | -static void show_command(Scsi_Cmnd *SCpnt) | |
141 | +static void show_command(struct scsi_cmnd *SCpnt) | |
142 | 142 | { |
143 | 143 | print_commandk(SCpnt->cmnd); |
144 | 144 | } |
145 | 145 | |
146 | -static void show_phase(Scsi_Cmnd *SCpnt) | |
146 | +static void show_phase(struct scsi_cmnd *SCpnt) | |
147 | 147 | { |
148 | 148 | int i = SCpnt->SCp.phase; |
149 | 149 |
drivers/scsi/pcmcia/nsp_message.c
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | |
9 | 9 | /* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */ |
10 | 10 | |
11 | -static void nsp_message_in(Scsi_Cmnd *SCpnt) | |
11 | +static void nsp_message_in(struct scsi_cmnd *SCpnt) | |
12 | 12 | { |
13 | 13 | unsigned int base = SCpnt->device->host->io_port; |
14 | 14 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | |
51 | 51 | } |
52 | 52 | |
53 | -static void nsp_message_out(Scsi_Cmnd *SCpnt) | |
53 | +static void nsp_message_out(struct scsi_cmnd *SCpnt) | |
54 | 54 | { |
55 | 55 | nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; |
56 | 56 | int ret = 1; |