Skip to content

Commit 1b5d73f

Browse files
vcgomesanguy11
authored andcommitted
igc: Enable PCIe PTM
Enables PCIe PTM (Precision Time Measurement) support in the igc driver. Notifies the PCI devices that PCIe PTM should be enabled. PCIe PTM is similar protocol to PTP (Precision Time Protocol) running in the PCIe fabric, it allows devices to report time measurements from their internal clocks and the correlation with the PCIe root clock. The i225 NIC exposes some registers that expose those time measurements, those registers will be used, in later patches, to implement the PTP_SYS_OFFSET_PRECISE ioctl(). Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Dvora Fuxbrumer <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 014408c commit 1b5d73f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <net/pkt_sched.h>
1313
#include <linux/bpf_trace.h>
1414
#include <net/xdp_sock_drv.h>
15+
#include <linux/pci.h>
16+
1517
#include <net/ipv6.h>
1618

1719
#include "igc.h"
@@ -6174,6 +6176,10 @@ static int igc_probe(struct pci_dev *pdev,
61746176

61756177
pci_enable_pcie_error_reporting(pdev);
61766178

6179+
err = pci_enable_ptm(pdev, NULL);
6180+
if (err < 0)
6181+
dev_info(&pdev->dev, "PCIe PTM not supported by PCIe bus/controller\n");
6182+
61776183
pci_set_master(pdev);
61786184

61796185
err = -ENOMEM;

0 commit comments

Comments
 (0)