summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
diff options
context:
space:
mode:
authorEdwin Peer <edwin.peer@broadcom.com>2021-10-29 10:47:41 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-29 14:13:05 +0300
commit8f6c5e4d1470499b8feff98353eb2920bd81635a (patch)
treed36ad26568890392494328af0dc15f8473f82e66 /drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
parent228ea8c187d814e1b8e369086e640dfc1d42974f (diff)
downloadlinux-8f6c5e4d1470499b8feff98353eb2920bd81635a.tar.xz
bnxt_en: implement devlink dev reload fw_activate
Similar to reload driver_reinit, the RTNL lock is held across reload down and up to prevent interleaving state changes. But we need to subsequently release the RTNL lock while waiting for firmware reset to complete. Also keep a statistic on fw_activate resets initiated remotely from other functions. Signed-off-by: Edwin Peer <edwin.peer@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
index 406dc655a5fc..a189cfe1e441 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
@@ -20,6 +20,13 @@ static inline struct bnxt *bnxt_get_bp_from_dl(struct devlink *dl)
return ((struct bnxt_dl *)devlink_priv(dl))->bp;
}
+static inline void bnxt_dl_remote_reload(struct bnxt *bp)
+{
+ devlink_remote_reload_actions_performed(bp->dl, 0,
+ BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) |
+ BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE));
+}
+
#define NVM_OFF_MSIX_VEC_PER_PF_MAX 108
#define NVM_OFF_MSIX_VEC_PER_PF_MIN 114
#define NVM_OFF_IGNORE_ARI 164