From: Andrew Lunn <andrew@lunn.ch>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, 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>,
Vladimir Oltean <olteanv@gmail.com>,
Frank Wunderlich <frank.wunderlich@linux.dev>,
John Crispin <john@phrozen.org>,
"Benny (Ying-Tsan) Weng" <yweng@maxlinear.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 v13 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops
Date: Tue, 8 Sep 2026 14:28:19 +0200 [thread overview]
Message-ID: <39ce1c25-55d8-4bd0-80a7-72ac881161ad@lunn.ch> (raw)
In-Reply-To: <ca7ce5efa19afc93bede2b5bf6841b0b47eba4ba.1788783126.git.daniel@makrotopia.org>
On Mon, Sep 07, 2026 at 07:37:37PM +0100, Daniel Golle wrote:
> Add a devlink_flash_update callback to dsa_switch_ops so that DSA
> drivers can support devlink dev flash without open-coding the devlink
> plumbing. Like the other trampolines in net/dsa/devlink.c, the op
> returns -EOPNOTSUPP when the driver does not implement the callback;
> the devlink core will then have fetched the firmware file from
> userspace before the request fails, which is acceptable for an
> operation as infrequent as a firmware update.
>
> The devlink core calls the op with the devlink instance lock held and
> without rtnl_lock, whereas DSA serialises its switch and port ops
> under rtnl_lock, so a driver has to serialise a flash against its own
> ops itself.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2026-09-08 12:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 18:37 [PATCH net-next v13 0/6] net: dsa: mxl862xx: devlink flash and rescue Daniel Golle
2026-09-07 18:37 ` [PATCH net-next v13 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops Daniel Golle
2026-09-08 12:28 ` Andrew Lunn [this message]
2026-09-07 18:37 ` [PATCH net-next v13 2/6] net: dsa: mxl862xx: add SMDIO clause-22 register access Daniel Golle
2026-09-07 18:37 ` [PATCH net-next v13 3/6] driver core: add device_schedule_reprobe() Daniel Golle
2026-09-07 18:38 ` [PATCH net-next v13 4/6] net: dsa: mxl862xx: add devlink flash_update and info_get Daniel Golle
2026-09-08 12:36 ` Andrew Lunn
2026-09-07 18:38 ` [PATCH net-next v13 5/6] net: dsa: mxl862xx: recover switch stuck in MCUboot rescue mode Daniel Golle
2026-09-08 12:38 ` Andrew Lunn
2026-09-07 18:38 ` [PATCH net-next v13 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=39ce1c25-55d8-4bd0-80a7-72ac881161ad@lunn.ch \
--to=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=frank.wunderlich@linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=john@phrozen.org \
--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 \
--cc=yweng@maxlinear.com \
/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