aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/fdc/fdc.c16
-rw-r--r--sys/isa/fd.c16
-rw-r--r--sys/isa/fdc.h18
3 files changed, 17 insertions, 33 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 022f348bb5cf..a0155b7b4764 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -215,22 +215,6 @@ static int enable_fifo(fdc_p fdc);
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
-
-#define DEVIDLE 0
-#define FINDWORK 1
-#define DOSEEK 2
-#define SEEKCOMPLETE 3
-#define IOCOMPLETE 4
-#define RECALCOMPLETE 5
-#define STARTRECAL 6
-#define RESETCTLR 7
-#define SEEKWAIT 8
-#define RECALWAIT 9
-#define MOTORWAIT 10
-#define IOTIMEDOUT 11
-#define RESETCOMPLETE 12
-#define PIOREAD 13
-
#ifdef FDC_DEBUG
static char const * const fdstates[] =
{
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 022f348bb5cf..a0155b7b4764 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -215,22 +215,6 @@ static int enable_fifo(fdc_p fdc);
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
-
-#define DEVIDLE 0
-#define FINDWORK 1
-#define DOSEEK 2
-#define SEEKCOMPLETE 3
-#define IOCOMPLETE 4
-#define RECALCOMPLETE 5
-#define STARTRECAL 6
-#define RESETCTLR 7
-#define SEEKWAIT 8
-#define RECALWAIT 9
-#define MOTORWAIT 10
-#define IOTIMEDOUT 11
-#define RESETCOMPLETE 12
-#define PIOREAD 13
-
#ifdef FDC_DEBUG
static char const * const fdstates[] =
{
diff --git a/sys/isa/fdc.h b/sys/isa/fdc.h
index 90ec8da1e540..db25e4d0e980 100644
--- a/sys/isa/fdc.h
+++ b/sys/isa/fdc.h
@@ -40,6 +40,22 @@ enum fdc_type
FDC_NE765, FDC_I82077, FDC_NE72065, FDC_UNKNOWN = -1
};
+enum fdc_states {
+ DEVIDLE,
+ FINDWORK,
+ DOSEEK,
+ SEEKCOMPLETE ,
+ IOCOMPLETE,
+ RECALCOMPLETE,
+ STARTRECAL,
+ RESETCTLR,
+ SEEKWAIT,
+ RECALWAIT,
+ MOTORWAIT,
+ IOTIMEDOUT,
+ RESETCOMPLETE,
+ PIOREAD
+};
/***********************************************************************\
* Per controller structure. *
@@ -58,7 +74,7 @@ struct fdc_data
#define FDC_ISPCMCIA 0x100
struct fd_data *fd;
int fdu; /* the active drive */
- int state;
+ enum fdc_states state;
int retry;
int fdout; /* mirror of the w/o digital output reg */
u_int status[7]; /* copy of the registers */