1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

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).
This commit is contained in:
Joerg Wunsch 1999-12-21 08:33:03 +00:00
parent 5882e70cb6
commit e34c71ea40
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54939
3 changed files with 20 additions and 2 deletions

View File

@ -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*

View File

@ -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);

View File

@ -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);