All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Seo <james@equiv.tech>
To: Lukasz Stelmach <l.stelmach@samsung.com>
Cc: Guenter Roeck <linux@roeck-us.net>, Armin Wolf <W_Armin@gmx.de>,
	linux-hwmon@vger.kernel.org
Subject: Re: [BUG] hp-wmi-sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -22
Date: Sat, 28 Oct 2023 11:37:51 -0700	[thread overview]
Message-ID: <ZT1U/zE6cApQKC2h@equiv.tech> (raw)
In-Reply-To: <oypijdmsw4f6jm.fsf%l.stelmach@samsung.com>

On Fri, Oct 27, 2023 at 05:07:09PM +0200, Lukasz Stelmach wrote:
> Hi,

Hi Łukasz, thanks for the report.

> I've got HP EliteDesk 800 G6 Tower PC running Linux 6.1 from Debian 12.
> I managed to build the hp-wmi-sensors out of tree. When I loaded it I
> got EINVAL.
> 
>     hp-wmi-sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -22
> 
> I managed to track it down. And it happens in check_wobj() called from
> check_platform_events_wobj() because in the for loop when prop==0 the
> type is ACPI_TYPE_BUFFER instead of ACPI_TYPE_STRING. When I bypass this
> particular check like this
> 
>     if (prop == 0 && type == ACPI_TYPE_BUFFER)
>             continue;
> 
> everything else works like charm and I can read senosrs via sysfs.

I'm surprised that your bypass is working! That check is intended to make it
safe to assume HPBIOS_BIOSNumericSensor.Name is a ACPI_TYPE_STRING. Which the
driver continues to do, of course.

Maybe .Name is being erroneously reported as an ACPI_TYPE_BUFFER on just that
model, but is in reality still a string? Dealing with that string in e.g.
hp_wmi_strdup() would still work because .string.pointer and .buffer.pointer
seem to end up at the same offset in a union acpi_object, at least for now.

> I'd like to perpare a proper patch, but I've got no idea how to do properly
> work this quirk around. What are your suggestions?

Could you share output from acpidump and sensors before we go any further?

Thanks.

-James Seo

> Kind regards,
> -- 
> Łukasz Stelmach
> Samsung R&D Institute Poland
> Samsung Electronics



  parent reply	other threads:[~2023-10-28 18:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20231113115327eucas1p11f84e775ce78deaa01557f3868c2f9dd@eucas1p1.samsung.com>
2023-10-27 15:07 ` [BUG] hp-wmi-sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -22 Lukasz Stelmach
2023-10-27 17:07   ` Guenter Roeck
2023-10-27 18:50     ` Armin Wolf
2023-10-28 18:37   ` James Seo [this message]
2023-10-31 12:05     ` Lukasz Stelmach
2023-10-31 14:00       ` James Seo
2023-10-31 14:16         ` James Seo
2023-10-31 14:47         ` Guenter Roeck
2023-10-31 19:07         ` Lukasz Stelmach
2023-10-31 19:28           ` Guenter Roeck
2023-10-31 21:07             ` Lukasz Stelmach
2023-10-31 22:34               ` Armin Wolf
2023-11-01  4:34                 ` James Seo
2023-11-02  1:11                   ` Armin Wolf
2023-11-02  5:11                     ` James Seo
2023-11-01  5:52               ` James Seo
2023-11-02  8:15                 ` Lukasz Stelmach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZT1U/zE6cApQKC2h@equiv.tech \
    --to=james@equiv.tech \
    --cc=W_Armin@gmx.de \
    --cc=l.stelmach@samsung.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.