From: sashiko-bot@kernel.org
To: "Jonas Jelonek" <jelonek.jonas@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v4 2/2] net: pse-pd: add Realtek/Broadcom PSE MCU driver
Date: Wed, 01 Jul 2026 10:57:09 +0000 [thread overview]
Message-ID: <20260701105709.A59BE1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630105651.756058-3-jelonek.jonas@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Premature probe failure due to unhandled -EBADMSG during MCU discovery.
--
commit f15f1883adfcb0dd6df322e408ed55d0bfd48ac7
Author: Jonas Jelonek <jelonek.jonas@gmail.com>
Subject: net: pse-pd: add Realtek/Broadcom PSE MCU driver
This commit adds a driver for the microcontroller fronting Realtek and
Broadcom PSE chips over I2C or UART. It abstracts the underlying protocol
dialects behind shared core logic and transport modules.
> diff --git a/drivers/net/pse-pd/realtek-pse-mcu-core.c b/drivers/net/pse-pd/realtek-pse-mcu-core.c
> new file mode 100644
> index 0000000000000..11a0abece37bd
> --- /dev/null
> +++ b/drivers/net/pse-pd/realtek-pse-mcu-core.c
[ ... ]
> +static int rtpse_mcu_discover(struct rtpse_mcu_ctrl *pse, struct rtpse_mcu_info *info)
> +{
> + struct rtpse_mcu_ext_config ext_config;
> + unsigned long deadline;
> + int ret;
> +
> + /*
> + * The MCU may not answer on the bus yet right after power-up or
> + * enable-gpios assertion: depending on the transport it either stays
> + * silent (-ETIMEDOUT) or does not ACK its address at all (-ENXIO /
> + * -EREMOTEIO). Retry within a bounded wall-time window so a slow boot
> + * still probes, while a genuinely unresponsive MCU fails with its real
> + * error instead of deferring forever and masking it.
> + */
> + deadline = jiffies + msecs_to_jiffies(RTPSE_MCU_BOOT_TIMEOUT_MS);
> + do {
> + ret = rtpse_mcu_get_info(pse, info);
> + if (ret != -ETIMEDOUT && ret != -ENXIO && ret != -EREMOTEIO &&
> + ret != -EAGAIN)
> + break;
[Severity: Medium]
Will this prematurely abort the probe if the MCU emits transient garbage
during its boot sequence?
Looking at rtpse_mcu_do_xfer(), it returns -EBADMSG if there is a checksum
mismatch, or if the MCU responds with RTPSE_MCU_OPCODE_BAD_CSUM. If a partially
booted MCU produces invalid bytes on the bus during this startup window,
rtpse_mcu_discover() will immediately break out of the retry loop and fail
the probe since -EBADMSG is not in the allowed list of retry errors.
> + msleep(RTPSE_MCU_BOOT_RETRY_MS);
> + } while (time_before(jiffies, deadline));
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630105651.756058-1-jelonek.jonas@gmail.com?part=2
next prev parent reply other threads:[~2026-07-01 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 10:56 [PATCH net-next v4 0/2] net: pse-pd: add Realtek/Broadcom PSE MCU support Jonas Jelonek
2026-06-30 10:56 ` [PATCH net-next v4 1/2] dt-bindings: net: pse-pd: add bindings for Realtek/Broadcom PSE MCU Jonas Jelonek
2026-06-30 10:56 ` [PATCH net-next v4 2/2] net: pse-pd: add Realtek/Broadcom PSE MCU driver Jonas Jelonek
2026-07-01 10:57 ` sashiko-bot [this message]
2026-07-02 7:13 ` Oleksij Rempel
2026-07-02 11:22 ` Jonas Jelonek
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=20260701105709.A59BE1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jelonek.jonas@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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