From: Kory Maincent <kory.maincent@bootlin.com>
To: Ian Rogers <irogers@google.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Elkin Cruz <elkin@google.com>
Subject: Re: [PATCH net] net: pse-pd: pd692x0: Return fw_upload_err codes from firmware upload ops
Date: Fri, 4 Dec 2026 21:11:42 +0100 [thread overview]
Message-ID: <a002abc9-1c63-420d-ac61-9a3ee05b8f3e@bootlin.com> (raw)
In-Reply-To: <CAP-5=fUPWc5GH6BQsN-+Di=LVb=dYcUu5Mo04Rp2ugsMzjYFEg@mail.gmail.com>
On 11/20/26 18:35, Ian Rogers wrote:
> On Thu, Nov 19, 2026 at 9:26 AM Kory Maincent <kory.maincent@bootlin.com> wrote:
>>
>>
>>
>> On 11/19/26 18:10, Ian Rogers wrote:
>>> pd692x0_fw_reset() and pd692x0_fw_write() return negative errno values
>>> from i2c_master_send() directly as enum fw_upload_err instead of
>>> FW_UPLOAD_ERR_RW_ERROR, and pd692x0_fw_recv_resp() ignores negative
>>> errors from its trailing i2c_master_recv(). When a negative errno is
>>> propagated to the firmware upload core, fw_upload_error() rejects it
>>> as >= FW_UPLOAD_ERR_MAX, logs an invalid error code message, and
>>> reports "unknown-error" instead of "read-write-error" via sysfs.
...
>
> Sorry for the noisy diff and dense commit message - you are right that
> pd692x0_fw_recv_resp() (where fw_msg_buf is zero-initialized) and
> pd692x0_fw_write_line() didn't need touching, and all that type churn
> buried the actual change.
>
> The only two lines that return a negative errno (-EIO) as an enum
> fw_upload_err instead of FW_UPLOAD_ERR_RW_ERROR are:
> 1. pd692x0_fw_reset(): 'return ret;' when sending "RST" fails
> 2. pd692x0_fw_write(): 'return ret;' when sending 'P' fails (whereas
> sending 'E' right above it already returns FW_UPLOAD_ERR_RW_ERROR)
>
> Would you welcome a minimal 2-line patch for net-next (without Fixes:)
> just changing those two returns to FW_UPLOAD_ERR_RW_ERROR, or would
> you prefer leaving it as-is?
Yes I would accept it. Thanks.
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-12-04 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 17:10 [PATCH net] net: pse-pd: pd692x0: Return fw_upload_err codes from firmware upload ops Ian Rogers
2026-11-19 17:26 ` Kory Maincent
2026-11-20 17:35 ` Ian Rogers
2026-12-04 20:11 ` Kory Maincent [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=a002abc9-1c63-420d-ac61-9a3ee05b8f3e@bootlin.com \
--to=kory.maincent@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=elkin@google.com \
--cc=irogers@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.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