Re: [PATCH] minor ne2k-pci irq fix

From: davej@suse.de
Date: Wed Jan 31 2001 - 07:11:25 EST


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/



This archive was generated by hypermail 2b29 : Wed Jan 31 2001 - 21:00:38 EST