Re: [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources()

Rene Herman
2008-09-30T15:53:35Z

On 30-09-08 16:48, Linus Torvalds wrote:

> I think you got the logic the wrong way around:
>
> + /* have we been registered already? */
> + if (pci_res->parent)
> + continue;
>
> This ignores resources that are _registered_, but it should be the other
> way around - we should ignore resources that aren't (because they may be
> invalid or they may move around)

Arr. Yes, ofcourse. Okay... that ain't working:

> Of course, it may be that the PnP code runs too early, and we have
> only parsed the PCI resources, not inserted them into the resource
> tree yet. If so, none of this will work, of course.

It doesn't. With the test negated it triggers for all PCI resources (and
ofcourse my soundcard driver fails again).

If the simple res->start == 0/SOME_ARCH_DEFINE definitely won't do and
the issue with Bjorn's approach is the bus hammering the solution might
be to set a per resource flag in pci_dev at parse time?

(that's PCI though and I can't really be here at the moment so over to
someone else).

Rene.