lkml.org 
[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.6.8.1-mm2 (nvidia breakage)
Date
On Thursday 19 August 2004 3:51 pm, Terence Ripperda wrote:
> the original bug report was during module load time, when we're
> probing our devices via the pci_driver's probe callback. this is well
> before we hook up interrupts or do anything in our closed source code.
>
> I'm attaching a trimmed down version of our driver that pretty much
> only does this probe (complete source is included). I don't know if
> this will reproduce the original bug or not.

Thanks, this is enough to show the problem:

nv_kern_probe(struct pci_dev *dev, ...)
{
...
nv->interrupt_line = dev->irq;
...
if (pci_enable_device(dev) != 0)

The driver is looking at dev->irq before calling pci_enable_device().
But dev->irq is not necessarily initialized before pci_enable_device().

I'm not a PCI expert, but I'm not sure you should be looking at
all the other dev->resource[] stuff before pci_enable_device()
either. Most of the "modern" drivers in the tree seem to do
pci_enable_device() very early in the probe() function, i.e.,
see tg3.c.
-
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/

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