mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: TINSAE TADESSE <tinsaetadesse2015@gmail.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] hwmon: spd5118: Do not fail resume on temporary I2C errors
Date: Thu, 15 Jan 2026 22:24:41 -0800	[thread overview]
Message-ID: <39b48803-e236-4acc-84e9-18162770f9ae@roeck-us.net> (raw)
In-Reply-To: <CAJ12PfMC_Potx9aNxaJJ3y=sX=rzyhm-6LJ8Z8OjUyDxiDUNsA@mail.gmail.com>

On 1/15/26 05:50, TINSAE TADESSE wrote:
> On Wed, Jan 14, 2026 at 5:23 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On 1/14/26 05:07, TINSAE TADESSE wrote:
>> ...
>>>>> Hi Guenter,
>>>>>
>>>>> I tested changing the i801 SMBus controller to use
>>>>> SET_LATE_SYSTEM_SLEEP_PM_OPS() instead of
>>>>> DEFINE_SIMPLE_DEV_PM_OPS() as a diagnostic experiment. With this
>>>>> change, spd5118 resume failures (-ENXIO)
>>>>> still persist, suggesting PM ordering alone is insufficient and other
>>>>> firmware interactions are involved.
>>>>
>>>> How about the problem in the suspend function ? Is that also still seen ?
>>>>
>>>> Also, the subject talks about -EIO. Is that still seen ?
>>>>
>>>> Either case, can you enable debug logs for the i801 driver ?
>>>> It should generate log entries when it reports errors.
>>>>
>>>> Thanks,
>>>> Guenter
>>>>
>>>
>>> Hi Guenter,
>>>
>>> Thank you for the questions. To clarify:
>>>
>> Please do not drop mailing lists from replies.
>>
>>> 1) I have not observed any failures in the suspend path. The suspend
>>> callback completes successfully, and
>>> I have not seen I2C errors or warnings during suspend at any point.
>>
>> Sorry, I seem to be missing something.
>>
>> In that case, what is the point of patch 3/3 of your series which
>> removes hardware accesses from the suspend function ?
>>
>>> 2) I have also not observed -EIO in my testing. The error consistently
>>> reported on resume and subsequent hwmon access is -ENXIO.
>>> Earlier references to -EIO were based on assumptions rather than
>>> observed logs, and I should have been clearer about that.
>>>
>>
>> Thanks for the clarification.
>>
>> Guenter
>>
>>> I am enabling debug logging for the i801 driver to collect more
>>> concrete evidence of controller state during resume.
>>
> 
> Hi Guenter,
> 
>> Sorry, I seem to be missing something.
>>
>> In that case, what is the point of patch 3/3 of your series which
>> removes hardware accesses from the suspend function ?
> 
> You are right to question this, and I agree that it needs clarification.
> 
> Patch 3/3 was originally proposed under the assumption that the resume failures
> were caused by spd5118 performing I2C transactions while the
> controller was not yet available,
> and that removing hardware accesses from the suspend path might
> mitigate the issue.
> At that point, I assumed the problem was limited to the resume callback.
> 
> After enabling detailed i801 debug logging and testing with
> SET_LATE_SYSTEM_SLEEP_PM_OPS() in the i801 driver,
> it became clear that this assumption was incorrect. The controller
> itself reports "i801_smbus: No response"
> both during suspend and immediately after resume, and spd5118 merely
> propagates the resulting -ENXIO.

Outch, that really hurts, because it means that something is seriously
broken in both the suspend and resume path. The device _must_ be accessible
in the suspend path. Otherwise there is no guarantee that the device is
accessible for normal (pre-suspend) operation. After all, someone could
run a script reading sysfs attributes in a tight loop continuously,
or the thermal subsystem could try to access the chip. That would suddenly
start to fail if something in the device access path starts to be suspended
while the underlying hardware is still believed to be operational.

I could imagine some hack/quirk for the resume path, such as delaying resume
for some period of time for affected hardware, but I have no idea what to
do on the suspend side. We can not just drop device writes during suspend
because some broken hardware/firmware does not let us actually access
(and thus suspend) the hardware anymore by the time the suspend function
is called.

Guenter

> This indicates that the issue is not caused by spd5118 suspend/resume
> behavior, but by the unavailability of the
> SMBus controller due to platform or firmware interactions during
> s2idle transitions.
> 
> Given this, I agree that patch 3/3 does not address the root cause and
> does not provide a justified improvement.
> I am therefore fine with dropping it.
> 
> Thank you for pointing this out.
> 


  reply	other threads:[~2026-01-16  6:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-10 17:19 Tinsae Tadesse
2026-01-10 17:19 ` [PATCH 2/3] hwmon: spd5118: Retry temperature reads after " Tinsae Tadesse
2026-01-12 16:35   ` Guenter Roeck
2026-01-10 17:19 ` [PATCH 3/3] hwmon: spd5118: Avoid hardware access during suspend and resume Tinsae Tadesse
2026-01-12 14:42   ` Guenter Roeck
2026-01-10 22:27 ` [PATCH 1/3] hwmon: spd5118: Do not fail resume on temporary I2C errors Armin Wolf
2026-01-12 11:48   ` TINSAE TADESSE
2026-01-12 17:41     ` Armin Wolf
2026-01-12 18:07       ` Guenter Roeck
2026-01-12 14:37   ` TINSAE TADESSE
2026-01-12 16:36   ` Guenter Roeck
2026-01-12 17:46     ` Armin Wolf
2026-01-12 18:17       ` Guenter Roeck
2026-01-12 18:22         ` Armin Wolf
2026-01-12 19:11           ` Guenter Roeck
2026-01-13 19:33             ` TINSAE TADESSE
2026-01-13 19:16           ` TINSAE TADESSE
2026-01-13 23:58             ` Armin Wolf
2026-01-12 16:30 ` Guenter Roeck
2026-01-13 19:15   ` TINSAE TADESSE
2026-01-13 23:46     ` Guenter Roeck
     [not found]       ` <CAJ12PfP+Dbxd5fFAx-zAaJQ0B53Z1nXAiPbkmivk6smKajf1=Q@mail.gmail.com>
2026-01-14 14:23         ` Guenter Roeck
2026-01-15 13:50           ` TINSAE TADESSE
2026-01-16  6:24             ` Guenter Roeck [this message]
2026-01-24 14:45               ` TINSAE TADESSE
2026-01-24 19:11                 ` Armin Wolf
2026-01-25 22:36                   ` Guenter Roeck
2026-01-26  9:40                     ` Armin Wolf
2026-01-26 15:20                       ` Guenter Roeck
2026-01-27 10:35                     ` TINSAE TADESSE
2026-01-27 14:33                       ` Guenter Roeck
2026-01-27 19:23                         ` TINSAE TADESSE
2026-01-27 23:41                           ` Guenter Roeck
2026-01-31  0:55                             ` Kurt Borja
2026-01-31  1:21                               ` Guenter Roeck
2026-01-31  1:54                                 ` Kurt Borja
2026-01-31  2:06                                   ` Guenter Roeck
2026-01-31  9:22                                     ` Armin Wolf
2026-01-31 11:26                             ` TINSAE TADESSE
2026-01-31 19:50                       ` TINSAE TADESSE
2026-02-01  1:25                         ` Guenter Roeck
2026-02-01  7:30                           ` TINSAE TADESSE
2026-02-01 15:21                             ` Guenter Roeck
2026-02-02  7:03                               ` TINSAE TADESSE
2026-01-27 10:30                   ` TINSAE TADESSE

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=39b48803-e236-4acc-84e9-18162770f9ae@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tinsaetadesse2015@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®