From: sashiko-bot@kernel.org
To: "Aleksei Sviridkin" <f@lex.la>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [RFC PATCH net-next v2 7/7] net: mdio: en8811h: add the nested bus
Date: Wed, 09 Sep 2026 15:57:28 +0000 [thread overview]
Message-ID: <20260909155729.2524B1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908155707.4164559-8-f@lex.la>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Using queue_delayed_work with 0 delay fails to execute an already-pending work immediately on resume.
--
commit e2ee026254e8a2afcaea891df04e388738201fc8
Author: Aleksei Sviridkin <f@lex.la>
net: mdio: en8811h: add the nested bus
This commit registers the PHY on a child bus so that the device tree can
describe it normally and the MCU can keep ownership of the reset line. It
introduces a two-phase download mechanism to allow retrying firmware loads.
> diff --git a/drivers/net/mdio/mdio-airoha-en8811h.c b/drivers/net/mdio/mdio-airoha-en8811h.c
> index d94d74d85f10d..7224558914727 100644
> --- a/drivers/net/mdio/mdio-airoha-en8811h.c
> +++ b/drivers/net/mdio/mdio-airoha-en8811h.c
[ ... ]
> @@ -150,23 +309,43 @@ static void en8811h_mcu_remove(struct mdio_device *mdiodev)
[ ... ]
> static int en8811h_mcu_resume(struct device *dev)
> {
> struct en8811h_mcu *mcu = dev_get_drvdata(dev);
[ ... ]
> + if (ret < 0) {
> + /* The reload restores this chip, not the PHY below it: its
> + * own resume has already failed by then and nothing calls
> + * phy_init_hw() twice.
> + */
> + dev_err(dev, "firmware not restored, reloading: %pe\n",
> + ERR_PTR(ret));
> + mcu->fw_running = false;
> + mcu->poll_ms = EN8811H_FW_POLL_MIN_MS;
> + mcu->waited_ms = 0;
> + mcu->warned = false;
> + queue_delayed_work(system_freezable_wq, &mcu->fw_poll, 0);
[Severity: Medium]
Since queue_delayed_work() won't change the timeout of an already pending work,
does this leave the work scheduled with its previous timeout (which can be up to
30 seconds due to the exponential backoff) instead of executing immediately?
If the firmware load fails on resume while fw_poll was already pending (e.g.,
bus registration is deferring and in its backoff cycle), the retry poll might
be delayed significantly instead of executing immediately.
Should this use mod_delayed_work() instead to force the immediate execution of
a pending timer?
> + }
>
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908155707.4164559-1-f@lex.la?part=7
next prev parent reply other threads:[~2026-09-09 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 15:57 [RFC PATCH net-next v2 0/7] net: mdio: an MDIO device driver for the Airoha EN8811H Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 1/7] dt-bindings: net: add Airoha EN8811H PHY MCU Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 2/7] net: phy: add mdiodev_lock(), mdiodev_lock_nested() and mdiodev_unlock() Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 3/7] net: phy: air: type the buckpbus core on the mdio device Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 4/7] net: phy: air: move the EN8811H firmware download into the library Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 5/7] net: phy: air: skip the download when the MD32 is already running Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 6/7] net: mdio: add Airoha EN8811H MDIO device driver Aleksei Sviridkin
2026-09-08 15:57 ` [RFC PATCH net-next v2 7/7] net: mdio: en8811h: add the nested bus Aleksei Sviridkin
2026-09-09 15:57 ` sashiko-bot [this message]
2026-09-09 19:01 ` [RFC PATCH net-next v2 0/7] net: mdio: an MDIO device driver for the Airoha EN8811H Andrew Lunn
2026-09-10 15:38 ` Aleksei Sviridkin
2026-09-10 20:49 ` Aleksei Sviridkin
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=20260909155729.2524B1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=f@lex.la \
--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