From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Len Brown <len.brown@intel.com>
Cc: Adrian Bunk <bunk@fs.tum.de>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: 2.6.8-rc4-mm1 doesn't boot
Date: Thu, 12 Aug 2004 15:50:15 -0600 [thread overview]
Message-ID: <200408121550.15892.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <1092259920.5021.117.camel@dhcppc4>
On Wednesday 11 August 2004 3:32 pm, Len Brown wrote:
> I've never understood this floppy IRQ6 business.
> Apparently it requests IRQ6, but doesn't show up in /proc/interrupts
floppy_init() requests IRQ6, but then frees it before returning. It
looks like the driver only holds onto it while the device is actually
open, which explains why it doesn't usually show up in /proc/interrupts.
Len later wrote:
> I assert it is a BIOS bug for the BIOS to set LNKD to
> IRQ6 if there is a floppy present and enabled; but fair
> game if there is no floppy. Though perhaps floppy.c
> doesn't understand that.
Adrian has the floppies disabled in the BIOS, so maybe it's
legit to use IRQ6 for the NIC PCI interrupt. But floppy.c
doesn't check for anything like that as far as I can see.
The fact that floppy.c seems to be able to poke the controller
and get an interrupt back (with "pci=routeirq") suggests to me
that the floppy controller responds even when disabled in the
BIOS, and that it actually expects IRQ6 to be level-triggered,
but the BIOS is leaving it configured as edge-triggered.
I suspect that the patch below will "fix" it. I suppose we could
use a DMI-based quirk to poke this. But it still feels like a
better solution would be to change floppy.c to:
if (ACPI && (no floppy in ACPI namespace))
return -ENODEV
<poke around as we do today>
--- 2.6.8-rc4-mm1/arch/i386/kernel/dmi_scan.c.orig 2004-08-12 15:04:59.302833471 -0600
+++ 2.6.8-rc4-mm1/arch/i386/kernel/dmi_scan.c 2004-08-12 15:05:08.475684921 -0600
@@ -21,7 +21,7 @@
u16 handle;
};
-#undef DMI_DEBUG
+#define DMI_DEBUG 1
#ifdef DMI_DEBUG
#define dmi_printk(x) printk x
--- 2.6.8-rc4-mm1/arch/i386/pci/irq.c.orig 2004-08-10 16:23:45.801962683 -0600
+++ 2.6.8-rc4-mm1/arch/i386/pci/irq.c 2004-08-12 15:23:35.494226047 -0600
@@ -953,6 +953,17 @@
static int __init pcibios_irq_init(void)
{
+ unsigned int irq = 6;
+ unsigned char mask = 1 << (irq & 7);
+ unsigned int port = 0x4d0 + (irq >> 3);
+ unsigned char val = inb(port);
+
+ printk("%s: PIC edge/level control 0x%x\n", __FUNCTION__, val);
+ if (!(val & mask)) {
+ printk("%s: changing IRQ6 to level (0x%x)\n", __FUNCTION__, val | mask);
+ outb(val | mask, port);
+ }
+
DBG("PCI: IRQ init\n");
if (pcibios_enable_irq || raw_pci_ops == NULL)
--- 2.6.8-rc4-mm1/drivers/block/floppy.c.orig 2004-08-12 11:20:49.326435733 -0600
+++ 2.6.8-rc4-mm1/drivers/block/floppy.c 2004-08-12 15:28:07.282308655 -0600
@@ -1743,6 +1743,7 @@
int do_print;
unsigned long f;
+ printk("%s\n", __FUNCTION__);
lasthandler = handler;
interruptjiffies = jiffies;
next prev parent reply other threads:[~2004-08-12 21:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <566B962EB122634D86E6EE29E83DD808182C2B33@hdsmsx403.hd.intel.com>
2004-08-11 21:32 ` Len Brown
2004-08-11 21:37 ` Bjorn Helgaas
2004-08-11 21:51 ` Adrian Bunk
2004-08-11 22:22 ` Len Brown
2004-08-11 23:15 ` Adrian Bunk
2004-08-12 21:50 ` Bjorn Helgaas [this message]
2004-08-12 22:43 ` Len Brown
2004-08-13 0:23 ` Adrian Bunk
2004-08-13 21:15 ` Bjorn Helgaas
2004-08-13 23:55 ` Adrian Bunk
2004-08-14 2:22 ` Len Brown
2004-08-17 23:11 ` Adrian Bunk
2004-08-17 23:48 ` Len Brown
2004-08-10 7:21 2.6.8-rc4-mm1 Andrew Morton
2004-08-10 15:09 ` 2.6.8-rc4-mm1 doesn't boot Adrian Bunk
2004-08-10 15:59 ` Bjorn Helgaas
2004-08-10 17:32 ` Adrian Bunk
2004-08-10 22:46 ` Bjorn Helgaas
2004-08-10 23:56 ` Adrian Bunk
2004-08-11 20:33 ` Bjorn Helgaas
2004-08-11 23:23 ` Adrian Bunk
2004-08-11 9:56 ` Alan Cox
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=200408121550.15892.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=akpm@osdl.org \
--cc=bunk@fs.tum.de \
--cc=len.brown@intel.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
all inboxes | Powered by JetHome®