From: Heiko Stuebner <heiko@sntech.de>
To: lee@kernel.org
Cc: linux-kernel@vger.kernel.org, heiko@sntech.de
Subject: [PATCH 0/4] Improve error handling for qnap-mcu transfers
Date: Tue, 23 Sep 2025 18:08:49 +0200 [thread overview]
Message-ID: <20250923160853.1925674-1-heiko@sntech.de> (raw)
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.
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 | 55 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 51 insertions(+), 4 deletions(-)
--
2.47.2
next reply other threads:[~2025-09-23 16:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 16:08 Heiko Stuebner [this message]
2025-09-23 16:08 ` [PATCH 1/4] mfd: qnap-mcu: Calculate the checksum on the actual number of bytes received Heiko Stuebner
2025-09-23 16:08 ` [PATCH 2/4] mfd: qnap-mcu: Use EPROTO in stead of EIO on checksum errors Heiko Stuebner
2025-09-23 16:08 ` [PATCH 3/4] mfd: qnap-mcu: Move checksum verification to its own function Heiko Stuebner
2025-09-23 16:08 ` [PATCH 4/4] mfd: qnap-mcu: Add proper error handling for command errors Heiko Stuebner
2025-10-08 15:54 ` Lee Jones
2025-10-08 15:57 ` [PATCH 0/4] Improve error handling for qnap-mcu transfers Lee Jones
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=20250923160853.1925674-1-heiko@sntech.de \
--to=heiko@sntech.de \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®