summaryrefslogtreecommitdiffstats
path: root/sys/isa/fdc.h
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-01-06 15:20:00 +0000
committerjoerg <joerg@FreeBSD.org>1995-01-06 15:20:00 +0000
commit08cb0571ab09c586e2dab6da5ef67a89f30d1739 (patch)
tree59e85172d0f0879e0d6be3b17ccb0f10ddd40c33 /sys/isa/fdc.h
parentf3185e4419e9c16dc85a4d39abaf556fcce86363 (diff)
downloadFreeBSD-src-08cb0571ab09c586e2dab6da5ef67a89f30d1739.zip
FreeBSD-src-08cb0571ab09c586e2dab6da5ef67a89f30d1739.tar.gz
Peter's work to work around one of the most annoying bugs in the
floppy driver (or in the hardware?). It turned out to be caused by spurious interrupts, right after an FDC reset. Also major cleanup in the low-level structure, there are now functions performing error-checks for the FDC I/O. Submitted by: (mostly) Peter Dufault <dufault@FreeBSD.org>
Diffstat (limited to 'sys/isa/fdc.h')
-rw-r--r--sys/isa/fdc.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/isa/fdc.h b/sys/isa/fdc.h
index 950ef23..0216b7a 100644
--- a/sys/isa/fdc.h
+++ b/sys/isa/fdc.h
@@ -31,10 +31,15 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fdc.h,v 1.3 1994/09/17 16:56:07 davidg Exp $
+ * $Id: fdc.h,v 1.4 1994/10/10 01:12:26 phk Exp $
*
*/
+enum fdc_type
+{
+ FDC_NE765, FDC_I82077, FDC_NE72065, FDC_UNKNOWN = -1
+};
+
/***********************************************************************\
* Per controller structure. *
@@ -48,13 +53,16 @@ struct fdc_data
#define FDC_ATTACHED 0x01
#define FDC_HASFTAPE 0x02
#define FDC_TAPE_BUSY 0x04
+#define FDC_STAT_VALID 0x08
struct fd_data *fd;
int fdu; /* the active drive */
int state;
int retry;
int fdout; /* mirror of the w/o digital output reg */
u_long status[7]; /* copy of the registers */
- struct buf head; /* Head of buf chain */
+ enum fdc_type fdct; /* chip version of FDC */
+ int fdc_errs; /* number of logged errors */
+ struct buf head; /* Head of buf chain */
};
/***********************************************************************\
@@ -70,6 +78,7 @@ typedef int fdcu_t;
typedef int fdsu_t;
typedef struct fd_data *fd_p;
typedef struct fdc_data *fdc_p;
+typedef enum fdc_type fdc_t;
-#define FDUNIT(s) (((s)>>6)&03)
-#define FDTYPE(s) ((s)&077)
+#define FDUNIT(s) (((s)>>6)&03)
+#define FDTYPE(s) ((s)&077)
OpenPOWER on IntegriCloud