From: netdev-bot+sashiko@kernel.org
To: daniel@makrotopia.org
Cc: jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
andrew@lunn.ch, olteanv@gmail.com, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev
Subject: Re: [PATCH net-next v16 6/6] net: dsa: mxl862xx: document devlink flash and info support
Date: Thu, 17 Sep 2026 16:11:31 +0000 [thread overview]
Message-ID: <178966149151.22033.652158876730245736@kernel.org> (raw)
In-Reply-To: =?utf-8?q?=3C593c60c6ebaa2526fd1e2d06cd8bd6910cd3ad92=2E1789477?= =?utf-8?q?568=2Egit=2Edaniel=40makrotopia=2Eorg=3E?=
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 1 · Low: 0
- [Medium] The new user-facing document and the in-tree driver artifacts
disagree on the remedy for a failed rescue recovery.
--
net: dsa: mxl862xx: document devlink flash and info support
This adds Documentation/networking/devlink/mxl862xx.rst describing the
devlink info versions and the flash update flow of the mxl862xx driver,
including the MCUboot rescue mode recovery, links it from the devlink
index and adds it to the driver's MAINTAINERS entry.
> diff --git a/Documentation/networking/devlink/mxl862xx.rst b/Documentation/networking/devlink/mxl862xx.rst
> new file mode 100644
> index 0000000000000..793f3521f505f
> --- /dev/null
> +++ b/Documentation/networking/devlink/mxl862xx.rst
> @@ -0,0 +1,91 @@
[ ... ]
> +Flash Update
> +============
[ ... ]
> +If the driver gives up on the recovery, ``devlink dev flash`` returns
> +``-EIO`` and says so in its extack message. The drain runs once and is
> +never resumed, so a failed MDIO transaction ends it as well. A loader
> +that stops answering the drain needs a power cycle; a completed drain
> +whose reprobe could not be scheduled, and a drain a bus error cut
> +short, need only a driver rebind. The driver re-examines the switch
> +when it binds and at no other time, so a power cycle on a board where
> +the switch can be cycled on its own still has to be followed by an
> +unbind and rebind for the recovered switch to be recognised.
[Severity: Medium]
This new text says two of the three rescue_failed causes need only a
driver rebind, but the in-tree kernel-doc and the log message say a power
cycle is needed in all cases. Which of the three is right?
The kernel-doc for the flag in struct mxl862xx_priv (mxl862xx.h) makes no
distinction:
* @rescue_failed: (rescue_mode) the self-heal gave up or cannot run; the
* loader needs a power cycle and no flash can be accepted
and mxl862xx_setup_rescue() in mxl862xx.c prints the same advice for every
cause:
if (priv->rescue_failed) {
dev_warn(ds->dev,
"switch in MCUboot with an unfinishable download, power cycle it\n");
return;
}
mxl862xx_rescue_heal_work_fn() in mxl862xx-fw.c sets the flag both for any
drain error, which includes a plain SMDIO/bus write failure:
dev_err(dev, "flash: download recovery failed: %pe\n",
ERR_PTR(ret));
WRITE_ONCE(priv->rescue_failed, true);
and after a fully successful drain when only the reprobe hand-off failed:
if (device_schedule_reprobe(dev, MXL862XX_FW_REPROBE_DELAY_MS))
WRITE_ONCE(priv->rescue_failed, true);
Since rescue_failed is a plain bool in the per-binding priv, an unbind and
rebind starts from false and re-runs mxl862xx_rescue_mode_detect(), which
matches what the .rst says for those two cases. Only the unfinishable
opening handshake path in mxl862xx_rescue_mode_detect() looks like it
genuinely needs a power cycle.
Should the kernel-doc comment and the dev_warn() text be narrowed the same
way, so an operator reading dmesg is not sent to power cycle (possibly
physically reset) a switch that a rebind would recover?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1789477568.git.daniel%40makrotopia.org
next reply other threads:[~2026-09-17 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:11 netdev-bot+sashiko [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-15 13:09 [PATCH net-next v16 0/6] net: dsa: mxl862xx: devlink flash and rescue Daniel Golle
2026-09-15 13:11 ` [PATCH net-next v16 6/6] net: dsa: mxl862xx: document devlink flash and info support Daniel Golle
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=178966149151.22033.652158876730245736@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.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®