summaryrefslogtreecommitdiffstats
path: root/sys/isa/fdreg.h
diff options
context:
space:
mode:
authoralm <alm@FreeBSD.org>1994-02-07 04:27:13 +0000
committeralm <alm@FreeBSD.org>1994-02-07 04:27:13 +0000
commit0e4e4906a67c31334feb655a2d0a32bf770dd772 (patch)
treed74d0ff541ded4d074802a92e5fcef4c7452c22e /sys/isa/fdreg.h
parent3ac0b190f064a6c65e1322acc36208a844211807 (diff)
downloadFreeBSD-src-0e4e4906a67c31334feb655a2d0a32bf770dd772.zip
FreeBSD-src-0e4e4906a67c31334feb655a2d0a32bf770dd772.tar.gz
Add floppy tape driver - fd => fdc
Diffstat (limited to 'sys/isa/fdreg.h')
-rw-r--r--sys/isa/fdreg.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/sys/isa/fdreg.h b/sys/isa/fdreg.h
index 84dbf75..895da8c 100644
--- a/sys/isa/fdreg.h
+++ b/sys/isa/fdreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
- * $Id$
+ * $Id: fdreg.h,v 1.2 1993/10/16 13:45:50 rgrimes Exp $
*/
/*
@@ -63,4 +63,41 @@
#define fdin 7 /* Digital Input Register (R) */
#define FDI_DCHG 0x80 /* diskette has been changed */
+/***********************************************************************\
+* Per controller structure. *
+\***********************************************************************/
+struct fdc_data
+{
+ int fdcu; /* our unit number */
+ int baseport;
+ int dmachan;
+ int flags;
+#define FDC_ATTACHED 0x01
+#define FDC_HASFTAPE 0x02
+#define FDC_TAPE_BUSY 0x04
+ struct fd_data *fd;
+ int fdu; /* the active drive */
+ struct buf head; /* Head of buf chain */
+ struct buf rhead; /* Raw head of buf chain */
+ int state;
+ int retry;
+ int status[7]; /* copy of the registers */
+};
+/***********************************************************************\
+* Throughout this file the following conventions will be used: *
+* fd is a pointer to the fd_data struct for the drive in question *
+* fdc is a pointer to the fdc_data struct for the controller *
+* fdu is the floppy drive unit number *
+* fdcu is the floppy controller unit number *
+* fdsu is the floppy drive unit number on that controller. (sub-unit) *
+\***********************************************************************/
+typedef int fdu_t;
+typedef int fdcu_t;
+typedef int fdsu_t;
+typedef struct fd_data *fd_p;
+typedef struct fdc_data *fdc_p;
+
+
+#define FDUNIT(s) (((s)>>6)&03)
+#define FDTYPE(s) ((s)&077)
OpenPOWER on IntegriCloud