No more floppy drive
Nate Lawson
nate at root.org
Mon Aug 30 09:32:26 PDT 2004
M. Warner Losh wrote:
> In message: <412D1CE6.3050603 at root.org>
> Nate Lawson <nate at root.org> writes:
> : M. Warner Losh wrote:
> : > In message: <20040825222345.GB79209 at ip.net.ua>
> : > Ruslan Ermilov <ru at freebsd.org> writes:
> : > : On Wed, Aug 25, 2004 at 04:17:33PM -0600, M. Warner Losh wrote:
> : > : > Generally one doesn't want ANY hints when one has pnpisabios or acpi
> : > : > supplying the hints, unless one really does have an exceptional device
> : > : > at that location.
> : > : >
> : > : A lot of current@ users report missing /dev/fd0 due to this. Can this
> : > : be fixed somehow?
> : >
> : > acpi should be providing these hints, but it appears that either that
> : > code isn't working, hasn't been committed or there's no fallback to
> : > more traditional methods when there's no information about fd drives.
> : > This is one of the twistiest, nastiest, ugliest part of PCAT :-(
> :
> : The code I added merely does:
> :
> : if (_FDE working)
> : add fd[0-2] children accordingly
> : if (fdX._FDI working)
> : set type on fdX
> : else
> : unmodified hints probe for fd[0-2]
> :
> : if (fdX type not set)
> : unmodified drive type probe via rtc
> :
> : Since the probe is unmodified if _FDE is not present, I can't see a new
> : problem here. If this is a new problem, it must be elsewhere.
>
> I'll take a look at things. I think it may have to do with
> presence/absence things.
>
> Warner
Ok, as suspected, our floppy driver is being overly ambitious in
allocating IO ports. See these messages for how it was solved in Linux
(and Windows).
http://www.ussg.iu.edu/hypermail/linux/kernel/0202.0/1286.html
http://www.ussg.iu.edu/hypermail/linux/kernel/0202.0/1603.html
http://www.ussg.iu.edu/hypermail/linux/kernel/0202.0/1606.html
Basically, systems that have AML that claim 0x3f2-0x3f5,0x3f7 are
correct and we need to only allocate those ports. In fact, we shouldn't
allocate 0x3f0-0x3f1 unless on a PS/2 system. However, our floppy code
assumes a base of 0x3f0 and that's why people report error messages like:
fdc0: <floppy drive controller> port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3
irq 6 drq 2 on acpi0
fdc0: output ready timeout
fdc0: cmd 3 failed at out byte 1 of 3
device_attach: fdc0 attach returned 6
-Nate
More information about the freebsd-current
mailing list