Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp470212iog; Mon, 13 Jun 2022 06:34:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTzed/5IMJ1Wt1ajZpre9zl6Y2IUmip1ZsgtAuIdjvYmox00dQgDydIbrFkWcDKHa5jJh9 X-Received: by 2002:a17:90a:6847:b0:1ea:7b6b:cd2f with SMTP id e7-20020a17090a684700b001ea7b6bcd2fmr15680015pjm.185.1655127285744; Mon, 13 Jun 2022 06:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655127285; cv=none; d=google.com; s=arc-20160816; b=XnUt8Ebza++M/0ot3DrZ2lkmsmhPyP8WyI5VmqLGVo9YrG/4fDeFeeUhCvC3sKnMvu DMWWQ4jStjexJZRq7MONIOKscqwzglNW93iNZ/Z/I6J/EELY57RpQx8vcmva5yQmGXTk dZp4QIkZ4lOuYtwwoC84o9tD8HqXEksMxxm5/Sqj7fpWlh87v9a8uXHFenpgOsNJpOey TlyeH9RfDY0rTbTdsrs34hHjhFDSH52t2PavfXiWv9kI4+uI3yoqJPiM6GgqNMkukqrS e47Z5F+bBRI6NXVC4gqvNmyBXxngNd+XMY4M9wIL8+J0UUekG7IogK2GlvpFrcCwP6I+ pbdw== 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=boAJVzhS3/lnl2MYnt3sDAW6j2V8+v0SzN5w0hqWnr8=; b=A0mi0C7H87N3SaLPLGGZvhrY3ECAH1u+kmhOchF6UXibF9uxa13goO71tGXj2ULQ0S F6zod3AsDHicfBPuJ3R1r8TaE9L484bS4TazFpRyNcIdqmJutyU8r5W4ZhMywC0tbKC0 ZZTlQ832w124pbQXzockuQHQi4kLdK1XE7d6arhEmy/o+5klt8bxIVxbQTJW2wQ/hB2P r44dpIn1cAWQ7iCug9J8zKKdQB4se6wc/XRzs0GYN9W570PEhAJCD8Jh4YF7lYgixJz1 K6V3/atWdAHY/BvIFF0bhWQazY3yG/Tr+RNd5DvDDgTr3TqfvOrECv8jJB0sVa4PrM6K fFXw== 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 x4-20020a63fe44000000b003f5e1556e49si10161856pgj.601.2022.06.13.06.34.33; Mon, 13 Jun 2022 06:34:45 -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 S1377255AbiFMNUL (ORCPT + 99 others); Mon, 13 Jun 2022 09:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359298AbiFMNJq (ORCPT ); Mon, 13 Jun 2022 09:09:46 -0400 Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 716522018A for ; Mon, 13 Jun 2022 04:20:02 -0700 (PDT) X-QQ-mid: bizesmtp79t1655119171tncpq0nk Received: from localhost.localdomain ( [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 13 Jun 2022 19:19:19 +0800 (CST) X-QQ-SSF: 01400000002000G0Q000B00A0000000 X-QQ-FEAT: TskX/GkkryCDcmJVO5h9ev8uYG7SCnaHXyx1CcOQULQILG72duCIYEoi0yiGU eOgLxLcnS35Mho1tqsNnD0GEpf0qd1gDhv/txymjOX5m0t+NlZqIXlul/FwDwVLq7/2/nqx qqnZM5tbvjuTlke1A6X0R1jGpW8zb/yUDwloN22q5f2CdSrKeeDSnjFZZoRuqpdGto4Bqp3 HXD4NEWngy5ZHFAyb2VMNdJjmt+l2YmHK+hG/z+ClAGxJW2rhLZcwjkZwZQb8QcJrkCLxzj TISphwzcNHy1W0RLLVJK24ytwYMkX/UxcWAbUvoWz1rgkloNOSwMt/ypyXd7H2Ptsi/ZlXe Glyev0WqjCBCXDRbJhd9a9mmjtAxH2jchdzZ3MeOB9wWZxJr88= X-QQ-GoodBg: 2 From: Meng Tang 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 , Vinicius Costa Gomes , Dvora Fuxbrumer Subject: [PATCH 5.10 2/2] commit 1b5d73fb8624 ("igc: Enable PCIe PTM") Date: Mon, 13 Jun 2022 19:19:07 +0800 Message-Id: <20220613111907.25490-2-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220613111907.25490-1-tangmeng@uniontech.com> References: <20220613111907.25490-1-tangmeng@uniontech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign9 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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