Bug in cardbus initialization, or am I missing something?

David Hinds (dhinds@sonic.net)
Sat, 3 Mar 2001 09:58:19 -0800


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);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/