patch-2.2.19 linux/drivers/scsi/dc390.h
Next file: linux/drivers/scsi/gdth.c
Previous file: linux/drivers/scsi/cpqfcTSworker.c
Back to the patch index
Back to the overall index
- Lines: 92
- Date:
Sun Mar 25 11:37:36 2001
- Orig file:
v2.2.18/drivers/scsi/dc390.h
- Orig date:
Sun Mar 25 11:13:02 2001
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/drivers/scsi/dc390.h linux/drivers/scsi/dc390.h
@@ -4,9 +4,7 @@
* Description: Device Driver for Tekram DC-390(T) PCI SCSI *
* Bus Master Host Adapter *
***********************************************************************/
-/* $Id: dc390.h,v 2.12 1998/12/25 17:33:27 garloff Exp $ */
-
-#include <linux/version.h>
+/* $Id: dc390.h,v 2.43.2.22 2000/12/20 00:39:36 garloff Exp $ */
/*
* DC390/AMD 53C974 driver, header file
@@ -15,12 +13,27 @@
#ifndef DC390_H
#define DC390_H
+#include <linux/version.h>
+#ifndef KERNEL_VERSION
+# define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#endif
+
#define DC390_BANNER "Tekram DC390/AM53C974"
-#define DC390_VERSION "2.0d 1998/12/25"
+#define DC390_VERSION "2.0f 2000-12-20"
-#if defined(HOSTS_C) || defined(MODULE)
+/* We don't have eh_abort_handler, eh_device_reset_handler,
+ * eh_bus_reset_handler, eh_host_reset_handler yet!
+ * So long: Use old exception handling :-( */
+#define OLD_EH
-#include <scsi/scsicam.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2,1,70) || defined (OLD_EH)
+# define NEW_EH
+#else
+# define NEW_EH use_new_eh_code: 1,
+# define USE_NEW_EH
+#endif
+
+#if defined(HOSTS_C) || defined(MODULE) || LINUX_VERSION_CODE > KERNEL_VERSION(2,3,99)
extern int DC390_detect(Scsi_Host_Template *psht);
extern int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
@@ -34,9 +47,29 @@
# define DC390_release NULL
#endif
-extern struct proc_dir_entry DC390_proc_scsi_tmscsim;
extern int DC390_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30)
+#define DC390_T { \
+ proc_name: "tmscsim", \
+ proc_info: DC390_proc_info, \
+ name: DC390_BANNER " V" DC390_VERSION, \
+ detect: DC390_detect, \
+ release: DC390_release, \
+ queuecommand: DC390_queue_command, \
+ abort: DC390_abort, \
+ reset: DC390_reset, \
+ bios_param: DC390_bios_param, \
+ can_queue: 42, \
+ this_id: 7, \
+ sg_tablesize: SG_ALL, \
+ cmd_per_lun: 16, \
+ NEW_EH \
+ unchecked_isa_dma: 0, \
+ use_clustering: DISABLE_CLUSTERING \
+ }
+#else
+extern struct proc_dir_entry DC390_proc_scsi_tmscsim;
#define DC390_T { \
proc_dir: &DC390_proc_scsi_tmscsim, \
proc_info: DC390_proc_info, \
@@ -47,13 +80,15 @@
abort: DC390_abort, \
reset: DC390_reset, \
bios_param: DC390_bios_param, \
- can_queue: 17, \
+ can_queue: 42, \
this_id: 7, \
sg_tablesize: SG_ALL, \
- cmd_per_lun: 8, \
+ cmd_per_lun: 16, \
+ NEW_EH \
+ unchecked_isa_dma: 0, \
use_clustering: DISABLE_CLUSTERING \
}
-
+#endif
#endif /* defined(HOSTS_C) || defined(MODULE) */
#endif /* DC390_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)