OSDN Git Service

net: enetc: allow the enetc_reconfigure() callback to fail
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 3 Feb 2023 00:11:14 +0000 (02:11 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 4 Feb 2023 04:05:57 +0000 (20:05 -0800)
commit46a0ecf93b6d188379efe05cdde8564f1fe7fdad
tree1cbe054dc448a1181cdd24c65b7e9aa1c793fae8
parent1c81a9b3aaa26f290c23dee8629579b3ebb994b3
net: enetc: allow the enetc_reconfigure() callback to fail

enetc_reconfigure() was modified in commit c33bfaf91c4c ("net: enetc:
set up XDP program under enetc_reconfigure()") to take an optional
callback that runs while the netdev is down, but this callback currently
cannot fail.

Code up the error handling so that the interface is restarted with the
old resources if the callback fails.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c