lkml.org 
[lkml]   [2023]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC] hwmon: (hp-wmi-sensors) Fix failure to load on EliteDesk 800 G6
From
On 11/3/23 11:19, James Seo wrote:
> The EliteDesk 800 G6 stores a raw WMI string within the ACPI object in its
> BIOS corresponding to one instance of HPBIOS_PlatformEvents.Name. This is
> evidently a valid way of representing a WMI data item as far as the Microsoft
> ACPI-WMI mapper is concerned, but is preventing the driver from loading.
>
> As this seems quite rare, add a machine-limited workaround for now.
>
> Reported-by: Lukasz Stelmach <l.stelmach@samsung.com>
> Closes: https://lore.kernel.org/linux-hwmon/7850a0bd-60e7-88f8-1d6c-0bb0e3234fdc@roeck-us.net/
> Signed-off-by: James Seo <james@equiv.tech>
> ---
[ ... ]

> +static bool is_raw_wmi_string(const acpi_object_type property_map[], int prop)
> +{
> + const char *board_name;
> +
> + if (property_map != hp_wmi_platform_events_property_map ||
> + prop != HP_WMI_PLATFORM_EVENTS_PROPERTY_NAME)
> + return false;
> +
> + board_name = dmi_get_system_info(DMI_BOARD_NAME);
> + if (!board_name)
> + return false;
> +
> + return !strcmp(board_name, HP_WMI_BOARD_NAME_ELITEDESK_800_G6);

Would it be possible to use a dmi table and dmi_check_system() ?
That would make it easier to add more platforms later on if needed.

Thanks,
Guenter

\
 
 \ /
  Last update: 2023-11-20 13:48    [W:9.607 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site