From 228ea8c187d814e1b8e369086e640dfc1d42974f Mon Sep 17 00:00:00 2001 From: Edwin Peer Date: Fri, 29 Oct 2021 03:47:40 -0400 Subject: bnxt_en: implement devlink dev reload driver_reinit The RTNL lock must be held between down and up to prevent interleaving state changes, especially since external state changes might release and allocate different driver resource subsets that would otherwise need to be tracked and carefully handled. If the down function fails, then devlink will not call the corresponding up function, thus the lock is released in the down error paths. v2: Don't use devlink_reload_disable() and devlink_reload_enable(). Instead, check that the netdev is not in unregistered state before proceeding with reload. Signed-off-by: Edwin Peer Signed-Off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c') diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c index f0aa480799ca..8388be119f9a 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c @@ -11,9 +11,7 @@ #include #include #include -#include #include -#include #include #include #include "bnxt_hsi.h" -- cgit v1.2.3