mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix pci-e port driver slot_reset bad default return value
@ 2009-04-30  6:48 Zhang, Yanmin
  2009-05-12  0:00 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Yanmin @ 2009-04-30  6:48 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-kernel, linux-pci

When an upstream port reports an AER error to root port, kernel
starts error recovery procedures. The default return value of
function pcie_portdrv_slot_reset is PCI_ERS_RESULT_NONE. If all
port service drivers of the downstream port under the upstream
port have no slot_reset method in pci_error_handlers, aer recovery
would stop without resume. Below patch against 2.6.30-rc3 fixes it.

Signed-off-by: Zhang Yanmin <yanmin.zhang@linux.intel.com>

---

diff -Nraup linux-2.6.30-rc3/drivers/pci/pcie/aer/aerdrv.h linux-2.6.30-rc3_aerport/drivers/pci/pcie/aer/aerdrv.h
--- linux-2.6.30-rc3/drivers/pci/pcie/aer/aerdrv.h	2009-04-29 15:51:28.000000000 +0800
+++ linux-2.6.30-rc3_aerport/drivers/pci/pcie/aer/aerdrv.h	2009-04-30 14:06:58.000000000 +0800
@@ -95,6 +95,9 @@ struct aer_broadcast_data {
 static inline pci_ers_result_t merge_result(enum pci_ers_result orig,
 		enum pci_ers_result new)
 {
+	if (new == PCI_ERS_RESULT_NONE)
+		return orig;
+
 	switch (orig) {
 	case PCI_ERS_RESULT_CAN_RECOVER:
 	case PCI_ERS_RESULT_RECOVERED:
diff -Nraup linux-2.6.30-rc3/drivers/pci/pcie/portdrv_pci.c linux-2.6.30-rc3_aerport/drivers/pci/pcie/portdrv_pci.c
--- linux-2.6.30-rc3/drivers/pci/pcie/portdrv_pci.c	2009-04-29 15:52:23.000000000 +0800
+++ linux-2.6.30-rc3_aerport/drivers/pci/pcie/portdrv_pci.c	2009-04-30 14:02:25.000000000 +0800
@@ -200,7 +200,7 @@ static int slot_reset_iter(struct device
 
 static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
 {
-	pci_ers_result_t status = PCI_ERS_RESULT_NONE;
+	pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
 	int retval;
 
 	/* If fatal, restore cfg space for possible link reset at upstream */



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix pci-e port driver slot_reset bad default return value
  2009-04-30  6:48 [PATCH] Fix pci-e port driver slot_reset bad default return value Zhang, Yanmin
@ 2009-05-12  0:00 ` Jesse Barnes
  0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2009-05-12  0:00 UTC (permalink / raw)
  To: Zhang, Yanmin; +Cc: linux-kernel, linux-pci

On Thu, 30 Apr 2009 14:48:29 +0800
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com> wrote:

> When an upstream port reports an AER error to root port, kernel
> starts error recovery procedures. The default return value of
> function pcie_portdrv_slot_reset is PCI_ERS_RESULT_NONE. If all
> port service drivers of the downstream port under the upstream
> port have no slot_reset method in pci_error_handlers, aer recovery
> would stop without resume. Below patch against 2.6.30-rc3 fixes it.
> 
> Signed-off-by: Zhang Yanmin <yanmin.zhang@linux.intel.com>

This one is in my for-linus branch now.  Thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-12  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30  6:48 [PATCH] Fix pci-e port driver slot_reset bad default return value Zhang, Yanmin
2009-05-12  0:00 ` Jesse Barnes

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®