[PATCH 0/2] Parse multiple duplicate WMI GUIDs

Mario Limonciello
2017-12-09T02:34:53Z

I recently discovered that multiple instances of the WMI BMOF
GUID are present on some machines with more advanced WMI implementations.

Only the first found instance is parsed today with the rest ignored.

The rest of the instances should be readable by the wmi-bmof driver
(and userspace) to allow improving any parsing implementations.

Andy L. indicated he thought fixing this should require changing the
WMI driver to no longer track a block list of devices, but I don't
think that's necessary. The only significant change is that the WMI
bus will need to build the symlinks in /sys/bus/wmi/devices in a way
to prevent clashes with multiple devices sharing the same GUID.

The most obvious solution (and that which I implemented) is to include
the ACPI device associated with the GUID.

Since this is a symlink and the actual path remains stable I don't
know if that's considered changing a userspace interface. If so, then
an alternative would be to append a number when a second instance of
a GUID has been discovered and keep the "old" symlink path for the first
instance stable.

Mario Limonciello (2):
platform/x86: wmi: prefix sysfs files in /sys/bus/wmi with the ACPI
device
platform/x86: wmi: Allow creating WMI devices with the same GUID

drivers/platform/x86/wmi.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)

--
2.14.1