diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:12:02 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:10 -0500 |
commit | 710ddd0d50d22b40e3b644ea35966489ad178978 (patch) | |
tree | 369372711b0de942f7206a23425cdca79d379519 /drivers/scsi/atari_NCR5380.c | |
parent | 96068e6b4d86a397f50ae401723f315110874e1a (diff) |
ncr5380: Drop legacy scsi.h include
Convert Scsi_Cmnd to struct scsi_cmnd and drop the #include "scsi.h".
The sun3_NCR5380.c core driver already uses struct scsi_cmnd so converting
the other core drivers reduces the diff which makes them easier to unify.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/atari_NCR5380.c')
-rw-r--r-- | drivers/scsi/atari_NCR5380.c | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 31bd81210fc4..4eeb9684977b 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -262,9 +262,9 @@ static struct scsi_host_template *the_template = NULL; | |||
262 | (struct NCR5380_hostdata *)(in)->hostdata | 262 | (struct NCR5380_hostdata *)(in)->hostdata |
263 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) | 263 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) |
264 | 264 | ||
265 | #define NEXT(cmd) ((Scsi_Cmnd *)(cmd)->host_scribble) | 265 | #define NEXT(cmd) ((struct scsi_cmnd *)(cmd)->host_scribble) |
266 | #define SET_NEXT(cmd,next) ((cmd)->host_scribble = (void *)(next)) | 266 | #define SET_NEXT(cmd,next) ((cmd)->host_scribble = (void *)(next)) |
267 | #define NEXTADDR(cmd) ((Scsi_Cmnd **)&(cmd)->host_scribble) | 267 | #define NEXTADDR(cmd) ((struct scsi_cmnd **)&(cmd)->host_scribble) |
268 | 268 | ||
269 | #define HOSTNO instance->host_no | 269 | #define HOSTNO instance->host_no |
270 | #define H_NO(cmd) (cmd)->device->host->host_no | 270 | #define H_NO(cmd) (cmd)->device->host->host_no |
@@ -345,7 +345,7 @@ static void __init init_tags(void) | |||
345 | * conditions. | 345 | * conditions. |
346 | */ | 346 | */ |
347 | 347 | ||
348 | static int is_lun_busy(Scsi_Cmnd *cmd, int should_be_tagged) | 348 | static int is_lun_busy(struct scsi_cmnd *cmd, int should_be_tagged) |
349 | { | 349 | { |
350 | u8 lun = cmd->device->lun; | 350 | u8 lun = cmd->device->lun; |
351 | SETUP_HOSTDATA(cmd->device->host); | 351 | SETUP_HOSTDATA(cmd->device->host); |
@@ -370,7 +370,7 @@ static int is_lun_busy(Scsi_Cmnd *cmd, int should_be_tagged) | |||
370 | * untagged. | 370 | * untagged. |
371 | */ | 371 | */ |
372 | 372 | ||
373 | static void cmd_get_tag(Scsi_Cmnd *cmd, int should_be_tagged) | 373 | static void cmd_get_tag(struct scsi_cmnd *cmd, int should_be_tagged) |
374 | { | 374 | { |
375 | u8 lun = cmd->device->lun; | 375 | u8 lun = cmd->device->lun; |
376 | SETUP_HOSTDATA(cmd->device->host); | 376 | SETUP_HOSTDATA(cmd->device->host); |
@@ -402,7 +402,7 @@ static void cmd_get_tag(Scsi_Cmnd *cmd, int should_be_tagged) | |||
402 | * unlock the LUN. | 402 | * unlock the LUN. |
403 | */ | 403 | */ |
404 | 404 | ||
405 | static void cmd_free_tag(Scsi_Cmnd *cmd) | 405 | static void cmd_free_tag(struct scsi_cmnd *cmd) |
406 | { | 406 | { |
407 | u8 lun = cmd->device->lun; | 407 | u8 lun = cmd->device->lun; |
408 | SETUP_HOSTDATA(cmd->device->host); | 408 | SETUP_HOSTDATA(cmd->device->host); |
@@ -445,18 +445,18 @@ static void free_all_tags(void) | |||
445 | 445 | ||
446 | 446 | ||
447 | /* | 447 | /* |
448 | * Function: void merge_contiguous_buffers( Scsi_Cmnd *cmd ) | 448 | * Function: void merge_contiguous_buffers( struct scsi_cmnd *cmd ) |
449 | * | 449 | * |
450 | * Purpose: Try to merge several scatter-gather requests into one DMA | 450 | * Purpose: Try to merge several scatter-gather requests into one DMA |
451 | * transfer. This is possible if the scatter buffers lie on | 451 | * transfer. This is possible if the scatter buffers lie on |
452 | * physical contiguous addresses. | 452 | * physical contiguous addresses. |
453 | * | 453 | * |
454 | * Parameters: Scsi_Cmnd *cmd | 454 | * Parameters: struct scsi_cmnd *cmd |
455 | * The command to work on. The first scatter buffer's data are | 455 | * The command to work on. The first scatter buffer's data are |
456 | * assumed to be already transferred into ptr/this_residual. | 456 | * assumed to be already transferred into ptr/this_residual. |
457 | */ | 457 | */ |
458 | 458 | ||
459 | static void merge_contiguous_buffers(Scsi_Cmnd *cmd) | 459 | static void merge_contiguous_buffers(struct scsi_cmnd *cmd) |
460 | { | 460 | { |
461 | unsigned long endaddr; | 461 | unsigned long endaddr; |
462 | #if (NDEBUG & NDEBUG_MERGING) | 462 | #if (NDEBUG & NDEBUG_MERGING) |
@@ -485,15 +485,15 @@ static void merge_contiguous_buffers(Scsi_Cmnd *cmd) | |||
485 | } | 485 | } |
486 | 486 | ||
487 | /* | 487 | /* |
488 | * Function : void initialize_SCp(Scsi_Cmnd *cmd) | 488 | * Function : void initialize_SCp(struct scsi_cmnd *cmd) |
489 | * | 489 | * |
490 | * Purpose : initialize the saved data pointers for cmd to point to the | 490 | * Purpose : initialize the saved data pointers for cmd to point to the |
491 | * start of the buffer. | 491 | * start of the buffer. |
492 | * | 492 | * |
493 | * Inputs : cmd - Scsi_Cmnd structure to have pointers reset. | 493 | * Inputs : cmd - scsi_cmnd structure to have pointers reset. |
494 | */ | 494 | */ |
495 | 495 | ||
496 | static inline void initialize_SCp(Scsi_Cmnd *cmd) | 496 | static inline void initialize_SCp(struct scsi_cmnd *cmd) |
497 | { | 497 | { |
498 | /* | 498 | /* |
499 | * Initialize the Scsi Pointer field so that all of the commands in the | 499 | * Initialize the Scsi Pointer field so that all of the commands in the |
@@ -714,7 +714,7 @@ static void prepare_info(struct Scsi_Host *instance) | |||
714 | * Inputs : instance, pointer to this instance. | 714 | * Inputs : instance, pointer to this instance. |
715 | */ | 715 | */ |
716 | 716 | ||
717 | static void lprint_Scsi_Cmnd(Scsi_Cmnd *cmd) | 717 | static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd) |
718 | { | 718 | { |
719 | int i, s; | 719 | int i, s; |
720 | unsigned char *command; | 720 | unsigned char *command; |
@@ -731,7 +731,7 @@ static void lprint_Scsi_Cmnd(Scsi_Cmnd *cmd) | |||
731 | static void NCR5380_print_status(struct Scsi_Host *instance) | 731 | static void NCR5380_print_status(struct Scsi_Host *instance) |
732 | { | 732 | { |
733 | struct NCR5380_hostdata *hostdata; | 733 | struct NCR5380_hostdata *hostdata; |
734 | Scsi_Cmnd *ptr; | 734 | struct scsi_cmnd *ptr; |
735 | unsigned long flags; | 735 | unsigned long flags; |
736 | 736 | ||
737 | NCR5380_dprint(NDEBUG_ANY, instance); | 737 | NCR5380_dprint(NDEBUG_ANY, instance); |
@@ -745,13 +745,13 @@ static void NCR5380_print_status(struct Scsi_Host *instance) | |||
745 | if (!hostdata->connected) | 745 | if (!hostdata->connected) |
746 | printk("scsi%d: no currently connected command\n", HOSTNO); | 746 | printk("scsi%d: no currently connected command\n", HOSTNO); |
747 | else | 747 | else |
748 | lprint_Scsi_Cmnd((Scsi_Cmnd *) hostdata->connected); | 748 | lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected); |
749 | printk("scsi%d: issue_queue\n", HOSTNO); | 749 | printk("scsi%d: issue_queue\n", HOSTNO); |
750 | for (ptr = (Scsi_Cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) | 750 | for (ptr = (struct scsi_cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) |
751 | lprint_Scsi_Cmnd(ptr); | 751 | lprint_Scsi_Cmnd(ptr); |
752 | 752 | ||
753 | printk("scsi%d: disconnected_queue\n", HOSTNO); | 753 | printk("scsi%d: disconnected_queue\n", HOSTNO); |
754 | for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; | 754 | for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; |
755 | ptr = NEXT(ptr)) | 755 | ptr = NEXT(ptr)) |
756 | lprint_Scsi_Cmnd(ptr); | 756 | lprint_Scsi_Cmnd(ptr); |
757 | 757 | ||
@@ -759,7 +759,7 @@ static void NCR5380_print_status(struct Scsi_Host *instance) | |||
759 | printk("\n"); | 759 | printk("\n"); |
760 | } | 760 | } |
761 | 761 | ||
762 | static void show_Scsi_Cmnd(Scsi_Cmnd *cmd, struct seq_file *m) | 762 | static void show_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) |
763 | { | 763 | { |
764 | int i, s; | 764 | int i, s; |
765 | unsigned char *command; | 765 | unsigned char *command; |
@@ -777,7 +777,7 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
777 | struct Scsi_Host *instance) | 777 | struct Scsi_Host *instance) |
778 | { | 778 | { |
779 | struct NCR5380_hostdata *hostdata; | 779 | struct NCR5380_hostdata *hostdata; |
780 | Scsi_Cmnd *ptr; | 780 | struct scsi_cmnd *ptr; |
781 | unsigned long flags; | 781 | unsigned long flags; |
782 | 782 | ||
783 | hostdata = (struct NCR5380_hostdata *)instance->hostdata; | 783 | hostdata = (struct NCR5380_hostdata *)instance->hostdata; |
@@ -788,13 +788,13 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
788 | if (!hostdata->connected) | 788 | if (!hostdata->connected) |
789 | seq_printf(m, "scsi%d: no currently connected command\n", HOSTNO); | 789 | seq_printf(m, "scsi%d: no currently connected command\n", HOSTNO); |
790 | else | 790 | else |
791 | show_Scsi_Cmnd((Scsi_Cmnd *) hostdata->connected, m); | 791 | show_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); |
792 | seq_printf(m, "scsi%d: issue_queue\n", HOSTNO); | 792 | seq_printf(m, "scsi%d: issue_queue\n", HOSTNO); |
793 | for (ptr = (Scsi_Cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) | 793 | for (ptr = (struct scsi_cmnd *)hostdata->issue_queue; ptr; ptr = NEXT(ptr)) |
794 | show_Scsi_Cmnd(ptr, m); | 794 | show_Scsi_Cmnd(ptr, m); |
795 | 795 | ||
796 | seq_printf(m, "scsi%d: disconnected_queue\n", HOSTNO); | 796 | seq_printf(m, "scsi%d: disconnected_queue\n", HOSTNO); |
797 | for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; | 797 | for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; |
798 | ptr = NEXT(ptr)) | 798 | ptr = NEXT(ptr)) |
799 | show_Scsi_Cmnd(ptr, m); | 799 | show_Scsi_Cmnd(ptr, m); |
800 | 800 | ||
@@ -862,8 +862,8 @@ static void NCR5380_exit(struct Scsi_Host *instance) | |||
862 | } | 862 | } |
863 | 863 | ||
864 | /* | 864 | /* |
865 | * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd, | 865 | * Function : int NCR5380_queue_command (struct scsi_cmnd *cmd, |
866 | * void (*done)(Scsi_Cmnd *)) | 866 | * void (*done)(struct scsi_cmnd *)) |
867 | * | 867 | * |
868 | * Purpose : enqueues a SCSI command | 868 | * Purpose : enqueues a SCSI command |
869 | * | 869 | * |
@@ -879,10 +879,11 @@ static void NCR5380_exit(struct Scsi_Host *instance) | |||
879 | * | 879 | * |
880 | */ | 880 | */ |
881 | 881 | ||
882 | static int NCR5380_queue_command_lck(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) | 882 | static int NCR5380_queue_command_lck(struct scsi_cmnd *cmd, |
883 | void (*done)(struct scsi_cmnd *)) | ||
883 | { | 884 | { |
884 | SETUP_HOSTDATA(cmd->device->host); | 885 | SETUP_HOSTDATA(cmd->device->host); |
885 | Scsi_Cmnd *tmp; | 886 | struct scsi_cmnd *tmp; |
886 | unsigned long flags; | 887 | unsigned long flags; |
887 | 888 | ||
888 | #if (NDEBUG & NDEBUG_NO_WRITE) | 889 | #if (NDEBUG & NDEBUG_NO_WRITE) |
@@ -937,7 +938,7 @@ static int NCR5380_queue_command_lck(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) | |||
937 | SET_NEXT(cmd, hostdata->issue_queue); | 938 | SET_NEXT(cmd, hostdata->issue_queue); |
938 | hostdata->issue_queue = cmd; | 939 | hostdata->issue_queue = cmd; |
939 | } else { | 940 | } else { |
940 | for (tmp = (Scsi_Cmnd *)hostdata->issue_queue; | 941 | for (tmp = (struct scsi_cmnd *)hostdata->issue_queue; |
941 | NEXT(tmp); tmp = NEXT(tmp)) | 942 | NEXT(tmp); tmp = NEXT(tmp)) |
942 | ; | 943 | ; |
943 | LIST(cmd, tmp); | 944 | LIST(cmd, tmp); |
@@ -978,7 +979,7 @@ static DEF_SCSI_QCMD(NCR5380_queue_command) | |||
978 | 979 | ||
979 | static void NCR5380_main(struct work_struct *work) | 980 | static void NCR5380_main(struct work_struct *work) |
980 | { | 981 | { |
981 | Scsi_Cmnd *tmp, *prev; | 982 | struct scsi_cmnd *tmp, *prev; |
982 | struct Scsi_Host *instance = first_instance; | 983 | struct Scsi_Host *instance = first_instance; |
983 | struct NCR5380_hostdata *hostdata = HOSTDATA(instance); | 984 | struct NCR5380_hostdata *hostdata = HOSTDATA(instance); |
984 | int done; | 985 | int done; |
@@ -1021,7 +1022,7 @@ static void NCR5380_main(struct work_struct *work) | |||
1021 | * for a target that's not busy. | 1022 | * for a target that's not busy. |
1022 | */ | 1023 | */ |
1023 | #if (NDEBUG & NDEBUG_LISTS) | 1024 | #if (NDEBUG & NDEBUG_LISTS) |
1024 | for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; | 1025 | for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; |
1025 | tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp)) | 1026 | tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp)) |
1026 | ; | 1027 | ; |
1027 | /*printk("%p ", tmp);*/ | 1028 | /*printk("%p ", tmp);*/ |
@@ -1029,7 +1030,7 @@ static void NCR5380_main(struct work_struct *work) | |||
1029 | printk(" LOOP\n"); | 1030 | printk(" LOOP\n"); |
1030 | /* else printk("\n"); */ | 1031 | /* else printk("\n"); */ |
1031 | #endif | 1032 | #endif |
1032 | for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, | 1033 | for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, |
1033 | prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp)) { | 1034 | prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp)) { |
1034 | u8 lun = tmp->device->lun; | 1035 | u8 lun = tmp->device->lun; |
1035 | 1036 | ||
@@ -1291,7 +1292,8 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id) | |||
1291 | } | 1292 | } |
1292 | 1293 | ||
1293 | /* | 1294 | /* |
1294 | * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd) | 1295 | * Function : int NCR5380_select(struct Scsi_Host *instance, |
1296 | * struct scsi_cmnd *cmd) | ||
1295 | * | 1297 | * |
1296 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, | 1298 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, |
1297 | * including ARBITRATION, SELECTION, and initial message out for | 1299 | * including ARBITRATION, SELECTION, and initial message out for |
@@ -1318,7 +1320,7 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id) | |||
1318 | * cmd->result host byte set to DID_BAD_TARGET. | 1320 | * cmd->result host byte set to DID_BAD_TARGET. |
1319 | */ | 1321 | */ |
1320 | 1322 | ||
1321 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd) | 1323 | static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) |
1322 | { | 1324 | { |
1323 | SETUP_HOSTDATA(instance); | 1325 | SETUP_HOSTDATA(instance); |
1324 | unsigned char tmp[3], phase; | 1326 | unsigned char tmp[3], phase; |
@@ -1917,7 +1919,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
1917 | #endif | 1919 | #endif |
1918 | unsigned char *data; | 1920 | unsigned char *data; |
1919 | unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; | 1921 | unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; |
1920 | Scsi_Cmnd *cmd = (Scsi_Cmnd *) hostdata->connected; | 1922 | struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected; |
1921 | 1923 | ||
1922 | while (1) { | 1924 | while (1) { |
1923 | tmp = NCR5380_read(STATUS_REG); | 1925 | tmp = NCR5380_read(STATUS_REG); |
@@ -2154,7 +2156,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
2154 | local_irq_save(flags); | 2156 | local_irq_save(flags); |
2155 | LIST(cmd,hostdata->issue_queue); | 2157 | LIST(cmd,hostdata->issue_queue); |
2156 | SET_NEXT(cmd, hostdata->issue_queue); | 2158 | SET_NEXT(cmd, hostdata->issue_queue); |
2157 | hostdata->issue_queue = (Scsi_Cmnd *) cmd; | 2159 | hostdata->issue_queue = (struct scsi_cmnd *) cmd; |
2158 | local_irq_restore(flags); | 2160 | local_irq_restore(flags); |
2159 | dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of " | 2161 | dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of " |
2160 | "issue queue\n", H_NO(cmd)); | 2162 | "issue queue\n", H_NO(cmd)); |
@@ -2378,7 +2380,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) | |||
2378 | * Function : void NCR5380_reselect (struct Scsi_Host *instance) | 2380 | * Function : void NCR5380_reselect (struct Scsi_Host *instance) |
2379 | * | 2381 | * |
2380 | * Purpose : does reselection, initializing the instance->connected | 2382 | * Purpose : does reselection, initializing the instance->connected |
2381 | * field to point to the Scsi_Cmnd for which the I_T_L or I_T_L_Q | 2383 | * field to point to the scsi_cmnd for which the I_T_L or I_T_L_Q |
2382 | * nexus has been reestablished, | 2384 | * nexus has been reestablished, |
2383 | * | 2385 | * |
2384 | * Inputs : instance - this instance of the NCR5380. | 2386 | * Inputs : instance - this instance of the NCR5380. |
@@ -2397,7 +2399,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2397 | #endif | 2399 | #endif |
2398 | unsigned char msg[3]; | 2400 | unsigned char msg[3]; |
2399 | unsigned char *data; | 2401 | unsigned char *data; |
2400 | Scsi_Cmnd *tmp = NULL, *prev; | 2402 | struct scsi_cmnd *tmp = NULL, *prev; |
2401 | /* unsigned long flags; */ | 2403 | /* unsigned long flags; */ |
2402 | 2404 | ||
2403 | /* | 2405 | /* |
@@ -2471,7 +2473,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2471 | * just reestablished, and remove it from the disconnected queue. | 2473 | * just reestablished, and remove it from the disconnected queue. |
2472 | */ | 2474 | */ |
2473 | 2475 | ||
2474 | for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL; | 2476 | for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; |
2475 | tmp; prev = tmp, tmp = NEXT(tmp)) { | 2477 | tmp; prev = tmp, tmp = NEXT(tmp)) { |
2476 | if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun) | 2478 | if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun) |
2477 | #ifdef SUPPORT_TAGS | 2479 | #ifdef SUPPORT_TAGS |
@@ -2522,11 +2524,11 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2522 | 2524 | ||
2523 | 2525 | ||
2524 | /* | 2526 | /* |
2525 | * Function : int NCR5380_abort (Scsi_Cmnd *cmd) | 2527 | * Function : int NCR5380_abort (struct scsi_cmnd *cmd) |
2526 | * | 2528 | * |
2527 | * Purpose : abort a command | 2529 | * Purpose : abort a command |
2528 | * | 2530 | * |
2529 | * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the | 2531 | * Inputs : cmd - the scsi_cmnd to abort, code - code to set the |
2530 | * host byte of the result field to, if zero DID_ABORTED is | 2532 | * host byte of the result field to, if zero DID_ABORTED is |
2531 | * used. | 2533 | * used. |
2532 | * | 2534 | * |
@@ -2539,11 +2541,11 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2539 | */ | 2541 | */ |
2540 | 2542 | ||
2541 | static | 2543 | static |
2542 | int NCR5380_abort(Scsi_Cmnd *cmd) | 2544 | int NCR5380_abort(struct scsi_cmnd *cmd) |
2543 | { | 2545 | { |
2544 | struct Scsi_Host *instance = cmd->device->host; | 2546 | struct Scsi_Host *instance = cmd->device->host; |
2545 | SETUP_HOSTDATA(instance); | 2547 | SETUP_HOSTDATA(instance); |
2546 | Scsi_Cmnd *tmp, **prev; | 2548 | struct scsi_cmnd *tmp, **prev; |
2547 | unsigned long flags; | 2549 | unsigned long flags; |
2548 | 2550 | ||
2549 | scmd_printk(KERN_NOTICE, cmd, "aborting command\n"); | 2551 | scmd_printk(KERN_NOTICE, cmd, "aborting command\n"); |
@@ -2612,8 +2614,8 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2612 | * Case 2 : If the command hasn't been issued yet, we simply remove it | 2614 | * Case 2 : If the command hasn't been issued yet, we simply remove it |
2613 | * from the issue queue. | 2615 | * from the issue queue. |
2614 | */ | 2616 | */ |
2615 | for (prev = (Scsi_Cmnd **)&(hostdata->issue_queue), | 2617 | for (prev = (struct scsi_cmnd **)&(hostdata->issue_queue), |
2616 | tmp = (Scsi_Cmnd *)hostdata->issue_queue; | 2618 | tmp = (struct scsi_cmnd *)hostdata->issue_queue; |
2617 | tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { | 2619 | tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { |
2618 | if (cmd == tmp) { | 2620 | if (cmd == tmp) { |
2619 | REMOVE(5, *prev, tmp, NEXT(tmp)); | 2621 | REMOVE(5, *prev, tmp, NEXT(tmp)); |
@@ -2673,7 +2675,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2673 | * it from the disconnected queue. | 2675 | * it from the disconnected queue. |
2674 | */ | 2676 | */ |
2675 | 2677 | ||
2676 | for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; | 2678 | for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; |
2677 | tmp = NEXT(tmp)) { | 2679 | tmp = NEXT(tmp)) { |
2678 | if (cmd == tmp) { | 2680 | if (cmd == tmp) { |
2679 | local_irq_restore(flags); | 2681 | local_irq_restore(flags); |
@@ -2687,8 +2689,8 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2687 | do_abort(instance); | 2689 | do_abort(instance); |
2688 | 2690 | ||
2689 | local_irq_save(flags); | 2691 | local_irq_save(flags); |
2690 | for (prev = (Scsi_Cmnd **)&(hostdata->disconnected_queue), | 2692 | for (prev = (struct scsi_cmnd **)&(hostdata->disconnected_queue), |
2691 | tmp = (Scsi_Cmnd *)hostdata->disconnected_queue; | 2693 | tmp = (struct scsi_cmnd *)hostdata->disconnected_queue; |
2692 | tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { | 2694 | tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp)) { |
2693 | if (cmd == tmp) { | 2695 | if (cmd == tmp) { |
2694 | REMOVE(5, *prev, tmp, NEXT(tmp)); | 2696 | REMOVE(5, *prev, tmp, NEXT(tmp)); |
@@ -2737,7 +2739,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2737 | 2739 | ||
2738 | 2740 | ||
2739 | /* | 2741 | /* |
2740 | * Function : int NCR5380_reset (Scsi_Cmnd *cmd) | 2742 | * Function : int NCR5380_reset (struct scsi_cmnd *cmd) |
2741 | * | 2743 | * |
2742 | * Purpose : reset the SCSI bus. | 2744 | * Purpose : reset the SCSI bus. |
2743 | * | 2745 | * |
@@ -2745,13 +2747,13 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2745 | * | 2747 | * |
2746 | */ | 2748 | */ |
2747 | 2749 | ||
2748 | static int NCR5380_bus_reset(Scsi_Cmnd *cmd) | 2750 | static int NCR5380_bus_reset(struct scsi_cmnd *cmd) |
2749 | { | 2751 | { |
2750 | SETUP_HOSTDATA(cmd->device->host); | 2752 | SETUP_HOSTDATA(cmd->device->host); |
2751 | int i; | 2753 | int i; |
2752 | unsigned long flags; | 2754 | unsigned long flags; |
2753 | #if defined(RESET_RUN_DONE) | 2755 | #if defined(RESET_RUN_DONE) |
2754 | Scsi_Cmnd *connected, *disconnected_queue; | 2756 | struct scsi_cmnd *connected, *disconnected_queue; |
2755 | #endif | 2757 | #endif |
2756 | 2758 | ||
2757 | if (!IS_A_TT() && !falcon_got_lock) | 2759 | if (!IS_A_TT() && !falcon_got_lock) |
@@ -2793,9 +2795,9 @@ static int NCR5380_bus_reset(Scsi_Cmnd *cmd) | |||
2793 | * remembered in local variables first. | 2795 | * remembered in local variables first. |
2794 | */ | 2796 | */ |
2795 | local_irq_save(flags); | 2797 | local_irq_save(flags); |
2796 | connected = (Scsi_Cmnd *)hostdata->connected; | 2798 | connected = (struct scsi_cmnd *)hostdata->connected; |
2797 | hostdata->connected = NULL; | 2799 | hostdata->connected = NULL; |
2798 | disconnected_queue = (Scsi_Cmnd *)hostdata->disconnected_queue; | 2800 | disconnected_queue = (struct scsi_cmnd *)hostdata->disconnected_queue; |
2799 | hostdata->disconnected_queue = NULL; | 2801 | hostdata->disconnected_queue = NULL; |
2800 | #ifdef SUPPORT_TAGS | 2802 | #ifdef SUPPORT_TAGS |
2801 | free_all_tags(); | 2803 | free_all_tags(); |