summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>1999-11-18 11:34:26 +0000
committernyan <nyan@FreeBSD.org>1999-11-18 11:34:26 +0000
commit34a943f35a6850f6b71d92c36e741a64544dd3c1 (patch)
tree98d003334e98ab109d7e36f587b50ca3290f2559 /sys/pc98
parente9ddf5050352d8694b99fbf33ad85ed91c2b5c10 (diff)
downloadFreeBSD-src-34a943f35a6850f6b71d92c36e741a64544dd3c1.zip
FreeBSD-src-34a943f35a6850f6b71d92c36e741a64544dd3c1.tar.gz
Sync with sys/isa/fd.c revision 1.168.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/fdc.c21
-rw-r--r--sys/pc98/pc98/fd.c21
2 files changed, 2 insertions, 40 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index b462291..47063fc 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -51,11 +51,8 @@
*
*/
-#include "fd.h"
#include "opt_fdc.h"
-#if NFDC > 0
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -451,9 +448,6 @@ static int yeinit(struct pccard_devinfo *devi)
{
fdc_p fdc = &fdc_data[devi->isahd.id_unit];
- /* validate unit number. */
- if (devi->isahd.id_unit >= NFDC)
- return(ENODEV);
fdc->baseport = devi->isahd.id_iobase;
/*
* reset controller
@@ -1009,14 +1003,6 @@ fdc_attach(device_t dev)
#endif
bufq_init(&fdc->head);
-#ifdef FIFO_BEFORE_MOTORON
- /* Hmm, this doesn't work here - is set_motor() magic? -Peter */
- if (fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
- && enable_fifo(fdc) == 0) {
- device_print_prettyname(dev);
- printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
- }
-#endif
/*
* Probe and attach any children as were configured above.
*/
@@ -1071,9 +1057,7 @@ fd_probe(device_t dev)
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
-#ifndef FIFO_BEFORE_MOTORON
static int fd_fifo = 0;
-#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);
@@ -1159,14 +1143,13 @@ fd_probe(device_t dev)
set_motor(fdc, fdsu, TURNON);
DELAY(1000000); /* 1 sec */
-#ifndef FIFO_BEFORE_MOTORON
+ /* XXX This doesn't work before the first set_motor() */
if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(device_get_parent(dev));
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
fd_fifo = 1;
-#endif
if ((fd_cmd(fdc, 2, NE7CMD_SENSED, fdsu, 1, &st3) == 0)
&& (st3 & NE7_ST3_T0)) {
@@ -2773,8 +2756,6 @@ fdioctl(dev, cmd, addr, flag, p)
return (error);
}
-#endif /* NFDC > 0 */
-
/*
* Hello emacs, these are the
* Local Variables:
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index b462291..47063fc 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -51,11 +51,8 @@
*
*/
-#include "fd.h"
#include "opt_fdc.h"
-#if NFDC > 0
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -451,9 +448,6 @@ static int yeinit(struct pccard_devinfo *devi)
{
fdc_p fdc = &fdc_data[devi->isahd.id_unit];
- /* validate unit number. */
- if (devi->isahd.id_unit >= NFDC)
- return(ENODEV);
fdc->baseport = devi->isahd.id_iobase;
/*
* reset controller
@@ -1009,14 +1003,6 @@ fdc_attach(device_t dev)
#endif
bufq_init(&fdc->head);
-#ifdef FIFO_BEFORE_MOTORON
- /* Hmm, this doesn't work here - is set_motor() magic? -Peter */
- if (fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
- && enable_fifo(fdc) == 0) {
- device_print_prettyname(dev);
- printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
- }
-#endif
/*
* Probe and attach any children as were configured above.
*/
@@ -1071,9 +1057,7 @@ fd_probe(device_t dev)
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
-#ifndef FIFO_BEFORE_MOTORON
static int fd_fifo = 0;
-#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);
@@ -1159,14 +1143,13 @@ fd_probe(device_t dev)
set_motor(fdc, fdsu, TURNON);
DELAY(1000000); /* 1 sec */
-#ifndef FIFO_BEFORE_MOTORON
+ /* XXX This doesn't work before the first set_motor() */
if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(device_get_parent(dev));
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
fd_fifo = 1;
-#endif
if ((fd_cmd(fdc, 2, NE7CMD_SENSED, fdsu, 1, &st3) == 0)
&& (st3 & NE7_ST3_T0)) {
@@ -2773,8 +2756,6 @@ fdioctl(dev, cmd, addr, flag, p)
return (error);
}
-#endif /* NFDC > 0 */
-
/*
* Hello emacs, these are the
* Local Variables:
OpenPOWER on IntegriCloud