patch-2.2.18 linux/drivers/scsi/ibmmca.h

Next file: linux/drivers/scsi/ide-scsi.c
Previous file: linux/drivers/scsi/ibmmca.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/scsi/ibmmca.h linux/drivers/scsi/ibmmca.h
@@ -1,3 +1,9 @@
+/* 
+ * Low Level Driver for the IBM Microchannel SCSI Subsystem
+ * (Headerfile, see README.ibmmca for description of the IBM MCA SCSI-driver
+ * For use under the GNU public license within the Linux-kernel project.
+ */
+
 #ifndef _IBMMCA_H
 #define _IBMMCA_H
 
@@ -5,18 +11,15 @@
 #include <linux/version.h>
 #endif
 
-#ifndef ibmmca_header_linux_version
-#define ibmmca_header_linux_version(v,p,s) (((v)<<16)+((p)<<8)+(s))
-#endif
-
-/* 
- * Low Level Driver for the IBM Microchannel SCSI Subsystem
- * (Headerfile, see README.ibmmca for description of the IBM MCA SCSI-driver)
- */
+/* Note to the Linux-toplevel-maintainers: 
+ * This file contains the unified header for all available Linux-distributions.
+ * For reasons of maintenance, it is recommended to keep this unmodified to
+ * be downward compatible until I no longer get any requests from people 
+ * using older kernel releases on their PS/2 machines. (23 Apr 2000, M.Lang) */
 
 /* Common forward declarations for all Linux-versions: */
 
-/*services provided to the higher level of Linux SCSI driver */
+/* Interfaces to the midlevel Linux SCSI driver */
 extern int ibmmca_proc_info (char *, char **, off_t, int, int, int);
 extern int ibmmca_detect (Scsi_Host_Template *);
 extern int ibmmca_release (struct Scsi_Host *);
@@ -29,16 +32,18 @@
 /*structure for /proc filesystem */
 extern struct proc_dir_entry proc_scsi_ibmmca;
 
-#if LINUX_VERSION_CODE >= ibmmca_header_linux_version(2,1,0)
-/* Stuff for Linux >= 2.1.0: */
-/*initialization for Scsi_host_template type (Linux >= 2.1.0) */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,75)
+/* Stuff for Linux >= 2.1.75: */
 /*
  * 2/8/98
  * Note to maintainer of IBMMCA.  Do not change this initializer back to
  * the old format.  Please ask eric@andante.jic.com if you have any questions
  * about this, but it will break things in the future.
  */
-#define IBMMCA {						      \
+/*initialization for Scsi_host_template type (Linux >= 2.1.75 && < 2.3.27) */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,27)
+#define IBMMCA {                                                      \
           proc_dir:       &proc_scsi_ibmmca,    /*proc_dir*/          \
 	  proc_info:	  ibmmca_proc_info,     /*proc info fn*/      \
           name:           "IBM SCSI-Subsystem", /*name*/              \
@@ -56,11 +61,30 @@
           unchecked_isa_dma: 0,                 /*32-Bit Busmaster */ \
           use_clustering: ENABLE_CLUSTERING     /*use_clustering*/    \
           }
-
 #else
-/* Stuff for Linux < 2.1.0: */
+#define IBMMCA {                                                      \
+          proc_name:      "ibmmca",             /*proc_name*/         \
+	  proc_info:	  ibmmca_proc_info,     /*proc info fn*/      \
+          name:           "IBM SCSI-Subsystem", /*name*/              \
+          detect:         ibmmca_detect,        /*detect fn*/         \
+          release:        ibmmca_release,       /*release fn*/        \
+          command:        ibmmca_command,       /*command fn*/        \
+          queuecommand:   ibmmca_queuecommand,  /*queuecommand fn*/   \
+          abort:          ibmmca_abort,         /*abort fn*/          \
+          reset:          ibmmca_reset,         /*reset fn*/          \
+          bios_param:     ibmmca_biosparam,     /*bios fn*/           \
+          can_queue:      16,                   /*can_queue*/         \
+          this_id:        7,                    /*set by detect*/     \
+          sg_tablesize:   16,                   /*sg_tablesize*/      \
+          cmd_per_lun:    1,                    /*cmd_per_lun*/       \
+          unchecked_isa_dma: 0,                 /*32-Bit Busmaster */ \
+          use_clustering: ENABLE_CLUSTERING     /*use_clustering*/    \
+          }
+#endif
+#else
+/* Stuff for Linux < 2.1.75: */
 
-/*initialization for Scsi_host_template type (Linux < 2.1.0) */
+/*initialization for Scsi_host_template type (Linux < 2.1.75) */
 #define IBMMCA {                                      \
           NULL,                 /*next*/              \
           NULL,                 /*usage_count*/       \

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)