Re: [PATCH] ACPI / scan: Allow ACPI drivers to bind to PNP device objects

From: Zhang Rui
Date: Thu Aug 21 2014 - 08:09:07 EST


Hi, Rafael,

On Thu, 2014-08-21 at 06:04 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> We generally don't allow ACPI drivers to bind to ACPI device objects
> that companion "physical" device objects are created for to avoid
> situations in which two different drivers may attempt to handle one
> device at the same time.

Yes, and I think we should not break this rule.

> Recent ACPI device enumeration rework
> extended that approach to ACPI PNP devices by starting to use a scan
> handler for enumerating them. However, we previously allowed ACPI
> drivers to bind to ACPI device objects with existing PNP device
> companions and changing that led to functional regressions on some
> systems.
>
Question: except the PNP0C01/PNP0C02 case, if we have an device have two
ids that matches two different drivers, should we allow both drivers
probe successfully?
I think the answer is no.
In the PNP0C01/PNP0C02 case, I think we can fix the issue by the
following patch instead.

Note that I've just tested on my machine and it works well.
I still need the bug reporter to check if the patch fixes bug 81511 or not.