On Sun, Jan 05, 2020 at 07:34:01AM -0500, Michael S. Tsirkin wrote:
On Thu, Dec 19, 2019 at 02:47:59PM +0800, Heyi Guo wrote:
According to ACPI spec, _ADR should be used for device which is on a
bus that has a standard enumeration algorithm. It does not make sense
to have a _ADR object for devices which already have _HID and will be
enumerated by OSPM.
Signed-off-by: Heyi Guo <address@hidden>
Are you sure? I would think this depends on the ID and the device
really. E.g. PCI devices all are expected to have _ADR and some of them
have a _HID.
To clarify I am not commenting on patches.
The spec says this:
6.1.5 _HID (Hardware ID)
This object is used to supply OSPM with the device’s PNP ID or ACPI ID.
When describing a platform, use of any _HID objects is optional.
However, a _HID object must be
used to describe any device that will be enumerated by OSPM. OSPM only
enumerates a device
when no bus enumerator can detect the device ID. For example, devices
on an ISA bus are
enumerated by OSPM. Use the _ADR object to describe devices enumerated
by bus enumerators
other than OSPM.
Note: "detect the device ID" not "enumerate the device" which I think
means there's a driver matching this vendor/device ID.
So it seems fine to have _ADR so device is enumerated, and still have
_HID e.g. so ACPI driver can be loaded as fallback if there's
no bus driver.
Note I am not saying the patch itself is not correct.
Maybe these devices are not on any standard bus and that
is why they should not have _ADR? I have not looked.
I am just saying that spec does not seem to imply _HID and _ADR