* Bug in cardbus initialization, or am I missing something?
@ 2001-03-03 17:58 David Hinds
2001-03-03 18:49 ` Linus Torvalds
0 siblings, 1 reply; 2+ messages in thread
From: David Hinds @ 2001-03-03 17:58 UTC (permalink / raw)
To: Linus Torvalds, Alan Cox; +Cc: linux-kernel
In drivers/pcmcia/cardbus.c in cb_alloc(), PCI_INTERRUPT_LINE and
dev->irq are not filled in until after calling pci_enable_device().
The result is a cryptic message like:
> PCI: No IRQ known for interrupt pin A of device 01:00.0. Please try using pci=biosirq.
Unless there is a less obvious reason for the ordering, I suggest the
following one-liner.
-- Dave Hinds
--- cardbus.c.orig Fri Mar 2 09:49:46 2001
+++ cardbus.c Fri Mar 2 09:50:28 2001
@@ -288,7 +288,6 @@
if (res->flags)
pci_assign_resource(dev, r);
}
- pci_enable_device(dev); /* XXX check return */
/* Does this function have an interrupt at all? */
pci_readb(dev, PCI_INTERRUPT_PIN, &irq_pin);
@@ -297,6 +296,7 @@
pci_writeb(dev, PCI_INTERRUPT_LINE, irq);
}
+ pci_enable_device(dev); /* XXX check return */
pci_insert_device(dev, bus);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug in cardbus initialization, or am I missing something?
2001-03-03 17:58 Bug in cardbus initialization, or am I missing something? David Hinds
@ 2001-03-03 18:49 ` Linus Torvalds
0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2001-03-03 18:49 UTC (permalink / raw)
To: David Hinds; +Cc: Alan Cox, linux-kernel
On Sat, 3 Mar 2001, David Hinds wrote:
>
> In drivers/pcmcia/cardbus.c in cb_alloc(), PCI_INTERRUPT_LINE and
> dev->irq are not filled in until after calling pci_enable_device().
> The result is a cryptic message like:
>
> > PCI: No IRQ known for interrupt pin A of device 01:00.0. Please try using pci=biosirq.
>
> Unless there is a less obvious reason for the ordering, I suggest the
> following one-liner.
Agreed.
In fact, we shouldn't need to enable the device at all: the drivers are
supposed to do the pci_enable_device() themselves. But let's do the
minimal "move it down a few lines" thing for now.
Thanks,
Linus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-03-03 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-03 17:58 Bug in cardbus initialization, or am I missing something? David Hinds
2001-03-03 18:49 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).