From: "Sebastián Peyrott" <speyrott@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 1/1] hwmon: Add Minisforum UM780 XTX EC monitoring and fan control
Date: Wed, 19 Aug 2026 13:47:07 -0300 [thread overview]
Message-ID: <20260819164707.434235-1-speyrott@gmail.com> (raw)
In-Reply-To: <5af9d252-df45-4d3f-ae14-648a546ff508@roeck-us.net>
Thanks for the review.
> Are you sure this is what you want ? It will end up in a tight loop
> if the problem is persistent.
The in-driver retry loop is bounded, but I agree that returning -EAGAIN after
the retries are exhausted can encourage immediate retries by the caller. I
will return -EIO for a persistently incoherent or out-of-range RPM value.
> This is an inappropriate return value. Either define mode = 4 or similar
> for "other" or "unknown" or return -ENODATA.
Agreed. An unknown register value does not necessarily identify another valid
firmware mode, so I will return -ENODATA.
> This will require explanation. The values are stored in probe,
> stored here again, stored in suspend, and (only) restored in resume.
>
> Why store here and in probe if they are updated during suspend anyway ?
> Alternatively, why update in suspend if they are already updated from
> the probe function and here ?
The intention was to retain the last coherent configuration for restoration,
not to maintain a general hardware cache, but reading it again at suspend made
that ownership unclear and is redundant.
I will seed the saved state once at probe, update it only after successful
hwmon writes, and remove the suspend callback. Resume will restore that saved
state. I will also rename the fields to make their purpose explicit. The live
reads in the system-threshold store path will remain only to validate and
clamp against the current peer threshold before an individual, non-atomic EC
write.
Removing the suspend callback also addresses the automated review observation
that a transient EC read failure there could abort system suspend.
I will give this some time for any further feedback before sending v3.
Thanks,
Sebastian
prev parent reply other threads:[~2026-08-19 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 18:13 [PATCH v2 0/1] hwmon: Add Minisforum UM780 XTX EC monitoring and fan control Sebastián Peyrott
2026-08-18 18:13 ` [PATCH v2 1/1] " Sebastián Peyrott
2026-08-18 18:23 ` sashiko-bot
2026-08-18 23:24 ` Guenter Roeck
2026-08-19 16:47 ` Sebastián Peyrott [this message]
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=20260819164707.434235-1-speyrott@gmail.com \
--to=speyrott@gmail.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.