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/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/NCR5380.c')
-rw-r--r-- | drivers/scsi/NCR5380.c | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 12334a08b701..36244d63def2 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -277,7 +277,7 @@ static void do_reset(struct Scsi_Host *host); | |||
277 | * Set up the internal fields in the SCSI command. | 277 | * Set up the internal fields in the SCSI command. |
278 | */ | 278 | */ |
279 | 279 | ||
280 | static __inline__ void initialize_SCp(Scsi_Cmnd * cmd) | 280 | static inline void initialize_SCp(struct scsi_cmnd *cmd) |
281 | { | 281 | { |
282 | /* | 282 | /* |
283 | * Initialize the Scsi Pointer field so that all of the commands in the | 283 | * Initialize the Scsi Pointer field so that all of the commands in the |
@@ -719,7 +719,7 @@ static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance, | |||
719 | #undef SPRINTF | 719 | #undef SPRINTF |
720 | #define SPRINTF(args...) seq_printf(m, ## args) | 720 | #define SPRINTF(args...) seq_printf(m, ## args) |
721 | static | 721 | static |
722 | void lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, struct seq_file *m); | 722 | void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m); |
723 | static | 723 | static |
724 | void lprint_command(unsigned char *cmd, struct seq_file *m); | 724 | void lprint_command(unsigned char *cmd, struct seq_file *m); |
725 | static | 725 | static |
@@ -729,7 +729,7 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
729 | struct Scsi_Host *instance) | 729 | struct Scsi_Host *instance) |
730 | { | 730 | { |
731 | struct NCR5380_hostdata *hostdata; | 731 | struct NCR5380_hostdata *hostdata; |
732 | Scsi_Cmnd *ptr; | 732 | struct scsi_cmnd *ptr; |
733 | 733 | ||
734 | hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 734 | hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
735 | 735 | ||
@@ -741,19 +741,19 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
741 | if (!hostdata->connected) | 741 | if (!hostdata->connected) |
742 | SPRINTF("scsi%d: no currently connected command\n", instance->host_no); | 742 | SPRINTF("scsi%d: no currently connected command\n", instance->host_no); |
743 | else | 743 | else |
744 | lprint_Scsi_Cmnd((Scsi_Cmnd *) hostdata->connected, m); | 744 | lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); |
745 | SPRINTF("scsi%d: issue_queue\n", instance->host_no); | 745 | SPRINTF("scsi%d: issue_queue\n", instance->host_no); |
746 | for (ptr = (Scsi_Cmnd *) hostdata->issue_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble) | 746 | for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) |
747 | lprint_Scsi_Cmnd(ptr, m); | 747 | lprint_Scsi_Cmnd(ptr, m); |
748 | 748 | ||
749 | SPRINTF("scsi%d: disconnected_queue\n", instance->host_no); | 749 | SPRINTF("scsi%d: disconnected_queue\n", instance->host_no); |
750 | for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble) | 750 | for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) |
751 | lprint_Scsi_Cmnd(ptr, m); | 751 | lprint_Scsi_Cmnd(ptr, m); |
752 | spin_unlock_irq(instance->host_lock); | 752 | spin_unlock_irq(instance->host_lock); |
753 | return 0; | 753 | return 0; |
754 | } | 754 | } |
755 | 755 | ||
756 | static void lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, struct seq_file *m) | 756 | static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) |
757 | { | 757 | { |
758 | SPRINTF("scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); | 758 | SPRINTF("scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); |
759 | SPRINTF(" command = "); | 759 | SPRINTF(" command = "); |
@@ -912,11 +912,11 @@ static void NCR5380_exit(struct Scsi_Host *instance) | |||
912 | * Locks: host lock taken by caller | 912 | * Locks: host lock taken by caller |
913 | */ | 913 | */ |
914 | 914 | ||
915 | static int NCR5380_queue_command_lck(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) | 915 | static int NCR5380_queue_command_lck(struct scsi_cmnd *cmd, void (*done) (struct scsi_cmnd *)) |
916 | { | 916 | { |
917 | struct Scsi_Host *instance = cmd->device->host; | 917 | struct Scsi_Host *instance = cmd->device->host; |
918 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 918 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
919 | Scsi_Cmnd *tmp; | 919 | struct scsi_cmnd *tmp; |
920 | 920 | ||
921 | #if (NDEBUG & NDEBUG_NO_WRITE) | 921 | #if (NDEBUG & NDEBUG_NO_WRITE) |
922 | switch (cmd->cmnd[0]) { | 922 | switch (cmd->cmnd[0]) { |
@@ -950,7 +950,7 @@ static int NCR5380_queue_command_lck(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *) | |||
950 | cmd->host_scribble = (unsigned char *) hostdata->issue_queue; | 950 | cmd->host_scribble = (unsigned char *) hostdata->issue_queue; |
951 | hostdata->issue_queue = cmd; | 951 | hostdata->issue_queue = cmd; |
952 | } else { | 952 | } else { |
953 | for (tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (Scsi_Cmnd *) tmp->host_scribble); | 953 | for (tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp->host_scribble; tmp = (struct scsi_cmnd *) tmp->host_scribble); |
954 | LIST(cmd, tmp); | 954 | LIST(cmd, tmp); |
955 | tmp->host_scribble = (unsigned char *) cmd; | 955 | tmp->host_scribble = (unsigned char *) cmd; |
956 | } | 956 | } |
@@ -981,7 +981,7 @@ static void NCR5380_main(struct work_struct *work) | |||
981 | struct NCR5380_hostdata *hostdata = | 981 | struct NCR5380_hostdata *hostdata = |
982 | container_of(work, struct NCR5380_hostdata, coroutine.work); | 982 | container_of(work, struct NCR5380_hostdata, coroutine.work); |
983 | struct Scsi_Host *instance = hostdata->host; | 983 | struct Scsi_Host *instance = hostdata->host; |
984 | Scsi_Cmnd *tmp, *prev; | 984 | struct scsi_cmnd *tmp, *prev; |
985 | int done; | 985 | int done; |
986 | 986 | ||
987 | spin_lock_irq(instance->host_lock); | 987 | spin_lock_irq(instance->host_lock); |
@@ -994,7 +994,7 @@ static void NCR5380_main(struct work_struct *work) | |||
994 | * Search through the issue_queue for a command destined | 994 | * Search through the issue_queue for a command destined |
995 | * for a target that's not busy. | 995 | * for a target that's not busy. |
996 | */ | 996 | */ |
997 | for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble) | 997 | for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble) |
998 | { | 998 | { |
999 | if (prev != tmp) | 999 | if (prev != tmp) |
1000 | dprintk(NDEBUG_LISTS, "MAIN tmp=%p target=%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun); | 1000 | dprintk(NDEBUG_LISTS, "MAIN tmp=%p target=%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun); |
@@ -1006,7 +1006,7 @@ static void NCR5380_main(struct work_struct *work) | |||
1006 | prev->host_scribble = tmp->host_scribble; | 1006 | prev->host_scribble = tmp->host_scribble; |
1007 | } else { | 1007 | } else { |
1008 | REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble); | 1008 | REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble); |
1009 | hostdata->issue_queue = (Scsi_Cmnd *) tmp->host_scribble; | 1009 | hostdata->issue_queue = (struct scsi_cmnd *) tmp->host_scribble; |
1010 | } | 1010 | } |
1011 | tmp->host_scribble = NULL; | 1011 | tmp->host_scribble = NULL; |
1012 | 1012 | ||
@@ -1053,7 +1053,7 @@ static void NCR5380_main(struct work_struct *work) | |||
1053 | /* exited locked */ | 1053 | /* exited locked */ |
1054 | } /* if (!hostdata->connected) */ | 1054 | } /* if (!hostdata->connected) */ |
1055 | if (hostdata->selecting) { | 1055 | if (hostdata->selecting) { |
1056 | tmp = (Scsi_Cmnd *) hostdata->selecting; | 1056 | tmp = (struct scsi_cmnd *) hostdata->selecting; |
1057 | /* Selection will drop and retake the lock */ | 1057 | /* Selection will drop and retake the lock */ |
1058 | if (!NCR5380_select(instance, tmp)) { | 1058 | if (!NCR5380_select(instance, tmp)) { |
1059 | /* Ok ?? */ | 1059 | /* Ok ?? */ |
@@ -1175,7 +1175,8 @@ static irqreturn_t NCR5380_intr(int dummy, void *dev_id) | |||
1175 | #endif | 1175 | #endif |
1176 | 1176 | ||
1177 | /* | 1177 | /* |
1178 | * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd) | 1178 | * Function : int NCR5380_select(struct Scsi_Host *instance, |
1179 | * struct scsi_cmnd *cmd) | ||
1179 | * | 1180 | * |
1180 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, | 1181 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, |
1181 | * including ARBITRATION, SELECTION, and initial message out for | 1182 | * including ARBITRATION, SELECTION, and initial message out for |
@@ -1204,7 +1205,7 @@ static irqreturn_t NCR5380_intr(int dummy, void *dev_id) | |||
1204 | * Locks: caller holds hostdata lock in IRQ mode | 1205 | * Locks: caller holds hostdata lock in IRQ mode |
1205 | */ | 1206 | */ |
1206 | 1207 | ||
1207 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd) | 1208 | static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) |
1208 | { | 1209 | { |
1209 | NCR5380_local_declare(); | 1210 | NCR5380_local_declare(); |
1210 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 1211 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
@@ -2011,7 +2012,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2011 | #endif | 2012 | #endif |
2012 | unsigned char *data; | 2013 | unsigned char *data; |
2013 | unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; | 2014 | unsigned char phase, tmp, extended_msg[10], old_phase = 0xff; |
2014 | Scsi_Cmnd *cmd = (Scsi_Cmnd *) hostdata->connected; | 2015 | struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected; |
2015 | /* RvC: we need to set the end of the polling time */ | 2016 | /* RvC: we need to set the end of the polling time */ |
2016 | unsigned long poll_time = jiffies + USLEEP_POLL; | 2017 | unsigned long poll_time = jiffies + USLEEP_POLL; |
2017 | 2018 | ||
@@ -2201,7 +2202,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2201 | LIST(cmd, hostdata->issue_queue); | 2202 | LIST(cmd, hostdata->issue_queue); |
2202 | cmd->host_scribble = (unsigned char *) | 2203 | cmd->host_scribble = (unsigned char *) |
2203 | hostdata->issue_queue; | 2204 | hostdata->issue_queue; |
2204 | hostdata->issue_queue = (Scsi_Cmnd *) cmd; | 2205 | hostdata->issue_queue = (struct scsi_cmnd *) cmd; |
2205 | dprintk(NDEBUG_QUEUES, "scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no); | 2206 | dprintk(NDEBUG_QUEUES, "scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no); |
2206 | } else { | 2207 | } else { |
2207 | cmd->scsi_done(cmd); | 2208 | cmd->scsi_done(cmd); |
@@ -2398,7 +2399,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2398 | * Function : void NCR5380_reselect (struct Scsi_Host *instance) | 2399 | * Function : void NCR5380_reselect (struct Scsi_Host *instance) |
2399 | * | 2400 | * |
2400 | * Purpose : does reselection, initializing the instance->connected | 2401 | * Purpose : does reselection, initializing the instance->connected |
2401 | * field to point to the Scsi_Cmnd for which the I_T_L or I_T_L_Q | 2402 | * field to point to the scsi_cmnd for which the I_T_L or I_T_L_Q |
2402 | * nexus has been reestablished, | 2403 | * nexus has been reestablished, |
2403 | * | 2404 | * |
2404 | * Inputs : instance - this instance of the NCR5380. | 2405 | * Inputs : instance - this instance of the NCR5380. |
@@ -2415,7 +2416,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { | |||
2415 | int len; | 2416 | int len; |
2416 | unsigned char msg[3]; | 2417 | unsigned char msg[3]; |
2417 | unsigned char *data; | 2418 | unsigned char *data; |
2418 | Scsi_Cmnd *tmp = NULL, *prev; | 2419 | struct scsi_cmnd *tmp = NULL, *prev; |
2419 | int abort = 0; | 2420 | int abort = 0; |
2420 | NCR5380_setup(instance); | 2421 | NCR5380_setup(instance); |
2421 | 2422 | ||
@@ -2481,7 +2482,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { | |||
2481 | */ | 2482 | */ |
2482 | 2483 | ||
2483 | 2484 | ||
2484 | for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble) | 2485 | for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL; tmp; prev = tmp, tmp = (struct scsi_cmnd *) tmp->host_scribble) |
2485 | if ((target_mask == (1 << tmp->device->id)) && (lun == (u8)tmp->device->lun) | 2486 | if ((target_mask == (1 << tmp->device->id)) && (lun == (u8)tmp->device->lun) |
2486 | ) { | 2487 | ) { |
2487 | if (prev) { | 2488 | if (prev) { |
@@ -2489,7 +2490,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { | |||
2489 | prev->host_scribble = tmp->host_scribble; | 2490 | prev->host_scribble = tmp->host_scribble; |
2490 | } else { | 2491 | } else { |
2491 | REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble); | 2492 | REMOVE(-1, hostdata->disconnected_queue, tmp, tmp->host_scribble); |
2492 | hostdata->disconnected_queue = (Scsi_Cmnd *) tmp->host_scribble; | 2493 | hostdata->disconnected_queue = (struct scsi_cmnd *) tmp->host_scribble; |
2493 | } | 2494 | } |
2494 | tmp->host_scribble = NULL; | 2495 | tmp->host_scribble = NULL; |
2495 | break; | 2496 | break; |
@@ -2520,7 +2521,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { | |||
2520 | * | 2521 | * |
2521 | * Inputs : instance - this instance of the NCR5380. | 2522 | * Inputs : instance - this instance of the NCR5380. |
2522 | * | 2523 | * |
2523 | * Returns : pointer to the Scsi_Cmnd structure for which the I_T_L | 2524 | * Returns : pointer to the scsi_cmnd structure for which the I_T_L |
2524 | * nexus has been reestablished, on failure NULL is returned. | 2525 | * nexus has been reestablished, on failure NULL is returned. |
2525 | */ | 2526 | */ |
2526 | 2527 | ||
@@ -2562,11 +2563,11 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) { | |||
2562 | #endif /* def REAL_DMA */ | 2563 | #endif /* def REAL_DMA */ |
2563 | 2564 | ||
2564 | /* | 2565 | /* |
2565 | * Function : int NCR5380_abort (Scsi_Cmnd *cmd) | 2566 | * Function : int NCR5380_abort (struct scsi_cmnd *cmd) |
2566 | * | 2567 | * |
2567 | * Purpose : abort a command | 2568 | * Purpose : abort a command |
2568 | * | 2569 | * |
2569 | * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the | 2570 | * Inputs : cmd - the scsi_cmnd to abort, code - code to set the |
2570 | * host byte of the result field to, if zero DID_ABORTED is | 2571 | * host byte of the result field to, if zero DID_ABORTED is |
2571 | * used. | 2572 | * used. |
2572 | * | 2573 | * |
@@ -2580,11 +2581,12 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) { | |||
2580 | * Locks: host lock taken by caller | 2581 | * Locks: host lock taken by caller |
2581 | */ | 2582 | */ |
2582 | 2583 | ||
2583 | static int NCR5380_abort(Scsi_Cmnd * cmd) { | 2584 | static int NCR5380_abort(struct scsi_cmnd *cmd) |
2585 | { | ||
2584 | NCR5380_local_declare(); | 2586 | NCR5380_local_declare(); |
2585 | struct Scsi_Host *instance = cmd->device->host; | 2587 | struct Scsi_Host *instance = cmd->device->host; |
2586 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 2588 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
2587 | Scsi_Cmnd *tmp, **prev; | 2589 | struct scsi_cmnd *tmp, **prev; |
2588 | 2590 | ||
2589 | scmd_printk(KERN_WARNING, cmd, "aborting command\n"); | 2591 | scmd_printk(KERN_WARNING, cmd, "aborting command\n"); |
2590 | 2592 | ||
@@ -2632,10 +2634,10 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { | |||
2632 | */ | 2634 | */ |
2633 | 2635 | ||
2634 | dprintk(NDEBUG_ABORT, "scsi%d : abort going into loop.\n", instance->host_no); | 2636 | dprintk(NDEBUG_ABORT, "scsi%d : abort going into loop.\n", instance->host_no); |
2635 | for (prev = (Scsi_Cmnd **) & (hostdata->issue_queue), tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble) | 2637 | for (prev = (struct scsi_cmnd **) &(hostdata->issue_queue), tmp = (struct scsi_cmnd *) hostdata->issue_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble) |
2636 | if (cmd == tmp) { | 2638 | if (cmd == tmp) { |
2637 | REMOVE(5, *prev, tmp, tmp->host_scribble); | 2639 | REMOVE(5, *prev, tmp, tmp->host_scribble); |
2638 | (*prev) = (Scsi_Cmnd *) tmp->host_scribble; | 2640 | (*prev) = (struct scsi_cmnd *) tmp->host_scribble; |
2639 | tmp->host_scribble = NULL; | 2641 | tmp->host_scribble = NULL; |
2640 | tmp->result = DID_ABORT << 16; | 2642 | tmp->result = DID_ABORT << 16; |
2641 | dprintk(NDEBUG_ABORT, "scsi%d : abort removed command from issue queue.\n", instance->host_no); | 2643 | dprintk(NDEBUG_ABORT, "scsi%d : abort removed command from issue queue.\n", instance->host_no); |
@@ -2688,7 +2690,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { | |||
2688 | * it from the disconnected queue. | 2690 | * it from the disconnected queue. |
2689 | */ | 2691 | */ |
2690 | 2692 | ||
2691 | for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; tmp = (Scsi_Cmnd *) tmp->host_scribble) | 2693 | for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; tmp = (struct scsi_cmnd *) tmp->host_scribble) |
2692 | if (cmd == tmp) { | 2694 | if (cmd == tmp) { |
2693 | dprintk(NDEBUG_ABORT, "scsi%d : aborting disconnected command.\n", instance->host_no); | 2695 | dprintk(NDEBUG_ABORT, "scsi%d : aborting disconnected command.\n", instance->host_no); |
2694 | 2696 | ||
@@ -2698,10 +2700,10 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { | |||
2698 | 2700 | ||
2699 | do_abort(instance); | 2701 | do_abort(instance); |
2700 | 2702 | ||
2701 | for (prev = (Scsi_Cmnd **) & (hostdata->disconnected_queue), tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; prev = (Scsi_Cmnd **) & (tmp->host_scribble), tmp = (Scsi_Cmnd *) tmp->host_scribble) | 2703 | for (prev = (struct scsi_cmnd **) &(hostdata->disconnected_queue), tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp; prev = (struct scsi_cmnd **) &(tmp->host_scribble), tmp = (struct scsi_cmnd *) tmp->host_scribble) |
2702 | if (cmd == tmp) { | 2704 | if (cmd == tmp) { |
2703 | REMOVE(5, *prev, tmp, tmp->host_scribble); | 2705 | REMOVE(5, *prev, tmp, tmp->host_scribble); |
2704 | *prev = (Scsi_Cmnd *) tmp->host_scribble; | 2706 | *prev = (struct scsi_cmnd *) tmp->host_scribble; |
2705 | tmp->host_scribble = NULL; | 2707 | tmp->host_scribble = NULL; |
2706 | tmp->result = DID_ABORT << 16; | 2708 | tmp->result = DID_ABORT << 16; |
2707 | tmp->scsi_done(tmp); | 2709 | tmp->scsi_done(tmp); |
@@ -2724,7 +2726,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { | |||
2724 | 2726 | ||
2725 | 2727 | ||
2726 | /* | 2728 | /* |
2727 | * Function : int NCR5380_bus_reset (Scsi_Cmnd *cmd) | 2729 | * Function : int NCR5380_bus_reset (struct scsi_cmnd *cmd) |
2728 | * | 2730 | * |
2729 | * Purpose : reset the SCSI bus. | 2731 | * Purpose : reset the SCSI bus. |
2730 | * | 2732 | * |
@@ -2733,7 +2735,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { | |||
2733 | * Locks: host lock taken by caller | 2735 | * Locks: host lock taken by caller |
2734 | */ | 2736 | */ |
2735 | 2737 | ||
2736 | static int NCR5380_bus_reset(Scsi_Cmnd * cmd) | 2738 | static int NCR5380_bus_reset(struct scsi_cmnd *cmd) |
2737 | { | 2739 | { |
2738 | struct Scsi_Host *instance = cmd->device->host; | 2740 | struct Scsi_Host *instance = cmd->device->host; |
2739 | 2741 | ||