public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macqel.be>
To: Robert Hancock <hancockrwd@gmail.com>
Cc: linux-kernel@vger.kernel.org, abelay@mit.edu, bjorn.helgaas@hp.com
Subject: Re: [BUG] pnpbios breaks floppy support
Date: Sun, 1 Feb 2009 14:18:01 +0100	[thread overview]
Message-ID: <20090201131801.GA326@frolo.macqel> (raw)
In-Reply-To: <49854A71.500@gmail.com>

On Sun, Feb 01, 2009 at 01:08:33AM -0600, Robert Hancock wrote:
> Philippe De Muyter wrote:
>> Hello linux experts,
>> Today I tried to upgrade a PC's kernel from 2.6.11 to 2.6.22, and
>> I saw some strange messages when booting :
>> 	Floppy drive(s): fd0 is 1.44M
>> 	floppy0: Floppy io-port 0x03f2 in use
>> Previously, I had :
>> 	Floppy drive(s): fd0 is 1.44M
>> 	FDC 0 is a post-1991 82077
>> Needless to say, my floppy hardware works perfectly, and my floppy
>> was usable with the old kernel, while the floppy is now inaccessible
>> with the new kernel.  Even /dev/fd0 does not exist anymore.
>> Searching for a cause to that problem, I saw the following messages
>> before the floppy probe in the new kernel :
>> 	PnPBIOS: Scanning system for PnP BIOS support...
>> 	PnPBIOS: Found PnP BIOS installation structure at 0xc00fd5e0
>> 	PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x5ba3, dseg 0xf0000
>> 	PnPBIOS: 17 nodes reported by PnP BIOS; 17 recorded by driver
>> 	[...]
>> 	pnp: 00:07: ioport range 0x3f0-0x3f1 has been reserved
>> 	pnp: 00:07: ioport range 0x3f3-0x3f3 has been reserved
>> 	[...]
>> Searching the web and the outdated pnp kernel documentation, I
>> finally found an option to add to my kernel parameters line :
>> 	pnpbios=off
>> Now my floppy works again, but I am not really satisfied.
>> What do I loose with the 'pnpbios=off' option ?
>> Isn't there a smoother option to allow pnpbios but avoiding to reserve
>> floppy's io-ports ?
>> Should I modify rather /drivers/block/floppy.c or /drivers/pnp/*.c
>> to make pnpbios and floppy driver coexist peacefully ? And is there
>> an example of such modifications for other standard peripherals ?
>
> Presumably the problem is that your BIOS marks the IO ports used by the 
> floppy controller as reserved which prevents the floppy driver from binding 
> to them. (2.6.11 probably was before we even processed PnP reserved 
> regions.)
>
> I think we now have handling for the case where the reservations overlap 
> PCI devices, but I think it's the first I've heard of them overlapping the 
> floppy IO ports..

I should have added that, when started with pnpbios enabled, 
I have found the following in /sys/devices/pnp0/ :

	$ cat 00:03/id
	PNP0700
	$ cat 00:03/resources 
	state = active
	io 0x3f4-0x3f5
	io 0x3f2-0x3f2
	irq 6
	dma 2
	$ cat 00:03/options
	port 0x3f4-0x3f4, align 0x0, size 0x2, 16-bit address decoding
	port 0x3f2-0x3f2, align 0x0, size 0x1, 16-bit address decoding
	irq 6 High-Edge
	dma 2 8-bit compatible

AFAIK, PNP0700 is the pnp id for the standard floppy disk,
and the resources and options files describe the expected io-ports
of the floppy disk, so this does not seem to be an error in the bios.

Philippe

  reply	other threads:[~2009-02-01 13:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 21:29 [BUG] pnpbios breaks floppy support Philippe De Muyter
2009-02-01  7:08 ` Robert Hancock
2009-02-01 13:18   ` Philippe De Muyter [this message]
2009-02-01 20:11     ` Robert Hancock
2009-02-01 20:48       ` Adam M Belay
2009-02-01 21:56         ` Philippe De Muyter
2009-02-01 22:13           ` Robert Hancock
2009-02-02  6:43             ` Adam M Belay
2009-02-04  0:29               ` Bjorn Helgaas
2009-02-05 12:17                 ` Philippe De Muyter
2009-02-05 15:07                   ` Adam M Belay
  -- strict thread matches above, loose matches on Subject: below --
2009-02-01 19:05 matthieu castet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090201131801.GA326@frolo.macqel \
    --to=phdm@macqel.be \
    --cc=abelay@mit.edu \
    --cc=bjorn.helgaas@hp.com \
    --cc=hancockrwd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox