summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
diff options
context:
space:
mode:
authorEdwin Peer <edwin.peer@broadcom.com>2021-10-29 03:47:40 -0400
committerDavid S. Miller <davem@davemloft.net>2021-10-29 12:13:04 +0100
commit228ea8c187d814e1b8e369086e640dfc1d42974f (patch)
tree1da0a96b190e170c312db9d14e9553714a5959ec /drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
parentd900aadd86b0c9ddb8b78e5fa512fb4133b30559 (diff)
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 <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_ptp.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
index fa5f05708e6d..7c528e1f8713 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
@@ -10,6 +10,9 @@
#ifndef BNXT_PTP_H
#define BNXT_PTP_H
+#include <linux/ptp_clock_kernel.h>
+#include <linux/timecounter.h>
+
#define BNXT_PTP_GRC_WIN 6
#define BNXT_PTP_GRC_WIN_BASE 0x6000