Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp754751iog; Mon, 13 Jun 2022 12:12:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsAtJ6ZYQzZ/TTfxnomTn88FZh31ymIwyTdkePe/MR0eLdhSJkN+OGVhKVu4hVMZOwzO/v X-Received: by 2002:a17:90b:2690:b0:1ea:9c82:a70a with SMTP id pl16-20020a17090b269000b001ea9c82a70amr210701pjb.141.1655147550659; Mon, 13 Jun 2022 12:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655147550; cv=none; d=google.com; s=arc-20160816; b=vXJciH6/TwiE2tvzq/NgJkj0GW2XfIlC6aBC7bZpGCtvnzKXvGw7W6XuyR8PxDilrY ezMTzvqmHuqMNnUr4yDd79ay0dtqjjGCZWWz7bfGfQzOjSlTCqLRumirsmH6uje8l12+ H2DM309Nua2ys19SGfU/dM6baRGV7CYgGlprrub/Te9lJ91qzLVjuRAG7qMpvS0zM+Cz ILa6iadwvuKfbc6y8EwmgDKHMgSy7s7ZzR968FJK9aWJOiKXwPBuXsu/0azaD/aSFdeh rZ1J/VsV2OH1bkU/9kk6Fe9IKvviD16bzwtRbdJy5AKMmaH0lFRls3tO9+AIy17amY+W Wgrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=P7PznzcM0DLfa3LWL0zXR/g5XPwkjTgCpboGF/Xo3Dk=; b=MVelPSADlFlZCc+i+x8hqU8vFb8soDtN0cDjBDl/jtyAYE3OFMDB+kJXDsyJwp0XOF v7idC9je5HUZXcxbE+DguCCi9E+st76Zk7i5GiWpOfo7sYaclrS0JiNE0QE6Q0NfuPU0 Dw5J1NQljk8rbafaTZAtuoBVLRlt2QKpWaGeJLCmzl7n+ZwTQwd9K8dtyV1nhfkMnW2M kB0H33UE/UGrmKttF0u8ItIERSbijxrOw43/9Lq8Be+86SyFURE+WiVnlqTC2d3AYhPf D2Mw07325KUAgOk1C7iBhwRa78LeM9nIgr9PDjlbauWUjLdQ92/uGRz62Qedtj7xmHnD 9NvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nC33P0zI; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce15-20020a17090aff0f00b001e317fae3bcsi9317083pjb.78.2022.06.13.12.12.18; Mon, 13 Jun 2022 12:12:30 -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=@kernel.org header.s=k20201202 header.b=nC33P0zI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240500AbiFMS32 (ORCPT + 99 others); Mon, 13 Jun 2022 14:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241854AbiFMS1o (ORCPT ); Mon, 13 Jun 2022 14:27:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8C41FE4DF; Mon, 13 Jun 2022 07:51:38 -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 B1162B8105B; Mon, 13 Jun 2022 14:51:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A9FFC3411B; Mon, 13 Jun 2022 14:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655131895; bh=TLxFZAPhXdD/lskt5ABL7Yyvc76typsZSU+wq7k76S8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=nC33P0zIEEDZN6u3S/HZm0+GRAnfXvOGbb7rQDH01pkLftaiZTdzsxZu7Xyebbpin 7iZJl7IWnGkRJAfwOIqc8K+j8IwSTaK3F0MHmyUTMc7CgLJgR4VJD+UGpyJJkhrqLX pWeZakRI7cH0l9gg+YPdjnVNTfJ5uxNC/QoxSM1Q4+DGXBNKSm7+Cr0t5ee2RguLg7 uVqQjAJeEaO0Ka+V0HlIZAym1GivjWVzSNmIneaDGM/5HviE+hY2yp+gPqKFauvgmz O4OH3HWNBRR1vFg6SRwbt3uLYW5nw58tlPFvpBRcH5bh9uz1ym1TUrI00o4VTDPc5K zXFrxSWwbIgGA== Date: Mon, 13 Jun 2022 09:51:33 -0500 From: Bjorn Helgaas To: Meng Tang Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, bhelgaas@google.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Vinicius Costa Gomes Subject: Re: [PATCH 5.10 1/2] commit 1d71eb53e451 ("Revert "PCI: Make pci_enable_ptm() private"") Message-ID: <20220613145133.GA701092@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220613111907.25490-1-tangmeng@uniontech.com> X-Spam-Status: No, score=-8.3 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 On Mon, Jun 13, 2022 at 07:19:06PM +0800, Meng Tang wrote: > From: Vinicius Costa Gomes > > Make pci_enable_ptm() accessible from the drivers. > > Exposing this to the driver enables the driver to use the > 'ptm_enabled' field of 'pci_dev' to check if PTM is enabled or not. > > This reverts commit ac6c26da29c1 ("PCI: Make pci_enable_ptm() private"). > > 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, the bug is still occurred, and the > "commit 1b5d73fb8624 ("igc: Enable PCIe PTM")" can fixes it. > > And this patch is the pre-patch of > 1b5d73fb862414106cf270a1a7300ce8ae77de83. I guess the point of this is to backport 1d71eb53e451 ("Revert "PCI: Make pci_enable_ptm() private"") to a v5.10 stable kernel? If so, I would think you'd want to send this to stable@vger.kernel.org. > Signed-off-by: Vinicius Costa Gomes > Acked-by: Bjorn Helgaas > Signed-off-by: Tony Nguyen > Signed-off-by: Meng Tang > --- > drivers/pci/pci.h | 3 --- > include/linux/pci.h | 7 +++++++ > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index a96dc6f53076..4084764bf0b1 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -585,11 +585,8 @@ static inline void pcie_ecrc_get_policy(char *str) { } > > #ifdef CONFIG_PCIE_PTM > void pci_ptm_init(struct pci_dev *dev); > -int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); > #else > static inline void pci_ptm_init(struct pci_dev *dev) { } > -static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) > -{ return -EINVAL; } > #endif > > struct pci_dev_reset_methods { > diff --git a/include/linux/pci.h b/include/linux/pci.h > index bc5a1150f072..692ce678c5f1 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1599,6 +1599,13 @@ static inline bool pci_aer_available(void) { return false; } > > bool pci_ats_disabled(void); > > +#ifdef CONFIG_PCIE_PTM > +int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); > +#else > +static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) > +{ return -EINVAL; } > +#endif > + > void pci_cfg_access_lock(struct pci_dev *dev); > bool pci_cfg_access_trylock(struct pci_dev *dev); > void pci_cfg_access_unlock(struct pci_dev *dev); > -- > 2.20.1 > > >