Re: a7839e96 (PNP: increase max resources) breaks my ALSA intel8x0 sound card

From: Bjorn Helgaas
Date: Thu Feb 14 2008 - 13:50:26 EST


On Tuesday 05 February 2008 01:12:46 pm Bjorn Helgaas wrote:
> On Tuesday 05 February 2008 11:15:12 am Linus Torvalds wrote:
> > No, you don't need any quirks: you just do an "insert_resource()" and
> > ignore the error return. If the (bogus) PnP resource clashes with the
> > (correct) hardware PCI resource, the insert will simply fail. No quirks
> > needed.

> I'll play with your insert_resource() idea and see if I can figure
> something out.

Sorry for the delay. I did work on this, but I don't see how this
can work. pcibios_init() marks its reservations as not busy, so the
subsequent PNP request doesn't fail, even if it clashes.

The PNP system driver is an fs_initcall(), so it already happens after
pcibios_init():

1) register ACPI PCI root bridge driver, which enumerates PCI
devices behind the bridge
2) pcibios_init() -> pcibios_resource_survey() -> request_resource()
3) register PNP system driver -> request_region()
4) register intel8x0 sound driver and reserve resources
(conflict happens here)

We have reservations in this order:

febf8000-febfbfff : 0000:00:1b.0 -- from pcibios_resource_survey (!busy)
febfa000-febfac00 : pnp 00:08 -- from PNP system driver (!busy)
febf8000-febfbfff : ICH HD audio -- fails because it spans the PNP region

The PNP reservation succeeds even though the PCI reservation has
already happened, so I don't see how we can do this without a
quirk that ignores the bogus PNP resources.

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