All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: Guenter Roeck <linux@roeck-us.net>, GG <ggirouard@bungeetaco.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] hwmon: (spd5118) resume fails -ENXIO on write protected hubs
Date: Tue, 18 Aug 2026 05:50:50 +0200	[thread overview]
Message-ID: <d6d4148c-dfd2-499e-a068-85dfa68c2db2@gmx.de> (raw)
In-Reply-To: <e1d6f669-b48b-4009-980f-a9defe273569@roeck-us.net>

Am 18.08.26 um 02:11 schrieb Guenter Roeck:

> On 8/17/26 16:02, Armin Wolf wrote:
>> Am 17.08.26 um 19:03 schrieb GG:
>>
>>> Understood - thanks for explaining the page selection part, that 
>>> makes sense. I'll blacklist it for now.
>>>
>>> Appreciate you taking the time to get back to me on this!
>>>
>>> Gabriel G
>>>
>>> On Monday, August 17th, 2026 at 12:58 PM, Guenter Roeck 
>>> <linux@roeck-us.net> wrote:
>>>
>>>> On 8/17/26 09:42, GG wrote:
>>>>> Sorry - I should have searched the archives before sending my last 
>>>>> email. I've since
>>>>> found this from February, which is the same problem:
>>>>>
>>>>> https://lore.kernel.org/linux-hwmon/20260205102942.28745-1-tinsaetadesse2015@gmail.com/
>>>>>
>>>>> And I missed the obvious clue sitting in my own boot log:
>>>>>
>>>>>     i801_smbus 0000:00:1f.4: SPD Write Disable is set
>>>>>
>>>>> So my kernel already knew. Apologies for the noise.
>>>>>
>>>> Unfortunately that knowledge is not passed on to the spd5118 driver.
>>
>> Yes, sadly the patch series adding support for this was abandoned :/
>>
>
> If I recall correctly, the important part (a I2C_AQ_SPD_WRITE_DISABLED 
> flag
> or similar provided by the I2C controller) was rejected. 

What? I seemed to have missed that important info. How frustrating.

>>>>> One thing I'll mention in case it's useful: that series above has 
>>>>> spd5118 refuse to
>>>>> probe when writes are disabled. On my machine that would lose me 
>>>>> two working
>>>>> temperature sensors. Reads are completely fine here, I get correct 
>>>>> temps,
>>>>> and my temperature limits read back properly. It's only writing 
>>>>> that fails.
>>>>>
>>>>> Happy to test anything on my hardware if it would help.
>>>>>
>>>> That can not be done, as I mentioned in my other e-mail.
>>>>
>>>> Problem is that accessing temperature sensor data on spd5118 
>>>> compatible chips
>>>> requires a write to select the correct chip page. If writes are 
>>>> disabled, and
>>>> the BIOS selected a page other than page 0, temperature sensor data 
>>>> is not
>>>> accessible. Since the BIOS can do whatever it wants and may have 
>>>> selected a
>>>> different page after a suspend/resume sequence, one simply can not 
>>>> trust
>>>> the status when the driver is loaded initially.
>>>>
>>>> Guenter
>>
>> Would it be enough if we always select page 0 inside 
>> spd5118_i2c_init(), thereby
>> preventing the driver from probing on hardware that does not allow us 
>> to write
>> the page select register?
>>
>
> Looking into the code, it seems like the device may have been 
> instantiated
> through the detect path. That makes me wonder which distribution enables
> CONFIG_SENSORS_SPD5118_DETECT because it should _not_ be enabled by 
> default.
>
> Anyway, I guess I'll have to implement a dummy write operation in
> spd5118_i2c_init() to check if writes are possible and bail out on error.
> That is less than perfect but the best we can do without a flag from the
> I2C controller.
>
> I'll look into that after the commit window closes.
>
> Thanks,
> Guenter

I already have prepared two patches for that, i will test them on my machine as soon as possible.

Thanks,
Armin Wolf


  reply	other threads:[~2026-08-18  3:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 16:29 [BUG] hwmon: (spd5118) resume fails -ENXIO on write protected hubs GG
2026-08-17 16:42 ` GG
2026-08-17 16:58   ` Guenter Roeck
2026-08-17 17:03     ` GG
2026-08-17 23:02       ` Armin Wolf
2026-08-18  0:11         ` Guenter Roeck
2026-08-18  3:50           ` Armin Wolf [this message]
2026-08-18  5:00             ` Armin Wolf
2026-08-18  5:44               ` Guenter Roeck
2026-08-17 16:53 ` Guenter Roeck

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=d6d4148c-dfd2-499e-a068-85dfa68c2db2@gmx.de \
    --to=w_armin@gmx.de \
    --cc=ggirouard@bungeetaco.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@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.