Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2504553imm; Thu, 18 Oct 2018 16:08:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ktUjRrNvLtjDo8T/VNKdiXpfHB8/nTG4TMBbldGlFdlIJjt2VgjBFzXeRtq/NAGH1iwjS X-Received: by 2002:a63:c14a:: with SMTP id p10-v6mr30237042pgi.424.1539904111395; Thu, 18 Oct 2018 16:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539904111; cv=none; d=google.com; s=arc-20160816; b=tk6OgXwWbbgdccmF0Pu9+uczPfKahbF7LBtkEueIGis1PlEv0ye+tp0r6IzsTK3ItB ooBOYtNtqmjsGK5eWzcJuWXeYTeeqPFodfEky85hZwJsqEX9RqMG+tSLFr5gxqeXLz2T LV8igDjWC+IsVDkSLahDm86n2SjshaxjtnCr3G+q2l3/aOhR2admqdxStsW+mEA4CzEZ +FcmR5oUJ0dZIyFfrxJ6uoCqnWJ/9eylXDQqNlgpm9m9KXF9nRD0kW+GW69bY1H+nOfh 62BJMoqVRaHczst3fo5D46bmP+f9v59QfRsUdQD/Vv+aVKZ3zfBH4OFDzzLs3FKV7Pju dVag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=r1WwC/gUrt6V8d3YaOX80z2qhAW4D9ss58SJffXLml0=; b=ccpZib14kR35i+rGpHmF+NIXf6q3RZTAhkQrLNY0929xHkaj5wquLbQVUWKfSN6m7L dsQRsgl8bkMmRoFhkINcYIRd1ZDYWHqu3o6JwBzBuHaRY8QbmVt4hPLSx9WUO0/ElotI aqbywhTA/4mnmTDbzVziQ+TMC6+ITwPJI9FPDxD3hsvOhSJ3SOnQpivh3G4CGryweqEO 0/Rsa2IeIY3ba5ztqq7OvTMPArptji9tscex3Z6P6rDhT+FBhbIiylggb2qj8YaL2fz4 j08Cith7UXZ0TAQ0GjlRuVF8Bo0wJdbjbsjjT/klWmjMLNoE1+7M42ezWu4RtOGF+TVE UB+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si21846839plm.258.2018.10.18.16.08.16; Thu, 18 Oct 2018 16:08:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbeJSHJM (ORCPT + 99 others); Fri, 19 Oct 2018 03:09:12 -0400 Received: from mga04.intel.com ([192.55.52.120]:48659 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbeJSHJM (ORCPT ); Fri, 19 Oct 2018 03:09:12 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2018 16:05:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,397,1534834800"; d="scan'208";a="98670054" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga004.fm.intel.com with ESMTP; 18 Oct 2018 16:05:58 -0700 Date: Thu, 18 Oct 2018 17:03:13 -0600 From: Keith Busch To: Bjorn Helgaas Cc: Jon Derrick , Dongdong Liu , Sinan Kaya , Oza Pawandeep , Matthew Wilcox , Lukas Wunner , Christoph Hellwig , Mika Westerberg , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] PCI/AER: Enable error reporting for all ports Message-ID: <20181018230312.GB23301@localhost.localdomain> References: <153989603841.78375.436243401553964151.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <153989603841.78375.436243401553964151.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 03:53:58PM -0500, Bjorn Helgaas wrote: > Change the AER service driver so it binds to *all* PCIe Ports, including > Switch Upstream and Downstream Ports. Enable AER error reporting for all > these Ports, but not for any children. I'm looking at this again and think enabling/disabling error reporting for ports is the responsibility of the port driver, not the AER service. The following should do the same as this patch, but without making AER driver handle non-root ports. The report enabling/disabling functions are already stubbed for '!CONFIG_PCIE_AER' and have checks for aer_cap and firmware first. A real patch for this could even make this remove all the aer specific error report enabling, so it'd be a net-loss in code lines. :) --- diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 0acca3596807..f129a33c8303 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -122,12 +122,13 @@ static int pcie_portdrv_probe(struct pci_dev *dev, pm_runtime_put_autosuspend(&dev->dev); pm_runtime_allow(&dev->dev); } - + pci_enable_pcie_error_reporting(dev); return 0; } static void pcie_portdrv_remove(struct pci_dev *dev) { + pci_disable_pcie_error_reporting(dev); if (pci_bridge_d3_possible(dev)) { pm_runtime_forbid(&dev->dev); pm_runtime_get_noresume(&dev->dev); --