Skip to content

Commit 93cb62d

Browse files
Michael Chandavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 83bb623 commit 93cb62d

File tree

1 file changed

+7
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+7
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12660,6 +12660,8 @@ static void bnxt_remove_one(struct pci_dev *pdev)
1266012660

1266112661
if (BNXT_PF(bp))
1266212662
devlink_port_type_clear(&bp->dl_port);
12663+
12664+
bnxt_ptp_clear(bp);
1266312665
pci_disable_pcie_error_reporting(pdev);
1266412666
unregister_netdev(dev);
1266512667
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)
1324313245
rc);
1324413246
}
1324513247

13248+
if (bnxt_ptp_init(bp)) {
13249+
netdev_warn(dev, "PTP initialization failed.\n");
13250+
kfree(bp->ptp_cfg);
13251+
bp->ptp_cfg = NULL;
13252+
}
1324613253
bnxt_inv_fw_health_reg(bp);
1324713254
bnxt_dl_register(bp);
1324813255

0 commit comments

Comments
 (0)