From: Meng Tang <tangmeng@uniontech.com>
To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
davem@davemloft.net, kuba@kernel.org, bhelgaas@google.com
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Meng Tang <tangmeng@uniontech.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Subject: [PATCH 5.10 2/2] commit 1b5d73fb8624 ("igc: Enable PCIe PTM")
Date: Mon, 13 Jun 2022 19:19:07 +0800 [thread overview]
Message-ID: <20220613111907.25490-2-tangmeng@uniontech.com> (raw)
In-Reply-To: <20220613111907.25490-1-tangmeng@uniontech.com>
In the 5.10 kernel version, even to the latest confirmed version,
the following error will still be reported when I225-V network card
is used.
kernel: [ 1.031581] igc: probe of 0000:01:00.0 failed with error -2
kernel: [ 1.066574] igc: probe of 0000:02:00.0 failed with error -2
kernel: [ 1.096152] igc: probe of 0000:03:00.0 failed with error -2
kernel: [ 1.127251] igc: probe of 0000:04:00.0 failed with error -2
Even though I confirmed that 7c496de538eebd8212dc2a3c9a468386b2640d4
and 47bca7de6a4fb8dcb564c7ca4d885c91ed19e03 have been merged into the
kernel 5.10, but bug still occurred, and this patch can fixes it.
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 <vinicius.gomes@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index fd9257c7059a..298e968629db 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -10,6 +10,7 @@
#include <linux/ip.h>
#include <linux/pm_runtime.h>
#include <net/pkt_sched.h>
+#include <linux/pci.h>
#include <net/ipv6.h>
@@ -5041,6 +5042,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_info(&pdev->dev, "PCIe PTM not supported by PCIe bus/controller\n");
+
pci_set_master(pdev);
err = -ENOMEM;
--
2.20.1
next prev parent reply other threads:[~2022-06-13 13:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 11:19 [PATCH 5.10 1/2] commit 1d71eb53e451 ("Revert "PCI: Make pci_enable_ptm() private"") Meng Tang
2022-06-13 11:19 ` Meng Tang [this message]
2022-06-13 14:51 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2022-06-14 1:15 Meng Tang
2022-06-14 1:15 ` [PATCH 5.10 2/2] commit 1b5d73fb8624 ("igc: Enable PCIe PTM") Meng Tang
2022-06-20 11:56 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220613111907.25490-2-tangmeng@uniontech.com \
--to=tangmeng@uniontech.com \
--cc=anthony.l.nguyen@intel.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=dvorax.fuxbrumer@linux.intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox