lkml.org 
[lkml]   [2001]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] minor ne2k-pci irq fix
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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.192 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site