Re: [PATCH net] net: pse-pd: pd692x0: Return fw_upload_err codes from firmware upload ops

From: Kory Maincent

Date: Fri Dec 04 2026 - 15:12:04 EST




On 11/20/26 18:35, Ian Rogers wrote:
On Thu, Nov 19, 2026 at 9:26 AM Kory Maincent <kory.maincent@xxxxxxxxxxx> 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