~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/drivers/scsi/advansys.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* $Id: advansys.h,v 1.18 1999/11/29 21:47:16 bobf Exp bobf $ */
  2 
  3 /*
  4  * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters
  5  * 
  6  * Copyright (c) 1995-1998 Advanced System Products, Inc.
  7  * All Rights Reserved.
  8  *
  9  * Redistribution and use in source and binary forms, with or without
 10  * modification, are permitted provided that redistributions of source
 11  * code retain the above copyright notice and this comment without
 12  * modification.
 13  *
 14  * There is an AdvanSys Linux WWW page at:
 15  *  http://www.advansys.com/linux.html
 16  *
 17  * The latest version of the AdvanSys driver is available at:
 18  *  ftp://ftp.advansys.com/pub/linux
 19  *
 20  * Please send questions, comments, bug reports to:
 21  *  bobf@advansys.com (Bob Frey)
 22  */
 23 
 24 #ifndef _ADVANSYS_H
 25 #define _ADVANSYS_H
 26 
 27 /* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
 28 #define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))
 29 
 30 #ifndef LINUX_VERSION_CODE
 31 #include <linux/version.h>
 32 #endif /* LINUX_VERSION_CODE */
 33 
 34 /*
 35  * Scsi_Host_Template function prototypes.
 36  */
 37 int advansys_detect(Scsi_Host_Template *);
 38 int advansys_release(struct Scsi_Host *);
 39 const char *advansys_info(struct Scsi_Host *);
 40 int advansys_command(Scsi_Cmnd *);
 41 int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 42 int advansys_abort(Scsi_Cmnd *);
 43 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
 44 int advansys_reset(Scsi_Cmnd *);
 45 #else /* version >= v1.3.89 */
 46 int advansys_reset(Scsi_Cmnd *, unsigned int);
 47 #endif /* version >= v1.3.89 */
 48 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
 49 int advansys_biosparam(Disk *, int, int[]);
 50 #else /* version >= v1.3.0 */
 51 int advansys_biosparam(Disk *, kdev_t, int[]);
 52 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
 53 extern struct proc_dir_entry proc_scsi_advansys;
 54 #endif /* version < v2.3.28 */
 55 int advansys_proc_info(char *, char **, off_t, int, int, int);
 56 #endif /* version >= v1.3.0 */
 57 
 58 /* init/main.c setup function */
 59 void advansys_setup(char *, int *);
 60 
 61 /*
 62  * AdvanSys Host Driver Scsi_Host_Template (struct SHT) from hosts.h.
 63  */
 64 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
 65 #define ADVANSYS { \
 66     NULL,                     /* struct SHT *next */ \
 67     NULL,                     /* int *usage_count */ \
 68     "advansys",               /* char *name */ \
 69     advansys_detect,          /* int (*detect)(struct SHT *) */ \
 70     advansys_release,         /* int (*release)(struct Scsi_Host *) */ \
 71     advansys_info,            /* const char *(*info)(struct Scsi_Host *) */ \
 72     advansys_command,         /* int (*command)(Scsi_Cmnd *) */ \
 73     advansys_queuecommand, \
 74             /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
 75     advansys_abort,           /* int (*abort)(Scsi_Cmnd *) */ \
 76     advansys_reset,           /* int (*reset)(Scsi_Cmnd *) */ \
 77     NULL,                     /* int (*slave_attach)(int, int) */ \
 78     advansys_biosparam,       /* int (* bios_param)(Disk *, int, int []) */ \
 79     /* \
 80      * The following fields are set per adapter in advansys_detect(). \
 81      */ \
 82     0,                        /* int can_queue */ \
 83     0,                        /* int this_id */ \
 84     0,                        /* short unsigned int sg_tablesize */ \
 85     0,                        /* short cmd_per_lun */ \
 86     0,                        /* unsigned char present */    \
 87     /* \
 88      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
 89      * must be set. The flag will be cleared in advansys_detect for non-ISA \
 90      * adapters. Refer to the comment in scsi_module.c for more information. \
 91      */ \
 92     1,                        /* unsigned unchecked_isa_dma:1 */ \
 93     /* \
 94      * All adapters controlled by this driver are capable of large \
 95      * scatter-gather lists. According to the mid-level SCSI documentation \
 96      * this obviates any performance gain provided by setting \
 97      * 'use_clustering'. But empirically while CPU utilization is increased \
 98      * by enabling clustering, I/O throughput increases as well. \
 99      */ \
