diff options
author | joerg <joerg@FreeBSD.org> | 1999-12-21 08:33:03 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1999-12-21 08:33:03 +0000 |
commit | 367ba76bfd7f174f8f5f824a936846ca6b127977 (patch) | |
tree | 201362a26fcc6c8ea16af3ec77fa6e98428a19c9 /sys | |
parent | 53a4306dc988cadece776e9474ce21ef9b1da014 (diff) | |
download | FreeBSD-src-367ba76bfd7f174f8f5f824a936846ca6b127977.zip FreeBSD-src-367ba76bfd7f174f8f5f824a936846ca6b127977.tar.gz |
Add a flag to disable FIFO probing. The code seems to have a chance of
misdetecting FIFO capabilities, at least on my girlfriend's Thinkpad 755,
the driver doesn't work using the FIFO.
While i was at it, i (partially) fixed option FCC_YE since it would no
longer have compiled at all under -current. I've also made an attempt
to document the device driver flags value (ab-)used internally by this
option.
RELENG_3 candidate, but with a slightly different patch there (will go
to jkh in email).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdc/fdc.c | 4 | ||||
-rw-r--r-- | sys/isa/fd.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 86b79d1..7b44573 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -96,6 +96,7 @@ #define FDC_IS_PCMCIA (1 << 1) /* if successful probe, then it's a PCMCIA device */ #endif +#define FDC_NO_FIFO (1 << 2) /* do not enable FIFO */ /* internally used only, not really from CMOS: */ #define RTCFDT_144M_PRETENDED 0x1000 @@ -739,7 +740,7 @@ fdc_probe(device_t dev) * don't succeed on probe; wait * for PCCARD subsystem to do it */ - if (dev->id_flags & FDC_IS_PCMCIA) + if (device_get_flags(fdc->fdc_dev) & FDC_IS_PCMCIA) return(0); #endif return (0); @@ -920,6 +921,7 @@ fd_probe(device_t dev) /* XXX This doesn't work before the first set_motor() */ if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN + && (device_get_flags(fdc->fdc_dev) & FDC_NO_FIFO) == 0 && enable_fifo(fdc) == 0) { device_print_prettyname(device_get_parent(dev)); printf("FIFO enabled, %d bytes threshold\n", fifo_threshold); diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 86b79d1..7b44573 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -96,6 +96,7 @@ #define FDC_IS_PCMCIA (1 << 1) /* if successful probe, then it's a PCMCIA device */ #endif +#define FDC_NO_FIFO (1 << 2) /* do not enable FIFO */ /* internally used only, not really from CMOS: */ #define RTCFDT_144M_PRETENDED 0x1000 @@ -739,7 +740,7 @@ fdc_probe(device_t dev) * don't succeed on probe; wait * for PCCARD subsystem to do it */ - if (dev->id_flags & FDC_IS_PCMCIA) + if (device_get_flags(fdc->fdc_dev) & FDC_IS_PCMCIA) return(0); #endif return (0); @@ -920,6 +921,7 @@ fd_probe(device_t dev) /* XXX This doesn't work before the first set_motor() */ if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN + && (device_get_flags(fdc->fdc_dev) & FDC_NO_FIFO) == 0 && enable_fifo(fdc) == 0) { device_print_prettyname(device_get_parent(dev)); printf("FIFO enabled, %d bytes threshold\n", fifo_threshold); |