aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenne <henne@nachtwindheim.de>2006-10-03 13:51:59 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-10-25 18:11:51 -0400
commit811c93666c3f4a0e99382c24a84480b03c7262f6 (patch)
tree0448065b8bb45129bf79b55b6bd2eb491697c922
parent53a5fbdc2dff55161a206ed1a1385a8fa8055c34 (diff)
[SCSI] Scsi_Cmnd convertion in sun3-driver
Change the obsolete Scsi_Cmnd to struct scsi_cmnd in the sun3-driver. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/sun3_NCR5380.c109
-rw-r--r--drivers/scsi/sun3_scsi.c7
-rw-r--r--drivers/scsi/sun3_scsi.h7
-rw-r--r--drivers/scsi/sun3_scsi_vme.c7
4 files changed, 69 insertions, 61 deletions
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 5ec5af8e3379..3b3f3050a877 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -266,8 +266,8 @@ static struct scsi_host_template *the_template = NULL;
266 (struct NCR5380_hostdata *)(in)->hostdata 266 (struct NCR5380_hostdata *)(in)->hostdata
267#define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) 267#define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata)
268 268
269#define NEXT(cmd) ((Scsi_Cmnd *)((cmd)->host_scribble)) 269#define NEXT(cmd) ((struct scsi_cmnd *)((cmd)->host_scribble))
270#define NEXTADDR(cmd) ((Scsi_Cmnd **)&((cmd)->host_scribble)) 270#define NEXTADDR(cmd) ((struct scsi_cmnd **)&((cmd)->host_scribble))
271 271
272#define HOSTNO instance->host_no 272#define HOSTNO instance->host_no
273#define H_NO(cmd) (cmd)->device->host->host_no 273#define H_NO(cmd) (cmd)->device->host->host_no
@@ -360,7 +360,7 @@ static void __init init_tags( void )
360 * conditions. 360 * conditions.
361 */ 361 */
362 362
363static int is_lun_busy( Scsi_Cmnd *cmd, int should_be_tagged ) 363static int is_lun_busy(struct scsi_cmnd *cmd, int should_be_tagged)
364{ 364{
365 SETUP_HOSTDATA(cmd->device->host); 365 SETUP_HOSTDATA(cmd->device->host);
366 366
@@ -384,7 +384,7 @@ static int is_lun_busy( Scsi_Cmnd *cmd, int should_be_tagged )
384 * untagged. 384 * untagged.
385 */ 385 */
386 386
387static void cmd_get_tag( Scsi_Cmnd *cmd, int should_be_tagged ) 387static void cmd_get_tag(struct scsi_cmnd *cmd, int should_be_tagged)
388{ 388{
389 SETUP_HOSTDATA(cmd->device->host); 389 SETUP_HOSTDATA(cmd->device->host);
390 390
@@ -416,7 +416,7 @@ static void cmd_get_tag( Scsi_Cmnd *cmd, int should_be_tagged )
416 * unlock the LUN. 416 * unlock the LUN.
417 */ 417 */
418 418
419static void cmd_free_tag( Scsi_Cmnd *cmd ) 419static void cmd_free_tag(struct scsi_cmnd *cmd)
420{ 420{
421 SETUP_HOSTDATA(cmd->device->host); 421 SETUP_HOSTDATA(cmd->device->host);
422 422
@@ -460,18 +460,18 @@ static void free_all_tags( void )
460 460
461 461
462/* 462/*
463 * Function: void merge_contiguous_buffers( Scsi_Cmnd *cmd ) 463 * Function: void merge_contiguous_buffers(struct scsi_cmnd *cmd)
464 * 464 *
465 * Purpose: Try to merge several scatter-gather requests into one DMA 465 * Purpose: Try to merge several scatter-gather requests into one DMA
466 * transfer. This is possible if the scatter buffers lie on 466 * transfer. This is possible if the scatter buffers lie on
467 * physical contiguous addresses. 467 * physical contiguous addresses.
468 * 468 *
469 * Parameters: Scsi_Cmnd *cmd 469 * Parameters: struct scsi_cmnd *cmd
470 * The command to work on. The first scatter buffer's data are 470 * The command to work on. The first scatter buffer's data are
471 * assumed to be already transfered into ptr/this_residual. 471 * assumed to be already transfered into ptr/this_residual.
472 */ 472 */
473 473
474static void merge_contiguous_buffers( Scsi_Cmnd *cmd ) 474static void merge_contiguous_buffers(struct scsi_cmnd *cmd)
475{ 475{
476 unsigned long endaddr; 476 unsigned long endaddr;
477#if (NDEBUG & NDEBUG_MERGING) 477#if (NDEBUG & NDEBUG_MERGING)
@@ -501,15 +501,15 @@ static void merge_contiguous_buffers( Scsi_Cmnd *cmd )
501} 501}
502 502
503/* 503/*
504 * Function : void initialize_SCp(Scsi_Cmnd *cmd) 504 * Function : void initialize_SCp(struct scsi_cmnd *cmd)
505 * 505 *
506 * Purpose : initialize the saved data pointers for cmd to point to the 506 * Purpose : initialize the saved data pointers for cmd to point to the
507 * start of the buffer. 507 * start of the buffer.
508 * 508 *
509 * Inputs : cmd - Scsi_Cmnd structure to have pointers reset. 509 * Inputs : cmd - struct scsi_cmnd structure to have pointers reset.
510 */ 510 */
511 511
512static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) 512static __inline__ void initialize_SCp(struct scsi_cmnd *cmd)
513{ 513{
514 /* 514 /*
515 * Initialize the Scsi Pointer field so that all of the commands in the 515 * Initialize the Scsi Pointer field so that all of the commands in the
@@ -753,14 +753,15 @@ static void NCR5380_print_status (struct Scsi_Host *instance)
753 do { if (pos + strlen(fmt) + 20 /* slop */ < buffer + length) \ 753 do { if (pos + strlen(fmt) + 20 /* slop */ < buffer + length) \
754 pos += sprintf(pos, fmt , ## args); } while(0) 754 pos += sprintf(pos, fmt , ## args); } while(0)
755static 755static
756char *lprint_Scsi_Cmnd (Scsi_Cmnd *cmd, char *pos, char *buffer, int length); 756char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer,
757 int length);
757 758
758static int NCR5380_proc_info (struct Scsi_Host *instance, char *buffer, char **start, 759static int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer,
759 off_t offset, int length, int inout) 760 char **start, off_t offset, int length, int inout)
760{ 761{
761 char *pos = buffer; 762 char *pos = buffer;
762 struct NCR5380_hostdata *hostdata; 763 struct NCR5380_hostdata *hostdata;
763 Scsi_Cmnd *ptr; 764 struct scsi_cmnd *ptr;
764 unsigned long flags; 765 unsigned long flags;
765 off_t begin = 0; 766 off_t begin = 0;
766#define check_offset() \ 767#define check_offset() \
@@ -784,18 +785,19 @@ static int NCR5380_proc_info (struct Scsi_Host *instance, char *buffer, char **s
784 if (!hostdata->connected) 785 if (!hostdata->connected)
785 SPRINTF("scsi%d: no currently connected command\n", HOSTNO); 786 SPRINTF("scsi%d: no currently connected command\n", HOSTNO);
786 else 787 else
787 pos = lprint_Scsi_Cmnd ((Scsi_Cmnd *) hostdata->connected, 788 pos = lprint_Scsi_Cmnd ((struct scsi_cmnd *) hostdata->connected,
788 pos, buffer, length); 789 pos, buffer, length);
789 SPRINTF("scsi%d: issue_queue\n", HOSTNO); 790 SPRINTF("scsi%d: issue_queue\n", HOSTNO);
790 check_offset(); 791 check_offset();
791 for (ptr = (Scsi_Cmnd *) hostdata->issue_queue; ptr; ptr = NEXT(ptr)) { 792 for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = NEXT(ptr))
793 {
792 pos = lprint_Scsi_Cmnd (ptr, pos, buffer, length); 794 pos = lprint_Scsi_Cmnd (ptr, pos, buffer, length);
793 check_offset(); 795 check_offset();
794 } 796 }
795 797
796 SPRINTF("scsi%d: disconnected_queue\n", HOSTNO); 798 SPRINTF("scsi%d: disconnected_queue\n", HOSTNO);
797 check_offset(); 799 check_offset();
798 for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; 800 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr;
799 ptr = NEXT(ptr)) { 801 ptr = NEXT(ptr)) {
800 pos = lprint_Scsi_Cmnd (ptr, pos, buffer, length); 802 pos = lprint_Scsi_Cmnd (ptr, pos, buffer, length);
801 check_offset(); 803 check_offset();
@@ -810,8 +812,8 @@ static int NCR5380_proc_info (struct Scsi_Host *instance, char *buffer, char **s
810 return length; 812 return length;
811} 813}
812 814
813static char * 815static char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer,
814lprint_Scsi_Cmnd (Scsi_Cmnd *cmd, char *pos, char *buffer, int length) 816 int length)
815{ 817{
816 int i, s; 818 int i, s;
817 unsigned char *command; 819 unsigned char *command;
@@ -888,8 +890,8 @@ static int NCR5380_init (struct Scsi_Host *instance, int flags)
888} 890}
889 891
890/* 892/*
891 * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd, 893 * Function : int NCR5380_queue_command (struct scsi_cmnd *cmd,
892 * void (*done)(Scsi_Cmnd *)) 894 * void (*done)(struct scsi_cmnd *))
893 * 895 *
894 * Purpose : enqueues a SCSI command 896 * Purpose : enqueues a SCSI command
895 * 897 *
@@ -906,10 +908,11 @@ static int NCR5380_init (struct Scsi_Host *instance, int flags)
906 */ 908 */
907 909
908/* Only make static if a wrapper function is used */ 910/* Only make static if a wrapper function is used */
909static int NCR5380_queue_command (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) 911static int NCR5380_queue_command(struct scsi_cmnd *cmd,
912 void (*done)(struct scsi_cmnd *))
910{ 913{
911 SETUP_HOSTDATA(cmd->device->host); 914 SETUP_HOSTDATA(cmd->device->host);
912 Scsi_Cmnd *tmp; 915 struct scsi_cmnd *tmp;
913 unsigned long flags; 916 unsigned long flags;
914 917
915#if (NDEBUG & NDEBUG_NO_WRITE) 918#if (NDEBUG & NDEBUG_NO_WRITE)
@@ -990,7 +993,7 @@ static int NCR5380_queue_command (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
990 NEXT(cmd) = hostdata->issue_queue; 993 NEXT(cmd) = hostdata->issue_queue;
991 hostdata->issue_queue = cmd; 994 hostdata->issue_queue = cmd;
992 } else { 995 } else {
993 for (tmp = (Scsi_Cmnd *)hostdata->issue_queue; 996 for (tmp = (struct scsi_cmnd *)hostdata->issue_queue;
994 NEXT(tmp); tmp = NEXT(tmp)) 997 NEXT(tmp); tmp = NEXT(tmp))
995 ; 998 ;
996 LIST(cmd, tmp); 999 LIST(cmd, tmp);
@@ -1030,7 +1033,7 @@ static int NCR5380_queue_command (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
1030 1033
1031static void NCR5380_main (void *bl) 1034static void NCR5380_main (void *bl)
1032{ 1035{
1033 Scsi_Cmnd *tmp, *prev; 1036 struct scsi_cmnd *tmp, *prev;
1034 struct Scsi_Host *instance = first_instance; 1037 struct Scsi_Host *instance = first_instance;
1035 struct NCR5380_hostdata *hostdata = HOSTDATA(instance); 1038 struct NCR5380_hostdata *hostdata = HOSTDATA(instance);
1036 int done; 1039 int done;
@@ -1073,12 +1076,12 @@ static void NCR5380_main (void *bl)
1073 * for a target that's not busy. 1076 * for a target that's not busy.
1074 */ 1077 */
1075#if (NDEBUG & NDEBUG_LISTS) 1078#if (NDEBUG & NDEBUG_LISTS)
1076 for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; 1079 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL;
1077 tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp)) 1080 tmp && (tmp != prev); prev = tmp, tmp = NEXT(tmp))
1078 ; 1081 ;
1079 if ((tmp == prev) && tmp) printk(" LOOP\n");/* else printk("\n");*/ 1082 if ((tmp == prev) && tmp) printk(" LOOP\n");/* else printk("\n");*/
1080#endif 1083#endif
1081 for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, 1084 for (tmp = (struct scsi_cmnd *) hostdata->issue_queue,
1082 prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp) ) { 1085 prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp) ) {
1083 1086
1084#if (NDEBUG & NDEBUG_LISTS) 1087#if (NDEBUG & NDEBUG_LISTS)
@@ -1339,7 +1342,8 @@ static irqreturn_t NCR5380_intr (int irq, void *dev_id)
1339} 1342}
1340 1343
1341#ifdef NCR5380_STATS 1344#ifdef NCR5380_STATS
1342static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd* cmd) 1345static void collect_stats(struct NCR5380_hostdata *hostdata,
1346 struct scsi_cmnd *cmd)
1343{ 1347{
1344# ifdef NCR5380_STAT_LIMIT 1348# ifdef NCR5380_STAT_LIMIT
1345 if (cmd->request_bufflen > NCR5380_STAT_LIMIT) 1349 if (cmd->request_bufflen > NCR5380_STAT_LIMIT)
@@ -1365,8 +1369,8 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd* cmd)
1365#endif 1369#endif
1366 1370
1367/* 1371/*
1368 * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd, 1372 * Function : int NCR5380_select(struct Scsi_Host *instance,
1369 * int tag); 1373 * struct scsi_cmnd *cmd, int tag);
1370 * 1374 *
1371 * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, 1375 * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command,
1372 * including ARBITRATION, SELECTION, and initial message out for 1376 * including ARBITRATION, SELECTION, and initial message out for
@@ -1395,7 +1399,8 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd* cmd)
1395 * cmd->result host byte set to DID_BAD_TARGET. 1399 * cmd->result host byte set to DID_BAD_TARGET.
1396 */ 1400 */
1397 1401
1398static int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd, int tag) 1402static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd,
1403 int tag)
1399{ 1404{
1400 SETUP_HOSTDATA(instance); 1405 SETUP_HOSTDATA(instance);
1401 unsigned char tmp[3], phase; 1406 unsigned char tmp[3], phase;
@@ -1985,7 +1990,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
1985#endif 1990#endif
1986 unsigned char *data; 1991 unsigned char *data;
1987 unsigned char phase, tmp, extended_msg[10], old_phase=0xff; 1992 unsigned char phase, tmp, extended_msg[10], old_phase=0xff;
1988 Scsi_Cmnd *cmd = (Scsi_Cmnd *) hostdata->connected; 1993 struct scsi_cmnd *cmd = (struct scsi_cmnd *) hostdata->connected;
1989 1994
1990#ifdef SUN3_SCSI_VME 1995#ifdef SUN3_SCSI_VME
1991 dregs->csr |= CSR_INTR; 1996 dregs->csr |= CSR_INTR;
@@ -2272,7 +2277,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2272 local_irq_save(flags); 2277 local_irq_save(flags);
2273 LIST(cmd,hostdata->issue_queue); 2278 LIST(cmd,hostdata->issue_queue);
2274 NEXT(cmd) = hostdata->issue_queue; 2279 NEXT(cmd) = hostdata->issue_queue;
2275 hostdata->issue_queue = (Scsi_Cmnd *) cmd; 2280 hostdata->issue_queue = (struct scsi_cmnd *) cmd;
2276 local_irq_restore(flags); 2281 local_irq_restore(flags);
2277 QU_PRINTK("scsi%d: REQUEST SENSE added to head of " 2282 QU_PRINTK("scsi%d: REQUEST SENSE added to head of "
2278 "issue queue\n", H_NO(cmd)); 2283 "issue queue\n", H_NO(cmd));
@@ -2502,7 +2507,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2502 * Function : void NCR5380_reselect (struct Scsi_Host *instance) 2507 * Function : void NCR5380_reselect (struct Scsi_Host *instance)
2503 * 2508 *
2504 * Purpose : does reselection, initializing the instance->connected 2509 * Purpose : does reselection, initializing the instance->connected
2505 * field to point to the Scsi_Cmnd for which the I_T_L or I_T_L_Q 2510 * field to point to the struct scsi_cmnd for which the I_T_L or I_T_L_Q
2506 * nexus has been reestablished, 2511 * nexus has been reestablished,
2507 * 2512 *
2508 * Inputs : instance - this instance of the NCR5380. 2513 * Inputs : instance - this instance of the NCR5380.
@@ -2521,7 +2526,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
2521 unsigned char tag; 2526 unsigned char tag;
2522#endif 2527#endif
2523 unsigned char msg[3]; 2528 unsigned char msg[3];
2524 Scsi_Cmnd *tmp = NULL, *prev; 2529 struct scsi_cmnd *tmp = NULL, *prev;
2525/* unsigned long flags; */ 2530/* unsigned long flags; */
2526 2531
2527 /* 2532 /*
@@ -2577,7 +2582,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
2577 * just reestablished, and remove it from the disconnected queue. 2582 * just reestablished, and remove it from the disconnected queue.
2578 */ 2583 */
2579 2584
2580 for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue, prev = NULL; 2585 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue, prev = NULL;
2581 tmp; prev = tmp, tmp = NEXT(tmp) ) { 2586 tmp; prev = tmp, tmp = NEXT(tmp) ) {
2582 if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun) 2587 if ((target_mask == (1 << tmp->device->id)) && (lun == tmp->device->lun)
2583#ifdef SUPPORT_TAGS 2588#ifdef SUPPORT_TAGS
@@ -2668,11 +2673,11 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
2668 2673
2669 2674
2670/* 2675/*
2671 * Function : int NCR5380_abort (Scsi_Cmnd *cmd) 2676 * Function : int NCR5380_abort(struct scsi_cmnd *cmd)
2672 * 2677 *
2673 * Purpose : abort a command 2678 * Purpose : abort a command
2674 * 2679 *
2675 * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the 2680 * Inputs : cmd - the struct scsi_cmnd to abort, code - code to set the
2676 * host byte of the result field to, if zero DID_ABORTED is 2681 * host byte of the result field to, if zero DID_ABORTED is
2677 * used. 2682 * used.
2678 * 2683 *
@@ -2684,11 +2689,11 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
2684 * called where the loop started in NCR5380_main(). 2689 * called where the loop started in NCR5380_main().
2685 */ 2690 */
2686 2691
2687static int NCR5380_abort (Scsi_Cmnd *cmd) 2692static int NCR5380_abort(struct scsi_cmnd *cmd)
2688{ 2693{
2689 struct Scsi_Host *instance = cmd->device->host; 2694 struct Scsi_Host *instance = cmd->device->host;
2690 SETUP_HOSTDATA(instance); 2695 SETUP_HOSTDATA(instance);
2691 Scsi_Cmnd *tmp, **prev; 2696 struct scsi_cmnd *tmp, **prev;
2692 unsigned long flags; 2697 unsigned long flags;
2693 2698
2694 printk(KERN_NOTICE "scsi%d: aborting command\n", HOSTNO); 2699 printk(KERN_NOTICE "scsi%d: aborting command\n", HOSTNO);
@@ -2753,9 +2758,9 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
2753 * Case 2 : If the command hasn't been issued yet, we simply remove it 2758 * Case 2 : If the command hasn't been issued yet, we simply remove it
2754 * from the issue queue. 2759 * from the issue queue.
2755 */ 2760 */
2756 for (prev = (Scsi_Cmnd **) &(hostdata->issue_queue), 2761 for (prev = (struct scsi_cmnd **) &(hostdata->issue_queue),
2757 tmp = (Scsi_Cmnd *) hostdata->issue_queue; 2762 tmp = (struct scsi_cmnd *) hostdata->issue_queue;
2758 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp) ) 2763 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp))
2759 if (cmd == tmp) { 2764 if (cmd == tmp) {
2760 REMOVE(5, *prev, tmp, NEXT(tmp)); 2765 REMOVE(5, *prev, tmp, NEXT(tmp));
2761 (*prev) = NEXT(tmp); 2766 (*prev) = NEXT(tmp);
@@ -2812,7 +2817,7 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
2812 * it from the disconnected queue. 2817 * it from the disconnected queue.
2813 */ 2818 */
2814 2819
2815 for (tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; tmp; 2820 for (tmp = (struct scsi_cmnd *) hostdata->disconnected_queue; tmp;
2816 tmp = NEXT(tmp)) 2821 tmp = NEXT(tmp))
2817 if (cmd == tmp) { 2822 if (cmd == tmp) {
2818 local_irq_restore(flags); 2823 local_irq_restore(flags);
@@ -2826,8 +2831,8 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
2826 do_abort (instance); 2831 do_abort (instance);
2827 2832
2828 local_irq_save(flags); 2833 local_irq_save(flags);
2829 for (prev = (Scsi_Cmnd **) &(hostdata->disconnected_queue), 2834 for (prev = (struct scsi_cmnd **) &(hostdata->disconnected_queue),
2830 tmp = (Scsi_Cmnd *) hostdata->disconnected_queue; 2835 tmp = (struct scsi_cmnd *) hostdata->disconnected_queue;
2831 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp) ) 2836 tmp; prev = NEXTADDR(tmp), tmp = NEXT(tmp) )
2832 if (cmd == tmp) { 2837 if (cmd == tmp) {
2833 REMOVE(5, *prev, tmp, NEXT(tmp)); 2838 REMOVE(5, *prev, tmp, NEXT(tmp));
@@ -2868,7 +2873,7 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
2868 2873
2869 2874
2870/* 2875/*
2871 * Function : int NCR5380_bus_reset (Scsi_Cmnd *cmd) 2876 * Function : int NCR5380_bus_reset(struct scsi_cmnd *cmd)
2872 * 2877 *
2873 * Purpose : reset the SCSI bus. 2878 * Purpose : reset the SCSI bus.
2874 * 2879 *
@@ -2876,13 +2881,13 @@ static int NCR5380_abort (Scsi_Cmnd *cmd)
2876 * 2881 *
2877 */ 2882 */
2878 2883
2879static int NCR5380_bus_reset( Scsi_Cmnd *cmd) 2884static int NCR5380_bus_reset(struct scsi_cmnd *cmd)
2880{ 2885{
2881 SETUP_HOSTDATA(cmd->device->host); 2886 SETUP_HOSTDATA(cmd->device->host);
2882 int i; 2887 int i;
2883 unsigned long flags; 2888 unsigned long flags;
2884#if 1 2889#if 1
2885 Scsi_Cmnd *connected, *disconnected_queue; 2890 struct scsi_cmnd *connected, *disconnected_queue;
2886#endif 2891#endif
2887 2892
2888 2893
@@ -2914,9 +2919,9 @@ static int NCR5380_bus_reset( Scsi_Cmnd *cmd)
2914 * remembered in local variables first. 2919 * remembered in local variables first.
2915 */ 2920 */
2916 local_irq_save(flags); 2921 local_irq_save(flags);
2917 connected = (Scsi_Cmnd *)hostdata->connected; 2922 connected = (struct scsi_cmnd *)hostdata->connected;
2918 hostdata->connected = NULL; 2923 hostdata->connected = NULL;
2919 disconnected_queue = (Scsi_Cmnd *)hostdata->disconnected_queue; 2924 disconnected_queue = (struct scsi_cmnd *)hostdata->disconnected_queue;
2920 hostdata->disconnected_queue = NULL; 2925 hostdata->disconnected_queue = NULL;
2921#ifdef SUPPORT_TAGS 2926#ifdef SUPPORT_TAGS
2922 free_all_tags(); 2927 free_all_tags();
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index e625b4c5833a..d56d85dd9ba0 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -119,7 +119,7 @@ module_param(setup_use_tagged_queuing, int, 0);
119static int setup_hostid = -1; 119static int setup_hostid = -1;
120module_param(setup_hostid, int, 0); 120module_param(setup_hostid, int, 0);
121 121
122static Scsi_Cmnd *sun3_dma_setup_done = NULL; 122static struct scsi_cmnd *sun3_dma_setup_done = NULL;
123 123
124#define AFTER_RESET_DELAY (HZ/2) 124#define AFTER_RESET_DELAY (HZ/2)
125 125
@@ -521,8 +521,9 @@ static inline unsigned long sun3scsi_dma_residual(struct Scsi_Host *instance)
521 return last_residual; 521 return last_residual;
522} 522}
523 523
524static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted, Scsi_Cmnd *cmd, 524static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted,
525 int write_flag) 525 struct scsi_cmnd *cmd,
526 int write_flag)
526{ 527{
527 if(blk_fs_request(cmd->request)) 528 if(blk_fs_request(cmd->request))
528 return wanted; 529 return wanted;
diff --git a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h
index 834dab428019..a1103b3e2034 100644
--- a/drivers/scsi/sun3_scsi.h
+++ b/drivers/scsi/sun3_scsi.h
@@ -47,11 +47,12 @@
47 47
48#define IOBASE_SUN3_VMESCSI 0xff200000 48#define IOBASE_SUN3_VMESCSI 0xff200000
49 49
50static int sun3scsi_abort (Scsi_Cmnd *); 50static int sun3scsi_abort(struct scsi_cmnd *);
51static int sun3scsi_detect (struct scsi_host_template *); 51static int sun3scsi_detect (struct scsi_host_template *);
52static const char *sun3scsi_info (struct Scsi_Host *); 52static const char *sun3scsi_info (struct Scsi_Host *);
53static int sun3scsi_bus_reset(Scsi_Cmnd *); 53static int sun3scsi_bus_reset(struct scsi_cmnd *);
54static int sun3scsi_queue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 54static int sun3scsi_queue_command(struct scsi_cmnd *,
55 void (*done)(struct scsi_cmnd *));
55static int sun3scsi_release (struct Scsi_Host *); 56static int sun3scsi_release (struct Scsi_Host *);
56 57
57#ifndef CMD_PER_LUN 58#ifndef CMD_PER_LUN
diff --git a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c
index e8faab16567b..92def310a84c 100644
--- a/drivers/scsi/sun3_scsi_vme.c
+++ b/drivers/scsi/sun3_scsi_vme.c
@@ -84,7 +84,7 @@ module_param(setup_use_tagged_queuing, int, 0);
84static int setup_hostid = -1; 84static int setup_hostid = -1;
85module_param(setup_hostid, int, 0); 85module_param(setup_hostid, int, 0);
86 86
87static Scsi_Cmnd *sun3_dma_setup_done = NULL; 87static struct scsi_cmnd *sun3_dma_setup_done = NULL;
88 88
89#define AFTER_RESET_DELAY (HZ/2) 89#define AFTER_RESET_DELAY (HZ/2)
90 90
@@ -455,8 +455,9 @@ static inline unsigned long sun3scsi_dma_residual(struct Scsi_Host *instance)
455 return last_residual; 455 return last_residual;
456} 456}
457 457
458static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted, Scsi_Cmnd *cmd, 458static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted,
459 int write_flag) 459 struct scsi_cmnd *cmd,
460 int write_flag)
460{ 461{
461 if(blk_fs_request(cmd->request)) 462 if(blk_fs_request(cmd->request))
462 return wanted; 463 return wanted;