- Kai Germaschewski: ISDN update (including Makefiles)
[davej-history.git] / drivers / scsi / ibmmca.h
blob52cd7386b2011d83fbb9c02f815310fe473d76d4
1 /*
2 * Low Level Driver for the IBM Microchannel SCSI Subsystem
3 * (Headerfile, see README.ibmmca for description of the IBM MCA SCSI-driver
4 * For use under the GNU public license within the Linux-kernel project.
5 */
7 #ifndef _IBMMCA_H
8 #define _IBMMCA_H
10 #ifndef LINUX_VERSION_CODE
11 #include <linux/version.h>
12 #endif
14 /* Note to the Linux-toplevel-maintainers:
15 * This file contains the unified header for all available Linux-distributions.
16 * For reasons of maintenance, it is recommended to keep this unmodified to
17 * be downward compatible until I no longer get any requests from people
18 * using older kernel releases on their PS/2 machines. (23 Apr 2000, M.Lang) */
20 /* Common forward declarations for all Linux-versions: */
22 /* Interfaces to the midlevel Linux SCSI driver */
23 extern int ibmmca_proc_info (char *, char **, off_t, int, int, int);
24 extern int ibmmca_detect (Scsi_Host_Template *);
25 extern int ibmmca_release (struct Scsi_Host *);
26 extern int ibmmca_command (Scsi_Cmnd *);
27 extern int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
28 extern int ibmmca_abort (Scsi_Cmnd *);
29 extern int ibmmca_reset (Scsi_Cmnd *, unsigned int);
30 extern int ibmmca_biosparam (Disk *, kdev_t, int *);
32 /*structure for /proc filesystem */
33 extern struct proc_dir_entry proc_scsi_ibmmca;
35 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,75)
36 /* Stuff for Linux >= 2.1.75: */
38 * 2/8/98
39 * Note to maintainer of IBMMCA. Do not change this initializer back to
40 * the old format. Please ask eric@andante.jic.com if you have any questions
41 * about this, but it will break things in the future.
43 /*initialization for Scsi_host_template type (Linux >= 2.1.75 && < 2.3.27) */
45 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
46 #define IBMMCA { \
47 proc_dir: &proc_scsi_ibmmca, /*proc_dir*/ \
48 proc_info: ibmmca_proc_info, /*proc info fn*/ \
49 name: "IBM SCSI-Subsystem", /*name*/ \
50 detect: ibmmca_detect, /*detect fn*/ \
51 release: ibmmca_release, /*release fn*/ \
52 command: ibmmca_command, /*command fn*/ \
53 queuecommand: ibmmca_queuecommand, /*queuecommand fn*/ \
54 abort: ibmmca_abort, /*abort fn*/ \
55 reset: ibmmca_reset, /*reset fn*/ \
56 bios_param: ibmmca_biosparam, /*bios fn*/ \
57 can_queue: 16, /*can_queue*/ \
58 this_id: 7, /*set by detect*/ \
59 sg_tablesize: 16, /*sg_tablesize*/ \
60 cmd_per_lun: 1, /*cmd_per_lun*/ \
61 unchecked_isa_dma: 0, /*32-Bit Busmaster */ \
62 use_clustering: ENABLE_CLUSTERING /*use_clustering*/ \
64 #else
65 #define IBMMCA { \
66 proc_name: "ibmmca", /*proc_name*/ \
67 proc_info: ibmmca_proc_info, /*proc info fn*/ \
68 name: "IBM SCSI-Subsystem", /*name*/ \
69 detect: ibmmca_detect, /*detect fn*/ \
70 release: ibmmca_release, /*release fn*/ \
71 command: ibmmca_command, /*command fn*/ \
72 queuecommand: ibmmca_queuecommand, /*queuecommand fn*/ \
73 abort: ibmmca_abort, /*abort fn*/ \
74 reset: ibmmca_reset, /*reset fn*/ \
75 bios_param: ibmmca_biosparam, /*bios fn*/ \
76 can_queue: 16, /*can_queue*/ \
77 this_id: 7, /*set by detect*/ \
78 sg_tablesize: 16, /*sg_tablesize*/ \
79 cmd_per_lun: 1, /*cmd_per_lun*/ \
80 unchecked_isa_dma: 0, /*32-Bit Busmaster */ \
81 use_clustering: ENABLE_CLUSTERING /*use_clustering*/ \
83 #endif
84 #else
85 /* Stuff for Linux < 2.1.75: */
87 /*initialization for Scsi_host_template type (Linux < 2.1.75) */
88 #define IBMMCA { \
89 NULL, /*next*/ \
90 NULL, /*usage_count*/ \
91 &proc_scsi_ibmmca, /*proc_dir*/ \
92 ibmmca_proc_info, /*proc info fn*/ \
93 "IBM SCSI-Subsystem", /*name*/ \
94 ibmmca_detect, /*detect fn*/ \
95 ibmmca_release, /*release fn*/ \
96 NULL, /*info fn*/ \
97 ibmmca_command, /*command fn*/ \
98 ibmmca_queuecommand, /*queuecommand fn*/ \
99 ibmmca_abort, /*abort fn*/ \
100 ibmmca_reset, /*reset fn*/ \
101 NULL, /*slave_attach fn*/ \
102 ibmmca_biosparam, /*bios fn*/ \
103 16, /*can_queue*/ \
104 7, /*set by detect*/ \
105 16, /*sg_tablesize*/ \
106 1, /*cmd_per_lun*/ \
107 0, /*present*/ \
108 0, /*unchecked_isa_dma*/ \
109 ENABLE_CLUSTERING /*use_clustering*/ \
111 #endif /* kernelversion selection */
113 #endif /* _IBMMCA_H */