[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210322161822.1546454-3-vinicius.gomes@intel.com>
Date: Mon, 22 Mar 2021 09:18:21 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>,
sasha.neftin@...el.com, anthony.l.nguyen@...el.com,
linux-pci@...r.kernel.org, bhelgaas@...gle.com,
netdev@...r.kernel.org, mlichvar@...hat.com,
richardcochran@...il.com
Subject: [PATCH next-queue v3 2/3] igc: Enable PCIe PTM
In practice, enabling PTM also sets the enabled_ptm flag in the PCI
device, the flag will be used for detecting if PTM is enabled before
adding support for the SYSOFFSET_PRECISE ioctl() (which is added by
implementing the getcrosststamp() PTP function).
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index f77feadde8d2..04319ffae288 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -12,6 +12,8 @@
#include <net/pkt_sched.h>
#include <linux/bpf_trace.h>
#include <net/xdp_sock_drv.h>
+#include <linux/pci.h>
+
#include <net/ipv6.h>
#include "igc.h"
@@ -5792,6 +5794,10 @@ static int igc_probe(struct pci_dev *pdev,
pci_enable_pcie_error_reporting(pdev);
+ err = pci_enable_ptm(pdev, NULL);
+ if (err < 0)
+ dev_err(&pdev->dev, "PTM not supported\n");
+
pci_set_master(pdev);
err = -ENOMEM;
--
2.31.0
Powered by blists - more mailing lists