All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Jon Derrick <jonathan.derrick@intel.com>,
	Dongdong Liu <liudongdong3@huawei.com>,
	Sinan Kaya <okaya@kernel.org>,
	Oza Pawandeep <poza@codeaurora.org>,
	Matthew Wilcox <willy@infradead.org>,
	Lukas Wunner <lukas@wunner.de>, Christoph Hellwig <hch@lst.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] PCI/AER: Enable error reporting for all ports
Date: Thu, 18 Oct 2018 17:03:13 -0600	[thread overview]
Message-ID: <20181018230312.GB23301@localhost.localdomain> (raw)
In-Reply-To: <153989603841.78375.436243401553964151.stgit@bhelgaas-glaptop.roam.corp.google.com>

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);
--

  reply	other threads:[~2018-10-18 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 20:53 [PATCH v4] PCI/AER: Enable error reporting for all ports Bjorn Helgaas
2018-10-18 23:03 ` Keith Busch [this message]
2018-10-19  1:11   ` Bjorn Helgaas
2018-10-19 14:58     ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181018230312.GB23301@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=jonathan.derrick@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=okaya@kernel.org \
    --cc=poza@codeaurora.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.