Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2004 09:32:08 -0700
From:      Nate Lawson <nate@root.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        current@freebsd.org
Subject:   Re: No more floppy drive
Message-ID:  <41335688.1060805@root.org>
In-Reply-To: <20040825.171523.10602123.imp@bsdimp.com>
References:  <20040825222345.GB79209@ip.net.ua> <20040825.163130.66167637.imp@bsdimp.com>	<412D1CE6.3050603@root.org> <20040825.171523.10602123.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
M. Warner Losh wrote:
> In message: <412D1CE6.3050603@root.org>
>             Nate Lawson <nate@root.org> writes:
> : M. Warner Losh wrote:
> : > In message: <20040825222345.GB79209@ip.net.ua>
> : >             Ruslan Ermilov <ru@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41335688.1060805>