Thread (10 messages) 10 messages, 2 authors, 2026-09-08

Re: [PATCH net-next v13 1/6] net: dsa: add devlink flash_update callback to dsa_switch_ops

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-08 12:28:40
Also in: driver-core, linux-doc, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help