Import 2.3.18pre1
[davej-history.git] / drivers / scsi / ibmmca.h
blob58b3094b8d7cf584f32f42cb91feda87accf4083
1 #ifndef _IBMMCA_H
2 #define _IBMMCA_H
4 #ifndef LINUX_VERSION_CODE
5 #include <linux/version.h>
6 #endif
8 #ifndef ibmmca_header_linux_version
9 #define ibmmca_header_linux_version(v,p,s) (((v)<<16)+((p)<<8)+(s))
10 #endif
12 /*
13 * Low Level Driver for the IBM Microchannel SCSI Subsystem
14 * (Headerfile, see README.ibmmca for description of the IBM MCA SCSI-driver)
17 /* Common forward declarations for all Linux-versions: */
19 /*services provided to the higher level of Linux SCSI driver */
20 extern int ibmmca_proc_info (char *, char **, off_t, int, int, int);
21 extern int ibmmca_detect (Scsi_Host_Template *);
22 extern int ibmmca_release (struct Scsi_Host *);
23 extern int ibmmca_command (Scsi_Cmnd *);
24 extern int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
25 extern int ibmmca_abort (Scsi_Cmnd *);
26 extern int ibmmca_reset (Scsi_Cmnd *, unsigned int);
27 extern int ibmmca_biosparam (Disk *, kdev_t, int *);
29 /*structure for /proc filesystem */
30 extern struct proc_dir_entry proc_scsi_ibmmca;
32 #if LINUX_VERSION_CODE >= ibmmca_header_linux_version(2,1,0)
33 /* Stuff for Linux >= 2.1.0: */
34 /*initialization for Scsi_host_template type (Linux >= 2.1.0) */
36 * 2/8/98
37 * Note to maintainer of IBMMCA. Do not change this initializer back to
38 * the old format. Please ask eric@andante.jic.com if you have any questions
39 * about this, but it will break things in the future.
41 #define IBMMCA { \
42 proc_dir: &proc_scsi_ibmmca, /*proc_dir*/ \
43 proc_info: ibmmca_proc_info, /*proc info fn*/ \
44 name: "IBM SCSI-Subsystem", /*name*/ \
45 detect: ibmmca_detect, /*detect fn*/ \
46 release: ibmmca_release, /*release fn*/ \
47 command: ibmmca_command, /*command fn*/ \
48 queuecommand: ibmmca_queuecommand, /*queuecommand fn*/ \
49 abort: ibmmca_abort, /*abort fn*/ \
50 reset: ibmmca_reset, /*reset fn*/ \
51 bios_param: ibmmca_biosparam, /*bios fn*/ \
52 can_queue: 16, /*can_queue*/ \
53 this_id: 7, /*set by detect*/ \
54 sg_tablesize: 16, /*sg_tablesize*/ \
55 cmd_per_lun: 1, /*cmd_per_lun*/ \
56 unchecked_isa_dma: 0, /*32-Bit Busmaster */ \
57 use_clustering: ENABLE_CLUSTERING /*use_clustering*/ \
60 #else
61 /* Stuff for Linux < 2.1.0: */
63 /*initialization for Scsi_host_template type (Linux < 2.1.0) */
64 #define IBMMCA { \
65 NULL, /*next*/ \
66 NULL, /*usage_count*/ \
67 &proc_scsi_ibmmca, /*proc_dir*/ \
68 ibmmca_proc_info, /*proc info fn*/ \
69 "IBM SCSI-Subsystem", /*name*/ \
70 ibmmca_detect, /*detect fn*/ \
71 ibmmca_release, /*release fn*/ \
72 NULL, /*info fn*/ \
73 ibmmca_command, /*command fn*/ \
74 ibmmca_queuecommand, /*queuecommand fn*/ \
75 ibmmca_abort, /*abort fn*/ \
76 ibmmca_reset, /*reset fn*/ \
77 NULL, /*slave_attach fn*/ \
78 ibmmca_biosparam, /*bios fn*/ \
79 16, /*can_queue*/ \
80 7, /*set by detect*/ \
81 16, /*sg_tablesize*/ \
82 1, /*cmd_per_lun*/ \
83 0, /*present*/ \
84 0, /*unchecked_isa_dma*/ \
85 ENABLE_CLUSTERING /*use_clustering*/ \
87 #endif /* kernelversion selection */
89 #endif /* _IBMMCA_H */