Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp994298iog; Mon, 13 Jun 2022 18:20:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN1va5ukh/ruk5BidUko2NlhUFOYIA1ieNCfGBLiKxAGwUa0k5oN9kYCCL5DAO00MHvp2m X-Received: by 2002:a17:906:64d6:b0:712:1022:492b with SMTP id p22-20020a17090664d600b007121022492bmr2195018ejn.264.1655169656418; Mon, 13 Jun 2022 18:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655169656; cv=none; d=google.com; s=arc-20160816; b=DcTLhNXbNR44czhK65KRs08ylZvx1LnbP4MOQ2lvuDcUkGEhQSrB/n0wtm93nUOKdL MzCPhZa6dpHQTTQ8Z0EkDStb20BvYs4pyytTUoKlW11WrsIseAfvG5GPiRZWPtcIn+pX nPdKVukSk5Y9d/JpK8jTRBdOsR2RIWrsxNQ5PcYnPjSCtwswlHMBE74DxtY8agsAKQpP lwKyCyhH00k/kiET/jT/q7fdNCcyFZgTwJAomZjOMlLG7l3fPy7AaMS8DecSw9xOgUEY CdumdcsP08cWhEReMz08Kr3qRoiTeJvNkxxebQHDw05nE//eWOJuJaUT1MGyBo9utEyf 0+Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=vEgqSauBRGLNWBmeKgK++3TI2cl900GKF/BoEpv2DdY=; b=oy0isFOiSu3ue+rtir5JLjDiD3viMbLrey7d4IyBXAv+c9FaLfroxp76PlnED/wDz0 L1OD7ZapPX94jLiH/vhrbrw551Tr4DwlD9H8pWab6JTCXw0ynuHXZTXSHdqprGf1Q9E8 yFpSOq0UbRD+n6tES+XrMsV6P96lvTe885s3KWiUEDULfj5kP5dFq0gc3VYlAhiw+d/L KLdnvd0dRKP9aGGwOk3g3JCmqsU1+zynpErz5bSdYUqlwQbIsXlazmVM/zZ3ni0xaqQr ai/D7B8uy1S24FPlW+zMP/GeQomkRCkWakVzGeNHBeoK/jzUZJcDIv37fSLAFfCaVW4w yCtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd13-20020a1709069b8d00b00718d0ab26f9si2784979ejc.715.2022.06.13.18.20.31; Mon, 13 Jun 2022 18:20:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349177AbiFNBR7 (ORCPT + 99 others); Mon, 13 Jun 2022 21:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347989AbiFNBRj (ORCPT ); Mon, 13 Jun 2022 21:17:39 -0400 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 13 Jun 2022 18:17:14 PDT Received: from qq.com (smtpbg480.qq.com [59.36.132.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C7633365; Mon, 13 Jun 2022 18:17:14 -0700 (PDT) X-QQ-mid: bizesmtp90t1655169347tmx1hhqk Received: from localhost.localdomain ( [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 14 Jun 2022 09:15:44 +0800 (CST) X-QQ-SSF: 01400000000000G0Q000000A0000000 X-QQ-FEAT: xoS364mEyr2ZQyZa9egGpWkiXbaENEOHC3w6ZHbbovTwW4KRqizNrvRiUb/mB 69Yd9l9taMDvEMrVM5AgAC/i5zaipdqpScM8ywGwZ2hhW8E3xghQVFEQINXfzopsxWONLdg WIOO9qp6FSUReuFEnVB4rbmZEROYLoN9NmnA8FVyQavgUuwcWdMHrXpPAfCenYwLH2IgqzA OQ4rSdMZZqQce+d2BsGuoT5JqKDAHwx5zpDyQqCFpDWJsz7eFTKKSYxUhS2jdqI5mdWa8N0 h08leJFyDr9lYRsouGEB4D887k+LNhkS/AJY8XdWCMS4M/i2ZGVJZz7s0me5Tw+MSD/8VUl t0aBzFKJKLfjL7UdEkTV0peLti+meuYttoH/QROAB/gtfSWDnE= X-QQ-GoodBg: 1 From: Meng Tang To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Meng Tang , Vinicius Costa Gomes , Dvora Fuxbrumer , Tony Nguyen Subject: [PATCH 5.10 2/2] commit 1b5d73fb8624 ("igc: Enable PCIe PTM") Date: Tue, 14 Jun 2022 09:15:28 +0800 Message-Id: <20220614011528.32118-2-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220614011528.32118-1-tangmeng@uniontech.com> References: <20220614011528.32118-1-tangmeng@uniontech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen Signed-off-by: Meng Tang --- 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 #include #include +#include #include @@ -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 e=10?