Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11636266rwl; Tue, 3 Jan 2023 02:21:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXs8D83HZn8NjUbrIZa2tzmrXgPwJcnzbf/AlUp7vJ2n0xpT8ygVO213CkDyC2oEzVt8dVAQ X-Received: by 2002:a17:902:ccc1:b0:189:8002:5f59 with SMTP id z1-20020a170902ccc100b0018980025f59mr75306840ple.57.1672741281089; Tue, 03 Jan 2023 02:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672741281; cv=none; d=google.com; s=arc-20160816; b=pa4wrFnYpEOQy1kWd66McUBmO3DeA38fsWU4gGbGPAUzWkYiMVtwHP2xmzMHovjFXv eR1Ac08FfIZWCFgwBjVZgNrznirO751juoDJlewL9NJKj8UErSi+x7irKi+c+MIhbyCA PXOqk7J0ehCCoG9sAvFCZJugSwruBot+plU6V4X5tSV6nIi/3NCzujYsjMgT1LH2P2bc ZuRajP4HUmvXbT//Mysqc8x+AB+M02nkJoa6B/6pg8WESYUg+0/vhwcwWtggqFnyNK5P 5N4qeJIg7HzeO0wCka8LORXeMLXfa69Qtl0d7XMHudWlHNqnUET/vBtm8ibJ5ur1t52u Stuw== 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 :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eqaY+G7h6XNXIjzbepjM++KOGAFemraJpLD04JEoW7E=; b=RIC7Iosynzh/JbOKIBa35TiCSx6qdhXURHU8BGK4ieZxGA16PYLAEUY+MEJoW/rZFW MXH0YA14OAIMicvrjZDFCR94/CxsnsH/39LFtVPPh6gCUgncNFj0+lYcZr2ccdEER30B PmXImTY0v++HLXYQp7S9agHkC9Vuv/D/OFY30tF8FSd0ls77owg/RTIE4KjrgBB/O/8r 5x9Ku/9oJYz+0IVh6dFMbbKnyfF1yjsYqlQkbaWsQblGqKoTEf1n46QSTmCcO2B/13hi +3LuJgp74Ke7KSOFsWKhre+tSOmO1CzF8vlSc6mhLF+C1ev/mx4DdIxqfbjZdZV5FyoY bDuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="KxJii57/"; 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 x20-20020a170902821400b0016d2e8c2233si30029389pln.333.2023.01.03.02.21.13; Tue, 03 Jan 2023 02:21:21 -0800 (PST) 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="KxJii57/"; 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 S237271AbjACJyg (ORCPT + 61 others); Tue, 3 Jan 2023 04:54:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237108AbjACJyc (ORCPT ); Tue, 3 Jan 2023 04:54:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74203B5A; Tue, 3 Jan 2023 01:54:30 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 11A2660E97; Tue, 3 Jan 2023 09:54:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6DD7C433EF; Tue, 3 Jan 2023 09:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672739669; bh=BpfDQ8HqIK6YKlZtjbbpD8Zo3Pb/8YhLfqVQpatUtt0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KxJii57/6HLZ5doJil0NXj28Kw4JpRkyPmP7KGXKsLj4q3nx9/+eBuPvve4qqAvvn GMp0W+1yVkKF9vK4hhcKvKGJN3KNZaSkG+JskFvdXGm2KNMN25TM2TtDySGpOReh9w etMBWuT8aISx+egjmKosD8zICLvqak10muDDkbeiLNHV6yml4gNhmf1C/hs27dC4J2 R0aBXrrf88B5574M0quLMUDDPuTzV6Kjz+7ONopNNM2l5C+Y8Bbgq73NXEh1SLENuo exYF8Yv7UYU/BAQ76jVmo6A1LxSQ0XSdEf7PDK8idSO9P28r+jW+JdSLsVxSc7tDsa rOe4mrEXoO92g== Date: Tue, 3 Jan 2023 11:54:24 +0200 From: Leon Romanovsky To: Paul Menzel Cc: Rajat Khandelwal , intel-wired-lan@lists.osuosl.org, rajat.khandelwal@intel.com, jesse.brandeburg@intel.com, linux-kernel@vger.kernel.org, edumazet@google.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net, Bjorn Helgaas , linux-pci@vger.kernel.org Subject: Re: [Intel-wired-lan] [PATCH] igc: Mask replay rollover/timeout errors in I225_LMVP Message-ID: References: <20221229122640.239859-1-rajat.khandelwal@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 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 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 Sun, Jan 01, 2023 at 11:34:21AM +0100, Paul Menzel wrote: > [Cc: +Bjorn, +linux-pci] > > Dear Leon, dear Rajat, > > > Am 01.01.23 um 09:32 schrieb Leon Romanovsky: > > On Thu, Dec 29, 2022 at 05:56:40PM +0530, Rajat Khandelwal wrote: > > > The CPU logs get flooded with replay rollover/timeout AER errors in > > > the system with i225_lmvp connected, usually inside thunderbolt devices. > > > > > > One of the prominent TBT4 docks we use is HP G4 Hook2, which incorporates > > > an Intel Foxville chipset, which uses the igc driver. > > > On connecting ethernet, CPU logs get inundated with these errors. The point > > > is we shouldn't be spamming the logs with such correctible errors as it > > > confuses other kernel developers less familiar with PCI errors, support > > > staff, and users who happen to look at the logs. > > > > > > Signed-off-by: Rajat Khandelwal > > > --- > > > drivers/net/ethernet/intel/igc/igc_main.c | 28 +++++++++++++++++++++-- > > > 1 file changed, 26 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c > > > index ebff0e04045d..a3a6e8086c8d 100644 > > > --- a/drivers/net/ethernet/intel/igc/igc_main.c > > > +++ b/drivers/net/ethernet/intel/igc/igc_main.c > > > @@ -6201,6 +6201,26 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg) > > > return value; > > > } > > > +#ifdef CONFIG_PCIEAER > > > +static void igc_mask_aer_replay_correctible(struct igc_adapter *adapter) > > > +{ > > > + struct pci_dev *pdev = adapter->pdev; > > > + u32 aer_pos, corr_mask; > > > + > > > + if (pdev->device != IGC_DEV_ID_I225_LMVP) > > > + return; > > > + > > > + aer_pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR); > > > + if (!aer_pos) > > > + return; > > > + > > > + pci_read_config_dword(pdev, aer_pos + PCI_ERR_COR_MASK, &corr_mask); > > > + > > > + corr_mask |= PCI_ERR_COR_REP_ROLL | PCI_ERR_COR_REP_TIMER; > > > + pci_write_config_dword(pdev, aer_pos + PCI_ERR_COR_MASK, corr_mask); > > > > Shouldn't this igc_mask_aer_replay_correctible function be implemented > > in drivers/pci/quirks.c and not in igc_probe()? > > Probably. Though I think, the PCI quirk file, is getting too big. As long as that file is right location, we should use it. One can refactor quirk file later. Thanks > > > Kind regards, > > Paul