diff options
-rw-r--r-- | share/man/man4/fdc.4 | 14 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 4 | ||||
-rw-r--r-- | sys/isa/fd.c | 4 |
3 files changed, 20 insertions, 2 deletions
diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4 index 97348c1..f837eb0 100644 --- a/share/man/man4/fdc.4 +++ b/share/man/man4/fdc.4 @@ -53,6 +53,20 @@ configuration value in their CMOS. Use the flags value .Ql 0x1 to pretend a 1.44 MB floppy drive as the first unit, without asking the CMOS for it. +.Pp +The flags value +.Ql 0x2 +is reserved for PCMCIA floppy use, and should never be set in a +configuration file directly. It is internally handled in the driver +if the compilation option +.Dv FDC_YE +is set, and defers device probing. +.Pp +Normally, the device driver detects FDC chipsets that have an internal +FIFO, and enables the FIFO on them. There is a slight chance that this +feature is actually misdetected (seen on an IBM Thinkpad 755c), so it +can be turned off using flags +.Ql 0x4 . .Sh FILES .Bl -tag -width Pa -compact .It /dev/fd* 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); |