From owner-freebsd-current@FreeBSD.ORG Mon Aug 30 16:32:26 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DBED16A4CF; Mon, 30 Aug 2004 16:32:26 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC4043D49; Mon, 30 Aug 2004 16:32:23 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-127-84-57.dsl.snfc21.pacbell.net [67.127.84.57]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id i7UGWJjn006652; Mon, 30 Aug 2004 09:32:20 -0700 Message-ID: <41335688.1060805@root.org> Date: Mon, 30 Aug 2004 09:32:08 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 0.7 (X11/20040702) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <20040825222345.GB79209@ip.net.ua> <20040825.163130.66167637.imp@bsdimp.com> <412D1CE6.3050603@root.org> <20040825.171523.10602123.imp@bsdimp.com> In-Reply-To: <20040825.171523.10602123.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: phk@phk.freebsd.dk cc: current@freebsd.org Subject: Re: No more floppy drive X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2004 16:32:26 -0000 M. Warner Losh wrote: > In message: <412D1CE6.3050603@root.org> > Nate Lawson writes: > : M. Warner Losh wrote: > : > In message: <20040825222345.GB79209@ip.net.ua> > : > Ruslan Ermilov 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: 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