|
|
1.1 root 1: /* $Id: advansys.h,v 1.1.1.1 1997/02/25 21:27:46 thomas Exp $ */
2: /*
3: * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters
4: *
5: * Copyright (c) 1995-1996 Advanced System Products, Inc.
6: *
7: * This driver may be modified and freely distributed provided that
8: * the above copyright message and this comment are included in the
9: * distribution. The latest version of this driver is available at
10: * the AdvanSys FTP and BBS sites listed below.
11: *
12: * Please send questions, comments, and bug reports to:
13: * [email protected] (Bob Frey)
14: */
15:
16: #ifndef _ADVANSYS_H
17: #define _ADVANSYS_H
18:
19: /* The driver can be used in Linux 1.2.X or 1.3.X. */
20: #if !defined(LINUX_1_2) && !defined(LINUX_1_3)
21: #ifndef LINUX_VERSION_CODE
22: #include <linux/version.h>
23: #endif /* LINUX_VERSION_CODE */
24: #if LINUX_VERSION_CODE > 65536 + 3 * 256
25: #define LINUX_1_3
26: #else /* LINUX_VERSION_CODE */
27: #define LINUX_1_2
28: #endif /* LINUX_VERSION_CODE */
29: #endif /* !defined(LINUX_1_2) && !defined(LINUX_1_3) */
30:
31: /*
32: * Scsi_Host_Template function prototypes.
33: */
34: int advansys_detect(Scsi_Host_Template *);
35: int advansys_release(struct Scsi_Host *);
36: const char *advansys_info(struct Scsi_Host *);
37: int advansys_command(Scsi_Cmnd *);
38: int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
39: int advansys_abort(Scsi_Cmnd *);
40: int advansys_reset(Scsi_Cmnd *);
41: #ifdef LINUX_1_2
42: int advansys_biosparam(Disk *, int, int[]);
43: #else /* LINUX_1_3 */
44: int advansys_biosparam(Disk *, kdev_t, int[]);
45: extern struct proc_dir_entry proc_scsi_advansys;
46: int advansys_proc_info(char *, char **, off_t, int, int, int);
47: #endif /* LINUX_1_3 */
48:
49: /* init/main.c setup function */
50: void advansys_setup(char *, int *);
51:
52: /*
53: * AdvanSys Host Driver Scsi_Host_Template (struct SHT) from hosts.h.
54: */
55: #ifdef LINUX_1_2
56: #define ADVANSYS { \
57: NULL, /* struct SHT *next */ \
58: NULL, /* int *usage_count */ \
59: "advansys", /* char *name */ \
60: advansys_detect, /* int (*detect)(struct SHT *) */ \
61: advansys_release, /* int (*release)(struct Scsi_Host *) */ \
62: advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \
63: advansys_command, /* int (*command)(Scsi_Cmnd *) */ \
64: advansys_queuecommand, \
65: /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
66: advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \
67: advansys_reset, /* int (*reset)(Scsi_Cmnd *) */ \
68: NULL, /* int (*slave_attach)(int, int) */ \
69: advansys_biosparam, /* int (* bios_param)(Disk *, int, int []) */ \
70: /* \
71: * The following fields are set per adapter in advansys_detect(). \
72: */ \
73: 0, /* int can_queue */ \
74: 0, /* int this_id */ \
75: 0, /* short unsigned int sg_tablesize */ \
76: 0, /* short cmd_per_lun */ \
77: 0, /* unsigned char present */ \
78: /* \
79: * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
80: * must be set. The flag will be cleared in advansys_detect for non-ISA \
81: * adapters. Refer to the comment in scsi_module.c for more information. \
82: */ \
83: 1, /* unsigned unchecked_isa_dma:1 */ \
84: /* \
85: * All adapters controlled by this driver are capable of large \
86: * scatter-gather lists. This apparently obviates any performance
87: * gain provided by setting 'use_clustering'. \
88: */ \
89: DISABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
90: }
91: #else /* LINUX_1_3 */
92: #define ADVANSYS { \
93: NULL, /* struct SHT *next */ \
94: NULL, /* long *usage_count */ \
95: &proc_scsi_advansys, /* struct proc_dir_entry *proc_dir */ \
96: advansys_proc_info, \
97: /* int (*proc_info)(char *, char **, off_t, int, int, int) */ \
98: "advansys", /* const char *name */ \
99: advansys_detect, /* int (*detect)(struct SHT *) */ \
100: advansys_release, /* int (*release)(struct Scsi_Host *) */ \
101: advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \
102: advansys_command, /* int (*command)(Scsi_Cmnd *) */ \
103: advansys_queuecommand, \
104: /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \
105: advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \
106: advansys_reset, /* int (*reset)(Scsi_Cmnd *) */ \
107: NULL, /* int (*slave_attach)(int, int) */ \
108: advansys_biosparam, /* int (* bios_param)(Disk *, kdev_t, int []) */ \
109: /* \
110: * The following fields are set per adapter in advansys_detect(). \
111: */ \
112: 0, /* int can_queue */ \
113: 0, /* int this_id */ \
114: 0, /* short unsigned int sg_tablesize */ \
115: 0, /* short cmd_per_lun */ \
116: 0, /* unsigned char present */ \
117: /* \
118: * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
119: * must be set. The flag will be cleared in advansys_detect for non-ISA \
120: * adapters. Refer to the comment in scsi_module.c for more information. \
121: */ \
122: 1, /* unsigned unchecked_isa_dma:1 */ \
123: /* \
124: * All adapters controlled by this driver are capable of large \
125: * scatter-gather lists. This apparently obviates any performance
126: * gain provided by setting 'use_clustering'. \
127: */ \
128: DISABLE_CLUSTERING, /* unsigned use_clustering:1 */ \
129: }
130: #endif /* LINUX_1_3 */
131: #endif /* _ADVANSYS_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.