Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Henrik Kretzschmar and committed by
James Bottomley
0fc82d5e c543a373

+51 -45
+22 -20
drivers/scsi/pcmcia/nsp_cs.c
··· 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 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;*/ ··· 366 365 /* 367 366 * Start selection phase 368 367 */ 369 - static int nsphw_start_selection(Scsi_Cmnd *SCpnt) 368 + static int nsphw_start_selection(struct scsi_cmnd *SCpnt) 370 369 { 371 370 unsigned int host_id = SCpnt->device->host->this_id; 372 371 unsigned int base = SCpnt->device->host->io_port; ··· 447 446 /* 448 447 * setup synchronous data transfer mode 449 448 */ 450 - static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) 449 + static int nsp_analyze_sdtr(struct scsi_cmnd *SCpnt) 451 450 { 452 451 unsigned char target = scmd_id(SCpnt); 453 452 // unsigned char lun = SCpnt->device->lun; ··· 505 504 /* 506 505 * start ninja hardware timer 507 506 */ 508 - static void nsp_start_timer(Scsi_Cmnd *SCpnt, int time) 507 + static void nsp_start_timer(struct scsi_cmnd *SCpnt, int time) 509 508 { 510 509 unsigned int base = SCpnt->device->host->io_port; 511 510 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; ··· 518 517 /* 519 518 * wait for bus phase change 520 519 */ 521 - static int nsp_negate_signal(Scsi_Cmnd *SCpnt, unsigned char mask, char *str) 520 + static int nsp_negate_signal(struct scsi_cmnd *SCpnt, unsigned char mask, 521 + char *str) 522 522 { 523 523 unsigned int base = SCpnt->device->host->io_port; 524 524 unsigned char reg; ··· 546 544 /* 547 545 * expect Ninja Irq 548 546 */ 549 - static int nsp_expect_signal(Scsi_Cmnd *SCpnt, 550 - unsigned char current_phase, 551 - unsigned char mask) 547 + static int nsp_expect_signal(struct scsi_cmnd *SCpnt, 548 + unsigned char current_phase, 549 + unsigned char mask) 552 550 { 553 551 unsigned int base = SCpnt->device->host->io_port; 554 552 int time_out; ··· 581 579 /* 582 580 * transfer SCSI message 583 581 */ 584 - static int nsp_xfer(Scsi_Cmnd *SCpnt, int phase) 582 + static int nsp_xfer(struct scsi_cmnd *SCpnt, int phase) 585 583 { 586 584 unsigned int base = SCpnt->device->host->io_port; 587 585 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; ··· 621 619 /* 622 620 * get extra SCSI data from fifo 623 621 */ 624 - static int nsp_dataphase_bypass(Scsi_Cmnd *SCpnt) 622 + static int nsp_dataphase_bypass(struct scsi_cmnd *SCpnt) 625 623 { 626 624 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 627 625 unsigned int count; ··· 653 651 /* 654 652 * accept reselection 655 653 */ 656 - static int nsp_reselected(Scsi_Cmnd *SCpnt) 654 + static int nsp_reselected(struct scsi_cmnd *SCpnt) 657 655 { 658 656 unsigned int base = SCpnt->device->host->io_port; 659 657 unsigned int host_id = SCpnt->device->host->this_id; ··· 692 690 /* 693 691 * count how many data transferd 694 692 */ 695 - static int nsp_fifo_count(Scsi_Cmnd *SCpnt) 693 + static int nsp_fifo_count(struct scsi_cmnd *SCpnt) 696 694 { 697 695 unsigned int base = SCpnt->device->host->io_port; 698 696 unsigned int count; ··· 719 717 /* 720 718 * read data in DATA IN phase 721 719 */ 722 - static void nsp_pio_read(Scsi_Cmnd *SCpnt) 720 + static void nsp_pio_read(struct scsi_cmnd *SCpnt) 723 721 { 724 722 unsigned int base = SCpnt->device->host->io_port; 725 723 unsigned long mmio_base = SCpnt->device->host->base; ··· 814 812 /* 815 813 * write data in DATA OUT phase 816 814 */ 817 - static void nsp_pio_write(Scsi_Cmnd *SCpnt) 815 + static void nsp_pio_write(struct scsi_cmnd *SCpnt) 818 816 { 819 817 unsigned int base = SCpnt->device->host->io_port; 820 818 unsigned long mmio_base = SCpnt->device->host->base; ··· 907 905 /* 908 906 * setup synchronous/asynchronous data transfer mode 909 907 */ 910 - static int nsp_nexus(Scsi_Cmnd *SCpnt) 908 + static int nsp_nexus(struct scsi_cmnd *SCpnt) 911 909 { 912 910 unsigned int base = SCpnt->device->host->io_port; 913 911 unsigned char target = scmd_id(SCpnt); ··· 954 952 { 955 953 unsigned int base; 956 954 unsigned char irq_status, irq_phase, phase; 957 - Scsi_Cmnd *tmpSC; 955 + struct scsi_cmnd *tmpSC; 958 956 unsigned char target, lun; 959 957 unsigned int *sync_neg; 960 958 int i, tmp; ··· 1532 1530 /*---------------------------------------------------------------*/ 1533 1531 1534 1532 /* 1535 - static int nsp_eh_abort(Scsi_Cmnd *SCpnt) 1533 + static int nsp_eh_abort(struct scsi_cmnd *SCpnt) 1536 1534 { 1537 1535 nsp_dbg(NSP_DEBUG_BUSRESET, "SCpnt=0x%p", SCpnt); 1538 1536 ··· 1560 1558 return SUCCESS; 1561 1559 } 1562 1560 1563 - static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt) 1561 + static int nsp_eh_bus_reset(struct scsi_cmnd *SCpnt) 1564 1562 { 1565 1563 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 1566 1564 ··· 1569 1567 return nsp_bus_reset(data); 1570 1568 } 1571 1569 1572 - static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt) 1570 + static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt) 1573 1571 { 1574 1572 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 1575 1573
+25 -21
drivers/scsi/pcmcia/nsp_cs.h
··· 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; ··· 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 */ ··· 359 355 360 356 /* Debug */ 361 357 #ifdef NSP_DEBUG 362 - static void show_command (Scsi_Cmnd *SCpnt); 363 - static void show_phase (Scsi_Cmnd *SCpnt); 358 + static void show_command (struct scsi_cmnd *SCpnt); 359 + static void show_phase (struct scsi_cmnd *SCpnt); 364 360 static void show_busphase(unsigned char stat); 365 361 static void show_message (nsp_hw_data *data); 366 362 #else
+2 -2
drivers/scsi/pcmcia/nsp_debug.c
··· 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
+2 -2
drivers/scsi/pcmcia/nsp_message.c
··· 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 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;