Re: [PATCH] minor ne2k-pci irq fix

©[@ÄØÿ¿8þÿ¿Russell King - ARM Linux (davej@suse.de)
Wed, 31 Jan 2001 12:11:25 +0000 (GMT)


On Wed, 31 Jan 2001, Martin Diehl wrote:

> Reason: we fetched the irq too early, before calling pci_enable_device(),
> so it was bogus after initial routing.
> Patch below (prepared for 2.4.0 - should be fine for 2.4.1 too).

I think it would be better to move the pci_enable_device(pdev);
above all this, as we should enable the device before reading the
pdev->resource[] too iirc.

Something like this maybe ?

i = pci_enable_device (pdev);
if (i)
return i;

ioaddr = pci_resource_start (pdev, 0);

if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) {
printk (KERN_ERR "ne2k-pci: no I/O resource at PCI BAR #0\n");

irq = pdev->irq;

Comments?

regards,

Davej.

-- 
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs

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