diff options
author | Michael Chan <michael.chan@broadcom.com> | 2021-06-27 13:19:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-28 13:41:06 -0700 |
commit | 93cb62d98e9c3d8c94cc09a15b9ab1faf342c392 (patch) | |
tree | 58c58c1662d3ea8bd9124163e0606a2b5f0a6064 /drivers | |
parent | 83bb623c968e7351aee5111547693f95f330dc5a (diff) |
bnxt_en: Enable hardware PTP support
Call bnxt_ptp_init() to initialize and register with the clock driver
to enable PTP support. Call bnxt_ptp_free() to unregister and clean
up during shutdown.
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index e198e1426551..8f185a4883d2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12660,6 +12660,8 @@ static void bnxt_remove_one(struct pci_dev *pdev) if (BNXT_PF(bp)) devlink_port_type_clear(&bp->dl_port); + + bnxt_ptp_clear(bp); pci_disable_pcie_error_reporting(pdev); unregister_netdev(dev); clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); @@ -13243,6 +13245,11 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) rc); } + if (bnxt_ptp_init(bp)) { + netdev_warn(dev, "PTP initialization failed.\n"); + kfree(bp->ptp_cfg); + bp->ptp_cfg = NULL; + } bnxt_inv_fw_health_reg(bp); bnxt_dl_register(bp); |