* [PATCH 0/3] powerpc eeh: bug fixes for crashes, bad handling @ 2007-11-02 20:19 Linas Vepstas 2007-11-02 20:25 ` [PATCH 1/3] powerpc eeh: cleanup comments Linas Vepstas 0 siblings, 1 reply; 4+ messages in thread From: Linas Vepstas @ 2007-11-02 20:19 UTC (permalink / raw) To: Paul Mackerras; +Cc: ppc-dev Hi Paul, Please forward upstream the following three tiny patches for EEH bugs, including on crash, and one failure to reset correctly. (I was planning on blasting you many many more patches, involving MSI, but have had nothing but broken hardware for the last few weeks, and so have nothing to show. Dang, cause I needed the msi fixes for 2.6.24. Oh well.) --linas ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] powerpc eeh: cleanup comments 2007-11-02 20:19 [PATCH 0/3] powerpc eeh: bug fixes for crashes, bad handling Linas Vepstas @ 2007-11-02 20:25 ` Linas Vepstas 2007-11-02 20:27 ` [PATCH 2/3]: powerpc eeh: drivers that need reset trump others Linas Vepstas 0 siblings, 1 reply; 4+ messages in thread From: Linas Vepstas @ 2007-11-02 20:25 UTC (permalink / raw) To: Paul Mackerras; +Cc: ppc-dev Clean up commentary, remove dead code. Signed-off-by Linas Vepstas <linas@austin.ibm.com> ---- arch/powerpc/platforms/pseries/eeh_driver.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c =================================================================== --- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:39:18.000000000 -0500 +++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:46:30.000000000 -0500 @@ -113,9 +113,9 @@ static void eeh_report_error(struct pci_ /** * eeh_report_mmio_enabled - tell drivers that MMIO has been enabled * - * Report an EEH error to each device driver, collect up and - * merge the device driver responses. Cumulative response - * passed back in "userdata". + * Tells each device driver that IO ports, MMIO and config space I/O + * are now enabled. Collects up and merges the device driver responses. + * Cumulative response passed back in "userdata". */ static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) @@ -123,8 +123,6 @@ static void eeh_report_mmio_enabled(stru enum pci_ers_result rc, *res = userdata; struct pci_driver *driver = dev->driver; - // dev->error_state = pci_channel_mmio_enabled; - if (!driver || !driver->err_handler || !driver->err_handler->mmio_enabled) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3]: powerpc eeh: drivers that need reset trump others 2007-11-02 20:25 ` [PATCH 1/3] powerpc eeh: cleanup comments Linas Vepstas @ 2007-11-02 20:27 ` Linas Vepstas 2007-11-02 20:29 ` [PATCH 3/3]: powerpc eeh: avoid crash on null device Linas Vepstas 0 siblings, 1 reply; 4+ messages in thread From: Linas Vepstas @ 2007-11-02 20:27 UTC (permalink / raw) To: Paul Mackerras; +Cc: ppc-dev Bugfix: if a driver controlling one part of a multi-function pci card has asked for a reset, honor that request above all othres. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> ---- arch/powerpc/platforms/pseries/eeh_driver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c =================================================================== --- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:46:30.000000000 -0500 +++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:54:27.000000000 -0500 @@ -105,9 +105,10 @@ static void eeh_report_error(struct pci_ return; rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen); + + /* A driver that needs a reset trumps all others */ + if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; if (*res == PCI_ERS_RESULT_NONE) *res = rc; - if (*res == PCI_ERS_RESULT_DISCONNECT && - rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; } /** @@ -129,9 +130,10 @@ static void eeh_report_mmio_enabled(stru return; rc = driver->err_handler->mmio_enabled (dev); + + /* A driver that needs a reset trumps all others */ + if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; if (*res == PCI_ERS_RESULT_NONE) *res = rc; - if (*res == PCI_ERS_RESULT_DISCONNECT && - rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; } /** ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3]: powerpc eeh: avoid crash on null device. 2007-11-02 20:27 ` [PATCH 2/3]: powerpc eeh: drivers that need reset trump others Linas Vepstas @ 2007-11-02 20:29 ` Linas Vepstas 0 siblings, 0 replies; 4+ messages in thread From: Linas Vepstas @ 2007-11-02 20:29 UTC (permalink / raw) To: Paul Mackerras; +Cc: ppc-dev Bugfix: avoid crash if there's no pci device for a given openfirmware node. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> ---- arch/powerpc/platforms/pseries/eeh.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c =================================================================== --- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh.c 2007-10-16 13:55:03.000000000 -0500 +++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c 2007-10-16 14:04:39.000000000 -0500 @@ -186,6 +186,11 @@ static size_t gather_pci_data(struct pci n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); + if (!dev) { + printk(KERN_WARNING "EEH: no PCI device for this of node\n"); + return n; + } + /* Gather bridge-specific registers */ if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); @@ -198,7 +203,7 @@ static size_t gather_pci_data(struct pci } /* Dump out the PCI-X command and status regs */ - cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); + cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); if (cap) { rtas_read_config(pdn, cap, 4, &cfg); n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg); @@ -210,7 +215,7 @@ static size_t gather_pci_data(struct pci } /* If PCI-E capable, dump PCI-E cap 10, and the AER */ - cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_EXP); + cap = pci_find_capability(dev, PCI_CAP_ID_EXP); if (cap) { n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); printk(KERN_WARNING @@ -222,7 +227,7 @@ static size_t gather_pci_data(struct pci printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); } - cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); + cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); if (cap) { n += scnprintf(buf+n, len-n, "pci-e AER:\n"); printk(KERN_WARNING ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-02 20:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-11-02 20:19 [PATCH 0/3] powerpc eeh: bug fixes for crashes, bad handling Linas Vepstas 2007-11-02 20:25 ` [PATCH 1/3] powerpc eeh: cleanup comments Linas Vepstas 2007-11-02 20:27 ` [PATCH 2/3]: powerpc eeh: drivers that need reset trump others Linas Vepstas 2007-11-02 20:29 ` [PATCH 3/3]: powerpc eeh: avoid crash on null device Linas Vepstas
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).