public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Improve error handling for qnap-mcu transfers
@ 2025-11-05 23:47 Heiko Stuebner
  2025-11-05 23:47 ` [PATCH v2 1/4] mfd: qnap-mcu: Calculate the checksum on the actual number of bytes received Heiko Stuebner
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Heiko Stuebner @ 2025-11-05 23:47 UTC (permalink / raw)
  To: lee; +Cc: linux-kernel, heiko

Digging deeper into how that MCU behaves, I found out it can return
more status codes than the "@0" for "ok".

The additional codes can report a failed checksum verification and
some "general" error for the command execution.

This also explains sporadic command timeout messages, I have seen
over time, when the controller sends an error code while we expect
a longer reply from it.

So while I'm not sure yet why it reports an error, with these changes
we at least handle the error return code in a meaningful way.

changes in v2:
- rebase on top of 6.18-rc1
- include improvement suggestions from Lee


Heiko Stuebner (4):
  mfd: qnap-mcu: Calculate the checksum on the actual number of bytes
    received
  mfd: qnap-mcu: Use EPROTO in stead of EIO on checksum errors
  mfd: qnap-mcu: Move checksum verification to its own function
  mfd: qnap-mcu: Add proper error handling for command errors

 drivers/mfd/qnap-mcu.c | 78 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 73 insertions(+), 5 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-20 10:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 23:47 [PATCH v2 0/4] Improve error handling for qnap-mcu transfers Heiko Stuebner
2025-11-05 23:47 ` [PATCH v2 1/4] mfd: qnap-mcu: Calculate the checksum on the actual number of bytes received Heiko Stuebner
2025-11-05 23:47 ` [PATCH v2 2/4] mfd: qnap-mcu: Use EPROTO in stead of EIO on checksum errors Heiko Stuebner
2025-11-05 23:47 ` [PATCH v2 3/4] mfd: qnap-mcu: Move checksum verification to its own function Heiko Stuebner
2025-11-05 23:47 ` [PATCH v2 4/4] mfd: qnap-mcu: Add proper error handling for command errors Heiko Stuebner
2025-11-13 16:03   ` Lee Jones
2025-11-20 10:15 ` [PATCH v2 0/4] Improve error handling for qnap-mcu transfers Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox