mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Betty Dall <betty.dall@hp.com>
To: rjw@sisk.pl, bhelgaas@google.com, gong.chen@linux.intel.com,
	greg.pearson@hp.com
Cc: ying.huang@intel.com, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Betty Dall <betty.dall@hp.com>
Subject: [PATCH v3 6/6] PCI/AER: Provide reset_link for firmware first root port
Date: Thu,  6 Jun 2013 12:10:51 -0600	[thread overview]
Message-ID: <1370542251-27387-7-git-send-email-betty.dall@hp.com> (raw)
In-Reply-To: <1370542251-27387-1-git-send-email-betty.dall@hp.com>

The firmware first path does not install the aerdrv root port
service driver, so the firmware first root port does not have
a reset_link callback. When a firmware first root port does not have
a reset_link callback, use a new default reset_link similar to what
we already do for the default_downstream_reset_link(). The firmware
first default reset_link brings the root port out of SBR if firmware
left it in SBR.

Changes since v1:
Removed incorrect setting of p2p_ctrl after the read.

Changes since v2:
Treat the default case for a Root Port the same as the existing
default case for a Downstream Link.

Signed-off-by: Betty Dall <betty.dall@hp.com>
---

 drivers/pci/pcie/aer/aerdrv_core.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)


diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 8ec8b4f..cb29c04 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -400,16 +400,16 @@ void aer_do_secondary_bus_reset(struct pci_dev *dev)
 }
 
 /**
- * default_downstream_reset_link - default reset function for Downstream Port
- * @dev: pointer to downstream port's pci_dev data structure
+ * default_reset_link - default reset function
+ * @dev: pointer to pci_dev data structure
  *
- * Invoked when performing link reset at Downstream Port w/ no aer driver.
+ * Invoked when performing link reset on a Downstream Port or a
+ * Root Port with no aer driver.
  */
-static pci_ers_result_t default_downstream_reset_link(struct pci_dev *dev)
+static pci_ers_result_t default_reset_link(struct pci_dev *dev)
 {
 	aer_do_secondary_bus_reset(dev);
-	dev_printk(KERN_DEBUG, &dev->dev,
-		"Downstream Port link has been reset\n");
+	dev_dbg(&dev->dev, "Link has been reset\n");
 	return PCI_ERS_RESULT_RECOVERED;
 }
 
@@ -458,8 +458,9 @@ static pci_ers_result_t reset_link(struct pci_dev *dev)
 
 	if (driver && driver->reset_link) {
 		status = driver->reset_link(udev);
-	} else if (pci_pcie_type(udev) == PCI_EXP_TYPE_DOWNSTREAM) {
-		status = default_downstream_reset_link(udev);
+	} else if (pci_pcie_type(udev) == PCI_EXP_TYPE_DOWNSTREAM ||
+		pci_pcie_type(udev) == PCI_EXP_TYPE_ROOT_PORT) {
+		status = default_reset_link(udev);
 	} else {
 		dev_printk(KERN_DEBUG, &dev->dev,
 			"no link-reset support at upstream device %s\n",

  parent reply	other threads:[~2013-06-06 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 18:10 [PATCH v3 0/6] PCI/ACPI: Fix firmware first error recovery with root port in reset Betty Dall
2013-06-06 18:10 ` [PATCH v3 1/6] PCI/AER: Don't parse HEST table for non-PCIe devices Betty Dall
2013-06-06 18:10 ` [PATCH v3 2/6] PCI/AER: Factor out HEST device type matching Betty Dall
2013-06-06 18:10 ` [PATCH v3 3/6] PCI/AER: Set dev->__aer_firmware_first only for matching devices Betty Dall
2013-06-06 18:10 ` [PATCH v2 4/6] PCI/ACPI: Move AER severity defines to aer.h Betty Dall
2013-06-06 18:23   ` Joe Perches
2013-06-06 19:28     ` Bjorn Helgaas
2013-06-06 20:19       ` Rafael J. Wysocki
2013-06-06 18:10 ` [PATCH v3 5/6] ACPI/APEI: Force fatal AER severity when bus has been reset Betty Dall
2013-06-06 18:10 ` Betty Dall [this message]
2013-06-06 21:04 ` [PATCH v3 0/6] PCI/ACPI: Fix firmware first error recovery with root port in reset Bjorn Helgaas

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=1370542251-27387-7-git-send-email-betty.dall@hp.com \
    --to=betty.dall@hp.com \
    --cc=bhelgaas@google.com \
    --cc=gong.chen@linux.intel.com \
    --cc=greg.pearson@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=ying.huang@intel.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

all inboxes | Powered by JetHome®