linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: linux-pci@vger.kernel.org
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Pali Rohár" <pali@kernel.org>,
	"Bharat Kumar Gogada" <bharat.kumar.gogada@xilinx.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Yao Hongbo" <yaohongbo@linux.alibaba.com>,
	"Naveen Naidu" <naveennaidu479@gmail.com>
Subject: [PATCH v2 2/2] PCI/AER: Enable AER on Endpoints as well
Date: Mon, 17 Jan 2022 09:03:48 +0100	[thread overview]
Message-ID: <20220117080348.2757180-3-sr@denx.de> (raw)
In-Reply-To: <20220117080348.2757180-1-sr@denx.de>

Currently, the PCIe AER subsystem does not enable AER in the PCIe
Endpoints via the Device Control register. It's only done for the
Root Port and all PCIe Ports in between the Root Port and the
Endpoint(s). Some device drivers enable AER in their PCIe device by
directly calling pci_enable_pcie_error_reporting(). But in most
cases, AER is currently disabled in the PCIe Endpoints.

This patch enables AER on PCIe Endpoints now as well in
set_device_error_reporting(). This will make the ad-hoc calls to
pci_enable_pcie_error_reporting() superfluous.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Pali Rohár <pali@kernel.org>
Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Yao Hongbo <yaohongbo@linux.alibaba.com>
Cc: Naveen Naidu <naveennaidu479@gmail.com>
---
v2:
- New patch

 drivers/pci/pcie/aer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 9fa1f97e5b27..385e2033d7b5 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1216,7 +1216,8 @@ static int set_device_error_reporting(struct pci_dev *dev, void *data)
 	if ((type == PCI_EXP_TYPE_ROOT_PORT) ||
 	    (type == PCI_EXP_TYPE_RC_EC) ||
 	    (type == PCI_EXP_TYPE_UPSTREAM) ||
-	    (type == PCI_EXP_TYPE_DOWNSTREAM)) {
+	    (type == PCI_EXP_TYPE_DOWNSTREAM) ||
+	    (type == PCI_EXP_TYPE_ENDPOINT)) {
 		if (enable)
 			pci_enable_pcie_error_reporting(dev);
 		else
-- 
2.34.1


  parent reply	other threads:[~2022-01-17  8:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  8:03 [PATCH v2 0/2] Fully enable AER Stefan Roese
2022-01-17  8:03 ` [PATCH v2 1/2] PCI/portdrv: Don't disable AER reporting in get_port_device_capability() Stefan Roese
2022-01-17  9:21   ` Pali Rohár
2022-01-17  8:03 ` Stefan Roese [this message]
2022-01-17  9:30   ` [PATCH v2 2/2] PCI/AER: Enable AER on Endpoints as well Pali Rohár
2022-01-17  9:39     ` Stefan Roese

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=20220117080348.2757180-3-sr@denx.de \
    --to=sr@denx.de \
    --cc=bharat.kumar.gogada@xilinx.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=naveennaidu479@gmail.com \
    --cc=pali@kernel.org \
    --cc=yaohongbo@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).