Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2931640iog; Mon, 20 Jun 2022 07:44:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJVEJy4fHM3cwhDnXKizeVRA8GZd6Xfqh4MqMf7Tq/KKYJ7MHNqcGV8/vbqMwbefs94kVf X-Received: by 2002:a63:34cc:0:b0:40c:a7f7:bc6 with SMTP id b195-20020a6334cc000000b0040ca7f70bc6mr6284274pga.617.1655736290505; Mon, 20 Jun 2022 07:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736290; cv=none; d=google.com; s=arc-20160816; b=tXJqAaYWq4wcbBUBEedjYIuU3cyyAj/IDRMmphCx08kCsnCDsJyDbghEyHIrk42Hf/ DLC56e+e3laLj9/B4uvBxxG7oveR06j23kZzdXXxrbh0yryQRFIOLAkSLzmrGJL93tld nVmiuhd6oGgVpVTAGU8OUyqIaNqPyVB6FJX8BQu35qQgEUEwDEMP3Q65pUwQrKj+M9Sq GYFcbuLsScw77iml5Om1LIz2q5Gwby8H8li0Dc9MBXTqjUmSAjwyAQ7WbfN4yprjjLK+ xMMTqpo1ziQhxIldvo1swOF/faBdoGWA8di4yu3x9Qy4kAYCaKZ1Dq1KKreF92PpCx2c ZjBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fKfFw3McMBha6uJZMWaZRtzvQZrSKabVFcmrqktkMsQ=; b=skjCEVLTvvFHwBk7T0zgibz70vUMhQLRw9qY3HTLsyab11atOpg+KcAASoCCL2Gpf0 G3ta2y4ZqvVXI30y2VuD/PUyyhbk6BbzjfThLzhInauMUoa0RJX5OO8f/vjKmKN86EMu mCpvgff060nw96N4PQLrvT88Zvo/pK6u/9GJXrE4SdhYYJ2Rp+oIr5hUo4IMA3xDwrNp z1Wirr1hc5D4DuSgVy51XWsbcJQXMTkCwn5W5VC07xU68+0NXFZXkOV/Np0n+t929JN/ KyZj74xtph1sfHLSgusM1kDMeRUn24JeSgaeYZNHuIcHB1Eo0y2eMxN/qb+fWTb6SJQw N7NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YFiW0eZk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020aa78e46000000b0051bcd7f3cd6si14054227pfr.278.2022.06.20.07.44.38; Mon, 20 Jun 2022 07:44:50 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YFiW0eZk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344097AbiFTNSB (ORCPT + 99 others); Mon, 20 Jun 2022 09:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344253AbiFTNNg (ORCPT ); Mon, 20 Jun 2022 09:13:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 198941EED3; Mon, 20 Jun 2022 06:06:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D8FE9B811D8; Mon, 20 Jun 2022 13:04:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A6E0C3411B; Mon, 20 Jun 2022 13:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655730260; bh=BrMAr5keXlVGAt/2wfdpi2cV9Jtsmv2DZ3dYTdZLhrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YFiW0eZk6SUsojmbD3b+tN1aJdFacoy9ro9sUp4WYKDKOX+NG0bOk85OtAfWYoQzW xam2myxhc0T5/3PyUEgJd0AR3Qma8iIVQ0WJQ7Y0hveU9JJh/djYWARiyXOO29+lPW RMr6d00/Dgr1dckSGU7tcyePwx9klhJwKldg9pYY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinicius Costa Gomes , Dvora Fuxbrumer , Tony Nguyen , Meng Tang Subject: [PATCH 5.10 82/84] igc: Enable PCIe PTM Date: Mon, 20 Jun 2022 14:51:45 +0200 Message-Id: <20220620124723.313079844@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124720.882450983@linuxfoundation.org> References: <20220620124720.882450983@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Vinicius Costa Gomes commit 1b5d73fb862414106cf270a1a7300ce8ae77de83 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/igc/igc_main.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -5041,6 +5042,10 @@ static int igc_probe(struct pci_dev *pde 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;