100     ENABLE_CLUSTERING,        /* unsigned use_clustering:1 */ \
101 }
102 #elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75)
103 #define ADVANSYS { \
104     NULL,                    /* struct SHT *next */ \
105     NULL, \
106         /* version < v2.1.23 long *usage_count */ \
107         /* version >= v2.1.23 struct module * */ \
108     &proc_scsi_advansys,     /* struct proc_dir_entry *proc_dir */ \
109     advansys_proc_info,    \
110         /* int (*proc_info)(char *, char **, off_t, int, int, int) */ \
111     "advansys",              /* const char *name */ \
112     advansys_detect,         /* int (*detect)(struct SHT *) */ \
113     advansys_release,        /* int (*release)(struct Scsi_Host *) */ \
114     advansys_info,           /* const char *(*info)(struct Scsi_Host *) */ \
115     advansys_command,        /* int (*command)(Scsi_Cmnd *) */ \
116     advansys_queuecommand, \
117         /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
118     advansys_abort,          /* int (*abort)(Scsi_Cmnd *) */ \
119     advansys_reset, \
120         /* version < v1.3.89 int (*reset)(Scsi_Cmnd *) */ \
121         /* version >= v1.3.89 int (*reset)(Scsi_Cmnd *, unsigned int) */ \
122     NULL,                    /* int (*slave_attach)(int, int) */ \
123     advansys_biosparam,      /* int (* bios_param)(Disk *, kdev_t, int []) */ \
124     /* \
125      * The following fields are set per adapter in advansys_detect(). \
126      */ \
127     0,                        /* int can_queue */ \
128     0,                        /* int this_id */ \
129     0,                        /* short unsigned int sg_tablesize */ \
130     0,                        /* short cmd_per_lun */ \
131     0,                        /* unsigned char present */    \
132     /* \
133      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
134      * must be set. The flag will be cleared in advansys_detect for non-ISA \
135      * adapters. Refer to the comment in scsi_module.c for more information. \
136      */ \
137     1,                        /* unsigned unchecked_isa_dma:1 */ \
138     /* \
139      * All adapters controlled by this driver are capable of large \
140      * scatter-gather lists. According to the mid-level SCSI documentation \
141      * this obviates any performance gain provided by setting \
142      * 'use_clustering'. But empirically while CPU utilization is increased \
143      * by enabling clustering, I/O throughput increases as well. \
144      */ \
145     ENABLE_CLUSTERING,        /* unsigned use_clustering:1 */ \
146 }
147 #elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
148 #define ADVANSYS { \
149     proc_dir:     &proc_scsi_advansys, \
150     proc_info:    advansys_proc_info, \
151     name:         "advansys", \
152     detect:       advansys_detect, \
153     release:      advansys_release, \
154     info:         advansys_info, \
155     command:      advansys_command, \
156     queuecommand: advansys_queuecommand, \
157     abort:        advansys_abort, \
158     reset:        advansys_reset, \
159     bios_param:   advansys_biosparam, \
160     /* \
161      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
162      * must be set. The flag will be cleared in advansys_detect for non-ISA \
163      * adapters. Refer to the comment in scsi_module.c for more information. \
164      */ \
165     unchecked_isa_dma: 1, \
166     /* \
167      * All adapters controlled by this driver are capable of large \
168      * scatter-gather lists. According to the mid-level SCSI documentation \
169      * this obviates any performance gain provided by setting \
170      * 'use_clustering'. But empirically while CPU utilization is increased \
171      * by enabling clustering, I/O throughput increases as well. \
172      */ \
173     use_clustering: ENABLE_CLUSTERING, \
174 }
175 #else /* version >= v2.3.28 */
176 #define ADVANSYS { \
177     proc_name:    "advansys", \
178     proc_info:    advansys_proc_info, \
179     name:         "advansys", \
180     detect:       advansys_detect, \
181     release:      advansys_release, \
182     info:         advansys_info, \
183     command:      advansys_command, \
184     queuecommand: advansys_queuecommand, \
185     abort:        advansys_abort, \
186     reset:        advansys_reset, \
187     bios_param:   advansys_biosparam, \
188     /* \
189      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
190      * must be set. The flag will be cleared in advansys_detect for non-ISA \
191      * adapters. Refer to the comment in scsi_module.c for more information. \
192      */ \
193     unchecked_isa_dma: 1, \
194     /* \
195      * All adapters controlled by this driver are capable of large \
196      * scatter-gather lists. According to the mid-level SCSI documentation \
197      * this obviates any performance gain provided by setting \
198      * 'use_clustering'. But empirically while CPU utilization is increased \
199      * by enabling clustering, I/O throughput increases as well. \
200      */ \
201     use_clustering: ENABLE_CLUSTERING, \
202 }
203 #endif /* version >= v2.3.28 */
204 #endif /* _ADVANSYS_H */
205 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.