* [BUG] pnpbios breaks floppy support @ 2009-01-31 21:29 Philippe De Muyter 2009-02-01 7:08 ` Robert Hancock 0 siblings, 1 reply; 12+ messages in thread From: Philippe De Muyter @ 2009-01-31 21:29 UTC (permalink / raw) To: linux-kernel, abelay, bjorn.helgaas 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 ? Thanks for reading this far Philippe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 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 0 siblings, 1 reply; 12+ messages in thread From: Robert Hancock @ 2009-02-01 7:08 UTC (permalink / raw) To: Philippe De Muyter; +Cc: linux-kernel, abelay, bjorn.helgaas 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.. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 7:08 ` Robert Hancock @ 2009-02-01 13:18 ` Philippe De Muyter 2009-02-01 20:11 ` Robert Hancock 0 siblings, 1 reply; 12+ messages in thread From: Philippe De Muyter @ 2009-02-01 13:18 UTC (permalink / raw) To: Robert Hancock; +Cc: linux-kernel, abelay, bjorn.helgaas 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 13:18 ` Philippe De Muyter @ 2009-02-01 20:11 ` Robert Hancock 2009-02-01 20:48 ` Adam M Belay 0 siblings, 1 reply; 12+ messages in thread From: Robert Hancock @ 2009-02-01 20:11 UTC (permalink / raw) To: Philippe De Muyter; +Cc: linux-kernel, abelay, bjorn.helgaas Philippe De Muyter wrote: > 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. There's likely another resource with id of PNP0C01 or PNP0C02 (Motherboard resources) which contains that same IO port range. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 20:11 ` Robert Hancock @ 2009-02-01 20:48 ` Adam M Belay 2009-02-01 21:56 ` Philippe De Muyter 0 siblings, 1 reply; 12+ messages in thread From: Adam M Belay @ 2009-02-01 20:48 UTC (permalink / raw) To: Philippe De Muyter; +Cc: Robert Hancock, linux-kernel, bjorn.helgaas Quoting Robert Hancock <hancockrwd@gmail.com>: > Philippe De Muyter wrote: >> 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. > > There's likely another resource with id of PNP0C01 or PNP0C02 > (Motherboard resources) which contains that same IO port range. > Yes, could you post the same information for 00:07 so we can start to narrow this down? Also having "cat /proc/ioports" couldn't hurt. Thanks, Adam ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 20:48 ` Adam M Belay @ 2009-02-01 21:56 ` Philippe De Muyter 2009-02-01 22:13 ` Robert Hancock 0 siblings, 1 reply; 12+ messages in thread From: Philippe De Muyter @ 2009-02-01 21:56 UTC (permalink / raw) To: Adam M Belay; +Cc: Robert Hancock, linux-kernel, bjorn.helgaas On Sun, Feb 01, 2009 at 03:48:49PM -0500, Adam M Belay wrote: > Quoting Robert Hancock <hancockrwd@gmail.com>: > >> Philippe De Muyter wrote: >>> 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. >> >> There's likely another resource with id of PNP0C01 or PNP0C02 (Motherboard >> resources) which contains that same IO port range. >> > > Yes, could you post the same information for 00:07 so we can start to > narrow > this down? Also having "cat /proc/ioports" couldn't hurt. Here it is, and that shows that you are thus both really experts in that area : $ cat 00:07/id 00:07/resources PNP0c02 state = active io 0x80-0x80 io 0x10-0x1f io 0x22-0x3f io 0x44-0x5f io 0x90-0x9f io 0xa2-0xbf io 0x3f0-0x3f1 io 0x3f3-0x3f3 mem 0x100000-0xc0fffff mem 0xfff80000-0xfff94fff mem 0xfff98000-0xfffbffff mem 0xfffc0000-0xffffffff $ cat /proc/ioports 0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-006f : keyboard 0070-0077 : rtc 0080-008f : dma page reg 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : 0000:00:07.1 0170-0177 : libata 01f0-01f7 : 0000:00:07.1 01f0-01f7 : libata 02f8-02ff : serial 0376-0376 : 0000:00:07.1 0376-0376 : libata 0378-037a : parport0 037b-037f : parport0 03c0-03df : vga+ 03f0-03f1 : pnp 00:07 03f3-03f3 : pnp 00:07 03f6-03f6 : 0000:00:07.1 03f6-03f6 : libata 03f8-03ff : serial 04d0-04d1 : pnp 00:11 0cf8-0cff : PCI conf1 ec00-ec7f : 0000:00:03.0 ec00-ec7f : tulip ecf0-ecff : 0000:00:07.1 ecf0-ecff : libata Thanks for your quick answers. Feel free to ask more info's Philippe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 21:56 ` Philippe De Muyter @ 2009-02-01 22:13 ` Robert Hancock 2009-02-02 6:43 ` Adam M Belay 0 siblings, 1 reply; 12+ messages in thread From: Robert Hancock @ 2009-02-01 22:13 UTC (permalink / raw) To: Philippe De Muyter; +Cc: Adam M Belay, linux-kernel, bjorn.helgaas Philippe De Muyter wrote: > On Sun, Feb 01, 2009 at 03:48:49PM -0500, Adam M Belay wrote: >> Quoting Robert Hancock <hancockrwd@gmail.com>: >> >>> Philippe De Muyter wrote: >>>> 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. >>> There's likely another resource with id of PNP0C01 or PNP0C02 (Motherboard >>> resources) which contains that same IO port range. >>> >> Yes, could you post the same information for 00:07 so we can start to >> narrow >> this down? Also having "cat /proc/ioports" couldn't hurt. > > Here it is, and that shows that you are thus both really experts in that area : > > $ cat 00:07/id 00:07/resources > PNP0c02 > state = active > io 0x80-0x80 > io 0x10-0x1f > io 0x22-0x3f > io 0x44-0x5f > io 0x90-0x9f > io 0xa2-0xbf > io 0x3f0-0x3f1 > io 0x3f3-0x3f3 > mem 0x100000-0xc0fffff > mem 0xfff80000-0xfff94fff > mem 0xfff98000-0xfffbffff > mem 0xfffc0000-0xffffffff > > $ cat /proc/ioports > 0000-001f : dma1 > 0020-0021 : pic1 > 0040-0043 : timer0 > 0050-0053 : timer1 > 0060-006f : keyboard > 0070-0077 : rtc > 0080-008f : dma page reg > 00a0-00a1 : pic2 > 00c0-00df : dma2 > 00f0-00ff : fpu > 0170-0177 : 0000:00:07.1 > 0170-0177 : libata > 01f0-01f7 : 0000:00:07.1 > 01f0-01f7 : libata > 02f8-02ff : serial > 0376-0376 : 0000:00:07.1 > 0376-0376 : libata > 0378-037a : parport0 > 037b-037f : parport0 > 03c0-03df : vga+ > 03f0-03f1 : pnp 00:07 > 03f3-03f3 : pnp 00:07 > 03f6-03f6 : 0000:00:07.1 > 03f6-03f6 : libata > 03f8-03ff : serial > 04d0-04d1 : pnp 00:11 > 0cf8-0cff : PCI conf1 > ec00-ec7f : 0000:00:03.0 > ec00-ec7f : tulip > ecf0-ecff : 0000:00:07.1 > ecf0-ecff : libata > > Thanks for your quick answers. Feel free to ask more info's Likely we should change things so that if a motherboard resource overlaps another PnP resource then we ignore it, as obviously Windows permits this behavior.. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-01 22:13 ` Robert Hancock @ 2009-02-02 6:43 ` Adam M Belay 2009-02-04 0:29 ` Bjorn Helgaas 0 siblings, 1 reply; 12+ messages in thread From: Adam M Belay @ 2009-02-02 6:43 UTC (permalink / raw) To: Robert Hancock, bjorn.helgaas; +Cc: Philippe De Muyter, linux-kernel, lenb Quoting Robert Hancock <hancockrwd@gmail.com>: > Philippe De Muyter wrote: >> On Sun, Feb 01, 2009 at 03:48:49PM -0500, Adam M Belay wrote: >>> Quoting Robert Hancock <hancockrwd@gmail.com>: >>> >>>> Philippe De Muyter wrote: >>>>> 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. >>>> There's likely another resource with id of PNP0C01 or PNP0C02 >>>> (Motherboard resources) which contains that same IO port range. >>>> >>> Yes, could you post the same information for 00:07 so we can start >>> to narrow >>> this down? Also having "cat /proc/ioports" couldn't hurt. >> >> Here it is, and that shows that you are thus both really experts in >> that area : >> >> $ cat 00:07/id 00:07/resources >> PNP0c02 >> state = active >> io 0x80-0x80 >> io 0x10-0x1f >> io 0x22-0x3f >> io 0x44-0x5f >> io 0x90-0x9f >> io 0xa2-0xbf >> io 0x3f0-0x3f1 >> io 0x3f3-0x3f3 >> mem 0x100000-0xc0fffff >> mem 0xfff80000-0xfff94fff >> mem 0xfff98000-0xfffbffff >> mem 0xfffc0000-0xffffffff >> >> $ cat /proc/ioports 0000-001f : dma1 >> 0020-0021 : pic1 >> 0040-0043 : timer0 >> 0050-0053 : timer1 >> 0060-006f : keyboard >> 0070-0077 : rtc >> 0080-008f : dma page reg >> 00a0-00a1 : pic2 >> 00c0-00df : dma2 >> 00f0-00ff : fpu >> 0170-0177 : 0000:00:07.1 >> 0170-0177 : libata >> 01f0-01f7 : 0000:00:07.1 >> 01f0-01f7 : libata >> 02f8-02ff : serial >> 0376-0376 : 0000:00:07.1 >> 0376-0376 : libata >> 0378-037a : parport0 >> 037b-037f : parport0 >> 03c0-03df : vga+ >> 03f0-03f1 : pnp 00:07 >> 03f3-03f3 : pnp 00:07 >> 03f6-03f6 : 0000:00:07.1 >> 03f6-03f6 : libata >> 03f8-03ff : serial >> 04d0-04d1 : pnp 00:11 >> 0cf8-0cff : PCI conf1 >> ec00-ec7f : 0000:00:03.0 >> ec00-ec7f : tulip >> ecf0-ecff : 0000:00:07.1 >> ecf0-ecff : libata >> >> Thanks for your quick answers. Feel free to ask more info's > > Likely we should change things so that if a motherboard resource > overlaps another PnP resource then we ignore it, as obviously Windows > permits this behavior.. > Ok, so it appears that we have a genuine resource conflict with the system device (00:07). This is because the floppy driver is requesting four consecutive I/O ports rather than the two ports reported by the PnPBIOS. Here's a look at what I see on one of my ACPI boxes: state = active io 0x3f0-0x3f5 io 0x3f7-0x3f7 irq 6 dma 2 This should work just fine and matches well with what the floppy driver expects. So the next step is to determine if this issue is typical when running in PnPBIOS mode. I'm not convinced we need to permit PnP resources to overlap, as it turns out to not be the issue in this case: There are no overlaps between the system device and floppy device in Philippe's configuration. It does suggest, however, that calling request_region() without using the size of the resource that PnP reports can cause problems. Bjorn, I think it might make sense to eventually have the PnP layer register resources with request_region() instead of handling it in device drivers. What do you think? In the short term we could either skip the floppy driver's call to request_region() when using PnP detection or have it use the length reported in the resource descriptor. Still, I'm curious which I/O ports the driver is actually using. More to follow... Thanks, Adam ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-02 6:43 ` Adam M Belay @ 2009-02-04 0:29 ` Bjorn Helgaas 2009-02-05 12:17 ` Philippe De Muyter 0 siblings, 1 reply; 12+ messages in thread From: Bjorn Helgaas @ 2009-02-04 0:29 UTC (permalink / raw) To: Adam M Belay; +Cc: Robert Hancock, Philippe De Muyter, linux-kernel, lenb On Sunday 01 February 2009 11:43:31 pm Adam M Belay wrote: > >>>>> $ cat 00:03/resources > >>>>> state = active > >>>>> io 0x3f4-0x3f5 > >>>>> io 0x3f2-0x3f2 > >> $ cat 00:07/id 00:07/resources > >> PNP0c02 > >> state = active > >> io 0x80-0x80 > >> io 0x10-0x1f > >> io 0x22-0x3f > >> io 0x44-0x5f > >> io 0x90-0x9f > >> io 0xa2-0xbf > >> io 0x3f0-0x3f1 > >> io 0x3f3-0x3f3 > Ok, so it appears that we have a genuine resource conflict with the > system device (00:07). This is because the floppy driver is requesting > four consecutive I/O ports rather than the two ports reported by the > PnPBIOS. As far as I can tell, floppy.c uses only these registers: 0x3f2 (FD_DOR) 0x3f4 (FD_STATUS) 0x3f5 (FD_DATA) 0x3f7 (FD_DCR/FD_DIR) But it requests 0x3f2-0x3f5 and 0x3f7. That includes the unused register at 0x3f3, hence the conflict with 00:07. I think we should just change floppy.c to request only ports 2, 4-5, and 7, with something like the patch below. Philippe, can you give it a try? > Bjorn, I think it might make sense to eventually have the PnP layer > register resources with request_region() instead of handling it in > device drivers. What do you think? In the short term we could either > skip the floppy driver's call to request_region() when using PnP detection > or have it use the length reported in the resource descriptor. Still, I'm > curious which I/O ports the driver is actually using. In PCI, we do both: the core requests resources based on the BAR values, and the drivers request the actual resources they need. I think that's important because we account for the resources used by devices without drivers. I would really like the PNP core to do something similar eventually. We actually tried it a year or so ago in the -mm tree, but there are some subtleties that I didn't fully comprehend, so we had to back it out. Here are some of the threads from that attempt: http://lkml.org/lkml/2007/10/29/412 (RFC) http://lkml.org/lkml/2007/11/1/214 (repost) http://lkml.org/lkml/2007/11/29/451 (suspend/resume problem) http://lkml.org/lkml/2007/12/5/227 (more suspend/resume fiddling) http://lkml.org/lkml/2007/12/11/200 (causes critical temp shutdown) Bjorn diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index cf29cc4..44f711b 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4399,15 +4399,20 @@ static int floppy_grab_irq_and_dma(void) for (fdc = 0; fdc < N_FDC; fdc++) { if (FDCS->address != -1) { - if (!request_region(FDCS->address + 2, 4, "floppy")) { + if (!request_region(FDCS->address + 2, 1, "floppy")) { DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + 2); goto cleanup1; } + if (!request_region(FDCS->address + 4, 2, "floppy")) { + DPRINT("Floppy io-port 0x%04lx in use\n", + FDCS->address + 4); + goto cleanup2; + } if (!request_region(FDCS->address + 7, 1, "floppy DIR")) { DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + 7); - goto cleanup2; + goto cleanup3; } /* address + 6 is reserved, and may be taken by IDE. * Unfortunately, Adaptec doesn't know this :-(, */ @@ -4432,13 +4437,16 @@ static int floppy_grab_irq_and_dma(void) fdc = 0; irqdma_allocated = 1; return 0; +cleanup3: + release_region(FDCS->address + 4, 2); cleanup2: - release_region(FDCS->address + 2, 4); + release_region(FDCS->address + 2, 1); cleanup1: fd_free_irq(); fd_free_dma(); while (--fdc >= 0) { - release_region(FDCS->address + 2, 4); + release_region(FDCS->address + 2, 1); + release_region(FDCS->address + 4, 2); release_region(FDCS->address + 7, 1); } spin_lock_irqsave(&floppy_usage_lock, flags); ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-04 0:29 ` Bjorn Helgaas @ 2009-02-05 12:17 ` Philippe De Muyter 2009-02-05 15:07 ` Adam M Belay 0 siblings, 1 reply; 12+ messages in thread From: Philippe De Muyter @ 2009-02-05 12:17 UTC (permalink / raw) To: Bjorn Helgaas; +Cc: Adam M Belay, Robert Hancock, linux-kernel, lenb On Tue, Feb 03, 2009 at 05:29:01PM -0700, Bjorn Helgaas wrote: > I think we should just change floppy.c to request only ports > 2, 4-5, and 7, with something like the patch below. Philippe, > can you give it a try? Your patch solves the problem : no error from the floppy initialisation, and the floppy works effectively. Thank you Philippe ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support 2009-02-05 12:17 ` Philippe De Muyter @ 2009-02-05 15:07 ` Adam M Belay 0 siblings, 0 replies; 12+ messages in thread From: Adam M Belay @ 2009-02-05 15:07 UTC (permalink / raw) To: Philippe De Muyter, Bjorn Helgaas; +Cc: Robert Hancock, linux-kernel, lenb Philippe, thanks for reporting this bug and testing the fix. Bjorn, this patch looks good to me. Thanks, Adam Quoting Philippe De Muyter <phdm@macqel.be>: > On Tue, Feb 03, 2009 at 05:29:01PM -0700, Bjorn Helgaas wrote: > >> I think we should just change floppy.c to request only ports >> 2, 4-5, and 7, with something like the patch below. Philippe, >> can you give it a try? > > Your patch solves the problem : no error from the floppy initialisation, > and the floppy works effectively. > > Thank you > > Philippe > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] pnpbios breaks floppy support
@ 2009-02-01 19:05 matthieu castet
0 siblings, 0 replies; 12+ messages in thread
From: matthieu castet @ 2009-02-01 19:05 UTC (permalink / raw)
To: Linux Kernel list, Philippe De Muyter
> 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
And what is on "cat 00:07/resources" ?
I bet you also found the floppy IO here...
Matthieu
^ permalink raw reply [flat|nested] 12+ messages in threadend of thread, other threads:[~2009-02-05 15:07 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox