patch-2.0.31 linux/drivers/scsi/in2000.h
Next file: linux/drivers/scsi/ncr53c8xx.c
Previous file: linux/drivers/scsi/in2000.c
Back to the patch index
Back to the overall index
- Lines: 111
- Date:
Tue Aug 5 13:26:17 1997
- Orig file:
v2.0.30/linux/drivers/scsi/in2000.h
- Orig date:
Thu May 9 06:40:24 1996
diff -u --recursive --new-file v2.0.30/linux/drivers/scsi/in2000.h linux/drivers/scsi/in2000.h
@@ -2,7 +2,7 @@
* in2000.h - Linux device driver definitions for the
* Always IN2000 ISA SCSI card.
*
- * IMPORTANT: This file is for version 1.28 - 07/May/1996
+ * IMPORTANT: This file is for version 1.31 - 06/Jul/1997
*
* Copyright (c) 1996 John Shifflett, GeoLog Consulting
* john@geolog.com
@@ -25,9 +25,66 @@
#include <asm/io.h>
+#define PROC_INTERFACE /* add code for /proc/scsi/in2000/xxx interface */
+#ifdef PROC_INTERFACE
+#define PROC_STATISTICS /* add code for keeping various real time stats */
+#endif
+
+#define SYNC_DEBUG /* extra info on sync negotiation printed */
+#define DEBUGGING_ON /* enable command-line debugging bitmask */
+#define DEBUG_DEFAULTS 0 /* default bitmask - change from command-line */
+
+#define FAST_READ_IO /* No problems with these on my machine */
+#define FAST_WRITE_IO
+
+#ifdef DEBUGGING_ON
+#define DB(f,a) if (hostdata->args & (f)) a;
+#define CHECK_NULL(p,s) /* if (!(p)) {printk("\n"); while (1) printk("NP:%s\r",(s));} */
+#else
+#define DB(f,a)
+#define CHECK_NULL(p,s)
+#endif
#define uchar unsigned char
+#define read1_io(a) (inb(hostdata->io_base+(a)))
+#define read2_io(a) (inw(hostdata->io_base+(a)))
+#define write1_io(b,a) (outb((b),hostdata->io_base+(a)))
+#define write2_io(w,a) (outw((w),hostdata->io_base+(a)))
+
+/* These inline assembly defines are derived from a patch
+ * sent to me by Bill Earnest. He's done a lot of very
+ * valuable thinking, testing, and coding during his effort
+ * to squeeze more speed out of this driver. I really think
+ * that we are doing IO at close to the maximum now with
+ * the fifo. (And yes, insw uses 'edi' while outsw uses
+ * 'esi'. Thanks Bill!)
+ */
+
+#define FAST_READ2_IO() \
+ __asm__ __volatile__ ("\n \
+ cld \n \
+ orl %%ecx, %%ecx \n \
+ jz 1f \n \
+ rep \n \
+ insw %%dx \n \
+1: " \
+ : "=D" (sp) /* output */ \
+ : "d" (f), "D" (sp), "c" (i) /* input */ \
+ : "edx", "ecx", "edi" ) /* trashed */
+
+#define FAST_WRITE2_IO() \
+ __asm__ __volatile__ ("\n \
+ cld \n \
+ orl %%ecx, %%ecx \n \
+ jz 1f \n \
+ rep \n \
+ outsw %%dx \n \
+1: " \
+ : "=S" (sp) /* output */ \
+ : "d" (f), "S" (sp), "c" (i) /* input */ \
+ : "edx", "ecx", "esi" ) /* trashed */
+
/* IN2000 io_port offsets */
#define IO_WD_ASR 0x00 /* R - 3393 auxstat reg */
@@ -194,6 +251,9 @@
+#define ILLEGAL_STATUS_BYTE 0xff
+
+
#define DEFAULT_SX_PER 500 /* (ns) fairly safe */
#define DEFAULT_SX_OFF 0 /* aka async */
@@ -231,7 +291,15 @@
uchar sync_xfer[8]; /* sync_xfer reg settings per target */
uchar sync_stat[8]; /* status of sync negotiation per target */
uchar sync_off; /* bit mask: don't use sync with these targets */
+#ifdef PROC_INTERFACE
uchar proc; /* bit mask: what's in proc output */
+#ifdef PROC_STATISTICS
+ unsigned long cmd_cnt[8]; /* # of commands issued per target */
+ unsigned long int_cnt; /* # of interrupts serviced */
+ unsigned long disc_allowed_cnt[8]; /* # of disconnects allowed per target */
+ unsigned long disc_done_cnt[8]; /* # of disconnects done per target*/
+#endif
+#endif
};
@@ -301,7 +369,7 @@
#define PR_VERSION 1<<0
#define PR_INFO 1<<1
-#define PR_TOTALS 1<<2
+#define PR_STATISTICS 1<<2
#define PR_CONNECTED 1<<3
#define PR_INPUTQ 1<<4
#define PR_DISCQ 1<<5
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov