patch-2.2.18 linux/drivers/scsi/gdth.h
Next file: linux/drivers/scsi/gdth_ioctl.h
Previous file: linux/drivers/scsi/gdth.c
Back to the patch index
Back to the overall index
- Lines: 225
- Date:
Sat Dec 9 21:22:29 2000
- Orig file:
v2.2.17/drivers/scsi/gdth.h
- Orig date:
Wed May 3 22:31:20 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/scsi/gdth.h linux/drivers/scsi/gdth.h
@@ -10,7 +10,7 @@
*
* <achim@vortex.de>
*
- * $Id: gdth.h,v 1.24 1999/11/02 13:43:49 achim Exp $
+ * $Id: gdth.h,v 1.33 2000/07/24 09:29:25 achim Exp $
*/
#include <linux/version.h>
@@ -29,9 +29,9 @@
/* defines, macros */
/* driver version */
-#define GDTH_VERSION_STR "1.17"
+#define GDTH_VERSION_STR "1.23"
#define GDTH_VERSION 1
-#define GDTH_SUBVERSION 17
+#define GDTH_SUBVERSION 23
/* protocol version */
#define PROTOCOL_VERSION 1
@@ -126,7 +126,8 @@
#endif
/* limits */
-#define GDTH_SCRATCH 4096 /* 4KB scratch buffer */
+#define GDTH_SCRATCH PAGE_SIZE /* 4KB scratch buffer */
+#define GDTH_SCRATCH_ORD 0 /* order 0 means 1 page */
#define GDTH_MAXCMDS 124
#define GDTH_MAXC_P_L 16 /* max. cmds per lun */
#define GDTH_MAX_RAW 2 /* max. cmds per raw device */
@@ -180,7 +181,7 @@
#define CLUSTER_RESERVED 4
#define CLUSTER_RESERVE_STATE (CLUSTER_DRIVE|CLUSTER_MOUNTED|CLUSTER_RESERVED)
-/* cache/raw service commands */
+/* commands for all services, cache service */
#define GDT_INIT 0 /* service initialization */
#define GDT_READ 1 /* read command */
#define GDT_WRITE 2 /* write command */
@@ -202,7 +203,7 @@
#define GDT_RW_ATTRIBS 23 /* R/W attribs (write thru,..)*/
#define GDT_CLUST_RESET 24 /* releases the cluster drives*/
-/* additional raw service commands */
+/* raw service commands */
#define GDT_RESERVE 14 /* reserve dev. to raw serv. */
#define GDT_RELEASE 15 /* release device */
#define GDT_RESERVE_ALL 16 /* reserve all devices */
@@ -211,6 +212,9 @@
#define GDT_SCAN_START 19 /* start device scan */
#define GDT_SCAN_END 20 /* stop device scan */
+/* screen service commands */
+#define GDT_REALTIME 3 /* realtime clock to screens. */
+
/* IOCTL command defines */
#define SCSI_DR_INFO 0x00 /* SCSI drive info */
#define SCSI_CHAN_CNT 0x05 /* SCSI channel count */
@@ -235,18 +239,9 @@
#define IO_CHANNEL 0x00020000L /* default IO channel */
#define INVALID_CHANNEL 0x0000ffffL /* invalid channel */
-/* IOCTLs */
-#define GDTIOCTL_MASK ('J'<<8)
-#define GDTIOCTL_GENERAL (GDTIOCTL_MASK | 0) /* general IOCTL */
-#define GDTIOCTL_DRVERS (GDTIOCTL_MASK | 1) /* get driver version */
-#define GDTIOCTL_CTRTYPE (GDTIOCTL_MASK | 2) /* get controller type */
-#define GDTIOCTL_CTRCNT (GDTIOCTL_MASK | 5) /* get controller count */
-#define GDTIOCTL_LOCKDRV (GDTIOCTL_MASK | 6) /* lock host drive */
-#define GDTIOCTL_LOCKCHN (GDTIOCTL_MASK | 7) /* lock channel */
-#define GDTIOCTL_EVENT (GDTIOCTL_MASK | 8) /* read controller events */
-
/* service errors */
#define S_OK 1 /* no error */
+#define S_GENERR 6 /* general error */
#define S_BSY 7 /* controller busy */
#define S_CACHE_UNKNOWN 12 /* cache serv.: drive unknown */
#define S_RAW_SCSI 12 /* raw serv.: target error */
@@ -263,10 +258,8 @@
#define HIGH_PRI 0x08
/* data directions */
-#ifndef HOSTS_C
-#define DATA_IN 0x01000000L /* data from target */
-#define DATA_OUT 0x00000000L /* data to target */
-#endif
+#define GDTH_DATA_IN 0x01000000L /* data from target */
+#define GDTH_DATA_OUT 0x00000000L /* data to target */
/* BMIC registers (EISA controllers) */
#define ID0REG 0x0c80 /* board ID */
@@ -472,11 +465,11 @@
} PACKED gdth_alist_str;
typedef struct {
- ulong32 entries_avail; /* allocated entries */
- ulong32 entries_init; /* returned entries */
- ulong32 first_entry; /* first entry number */
- ulong32 list_offset; /* offset of following list */
- gdth_alist_str list[1]; /* list */
+ ulong32 entries_avail; /* allocated entries */
+ ulong32 entries_init; /* returned entries */
+ ulong32 first_entry; /* first entry number */
+ ulong32 list_offset; /* offset of following list */
+ gdth_alist_str list[1]; /* list */
} PACKED gdth_arcdl_str;
/* cache info/config IOCTL */
@@ -609,8 +602,13 @@
} PACKED ioctl; /* IOCTL command structure */
struct {
ushort reserved;
- ulong32 msg_handle; /* message handle */
- ulong32 msg_addr; /* message buffer address */
+ union {
+ struct {
+ ulong32 msg_handle; /* message handle */
+ ulong32 msg_addr; /* message buffer address */
+ } PACKED msg;
+ unchar data[12]; /* buffer for rtc data, ... */
+ } su;
} PACKED screen; /* screen service cmd. str. */
struct {
ushort reserved;
@@ -673,6 +671,8 @@
ulong32 l1, l2, l3, l4;
} PACKED test;
} eu;
+ ulong32 severity;
+ unchar event_string[256];
} PACKED gdth_evt_data;
typedef struct {
@@ -822,7 +822,9 @@
unchar unused5[7];
unchar edoor_en_reg; /* board interrupts enable */
unchar unused6[27];
- ulong32 unused7[1004]; /* size: 4 KB */
+ ulong32 unused7[939];
+ ulong32 severity;
+ char evt_str[256]; /* event string */
} PACKED gdt6m_i960_regs;
/* DPRAM PCI MPR controllers */
@@ -856,6 +858,7 @@
ushort type; /* controller class */
ushort raw_feat; /* feat. raw service (s/g,..) */
ulong32 stype; /* controller subtype */
+ ushort fw_vers; /* firmware version */
ushort cache_feat; /* feat. cache serv. (s/g,..) */
ushort bmic; /* BMIC address (EISA) */
void *brd; /* DPRAM address */
@@ -868,6 +871,7 @@
unchar irq; /* IRQ */
unchar drq; /* DRQ (ISA controllers) */
ushort status; /* command status */
+ ushort service; /* service/firmware ver./.. */
ulong32 info;
ulong32 info2; /* additional info */
Scsi_Cmnd *req_first; /* top of request queue */
@@ -914,6 +918,7 @@
gdth_cpar_str cpar; /* controller cache par. */
gdth_bfeat_str bfeat; /* controller features */
gdth_binfo_str binfo; /* controller info */
+ gdth_evt_data dvr; /* event structure */
#if LINUX_VERSION_CODE >= 0x02015F
spinlock_t smp_lock;
#endif
@@ -1004,7 +1009,38 @@
#endif
const char *gdth_info(struct Scsi_Host *);
-#if LINUX_VERSION_CODE >= 0x02015F
+#if LINUX_VERSION_CODE >= 0x020322
+int gdth_bios_param(Disk *,kdev_t,int *);
+int gdth_proc_info(char *,char **,off_t,int,int,int);
+int gdth_eh_abort(Scsi_Cmnd *scp);
+int gdth_eh_device_reset(Scsi_Cmnd *scp);
+int gdth_eh_bus_reset(Scsi_Cmnd *scp);
+int gdth_eh_host_reset(Scsi_Cmnd *scp);
+#define GDTH { proc_name: "gdth", \
+ proc_info: gdth_proc_info, \
+ name: "GDT SCSI Disk Array Controller",\
+ detect: gdth_detect, \
+ release: gdth_release, \
+ info: gdth_info, \
+ command: gdth_command, \
+ queuecommand: gdth_queuecommand, \
+ eh_abort_handler: gdth_eh_abort, \
+ eh_device_reset_handler: gdth_eh_device_reset, \
+ eh_bus_reset_handler: gdth_eh_bus_reset, \
+ eh_host_reset_handler: gdth_eh_host_reset, \
+ abort: gdth_abort, \
+ reset: gdth_reset, \
+ bios_param: gdth_bios_param, \
+ can_queue: GDTH_MAXCMDS, \
+ this_id: -1, \
+ sg_tablesize: GDTH_MAXSG, \
+ cmd_per_lun: GDTH_MAXC_P_L, \
+ present: 0, \
+ unchecked_isa_dma: 1, \
+ use_clustering: ENABLE_CLUSTERING, \
+ use_new_eh_code: 1 /* use new error code */ }
+
+#elif LINUX_VERSION_CODE >= 0x02015F
int gdth_bios_param(Disk *,kdev_t,int *);
extern struct proc_dir_entry proc_scsi_gdth;
int gdth_proc_info(char *,char **,off_t,int,int,int);
@@ -1035,6 +1071,7 @@
unchecked_isa_dma: 1, \
use_clustering: ENABLE_CLUSTERING, \
use_new_eh_code: 1 /* use new error code */ }
+
#elif LINUX_VERSION_CODE >= 0x010300
int gdth_bios_param(Disk *,kdev_t,int *);
extern struct proc_dir_entry proc_scsi_gdth;
@@ -1059,6 +1096,7 @@
0, \
1, \
ENABLE_CLUSTERING}
+
#else
int gdth_bios_param(Disk *,int,int *);
#define GDTH { NULL, NULL, \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)