mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <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 0/6] net: dsa: mxl862xx: devlink flash and rescue
Date: Fri, 18 Sep 2026 18:07:09 -0700	[thread overview]
Message-ID: <20260918180709.2fe12c2c@kernel.org> (raw)
In-Reply-To: <cover.1789477568.git.daniel@makrotopia.org>

On Tue, 15 Sep 2026 14:09:03 +0100 Daniel Golle wrote:
> This series adds "devlink dev flash" and "devlink dev info" support to
> the MaxLinear MxL862xx DSA driver, and makes a switch stuck in its
> MCUboot loader recoverable through the same path.
> 
> The switch is flashed over the loader's clause-22 SMDIO download
> interface after the firmware API has rebooted it into MCUboot, and the
> driver reinitialises through a deferred detach and re-probe once the
> new image runs. A switch found in MCUboot at probe registers in a
> reduced rescue mode with firmware version 0.0.0, so the same flash flow
> recovers it; an interrupted download is drained in the background
> first. The deferred re-probe comes from a new driver-core helper,
> device_schedule_reprobe(), since a driver-owned work item cannot
> survive a racing rmmod, nor give up its detach once the core has
> blocked probing for a shutdown. fwupd's devlink plugin carries the
> matching quirks [17].
> 
> Patch 3 is a driver-core change and patch 4 does not link without it,
> so the series needs a driver-core ack before net-next can take it.
> 
> Tested on an MxL86252C switch of the BananaPi R4 Pro 8X: an upgrade
> through fwupd; a reboot issued while a flash was running, which waits
> for the transfer to finish; a host crash mid-transfer, whose wedged
> download the background drain recovered; and a power cut mid-transfer,
> after which the loader came up ready and fwupd flashed the switch from
> 0.0.0 back to a released firmware.

Having the "rescue mode" which only allows flashing a better / working
FW is fairly common these days. Did you consider driving the operation
more from user space. Let the user devlink reload into flashing mode,
and devlink reload back into normal operation mode?

  parent reply	other threads:[~2026-09-19  1:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 13:09 Daniel Golle
2026-09-15 13:09 ` [PATCH net-next v16 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops Daniel Golle
2026-09-15 13:09 ` [PATCH net-next v16 2/6] net: dsa: mxl862xx: add SMDIO clause-22 register access Daniel Golle
2026-09-15 13:09 ` [PATCH net-next v16 3/6] driver core: add device_schedule_reprobe() Daniel Golle
2026-09-15 13:10 ` [PATCH net-next v16 4/6] net: dsa: mxl862xx: add devlink flash_update and info_get Daniel Golle
2026-09-15 13:10 ` [PATCH net-next v16 5/6] net: dsa: mxl862xx: recover switch stuck in MCUboot rescue mode Daniel Golle
2026-09-15 13:11 ` [PATCH net-next v16 6/6] net: dsa: mxl862xx: document devlink flash and info support Daniel Golle
2026-09-19  1:07 ` Jakub Kicinski [this message]
2026-09-19  9:04   ` [PATCH net-next v16 0/6] net: dsa: mxl862xx: devlink flash and rescue 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=20260918180709.2fe12c2c@kernel.org \
    --to=kuba@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=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®