Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a50f144fc6081269468abf79e1907c6669bef22 Commit: 2a50f144fc6081269468abf79e1907c6669bef22 Parent: 638799b33586339ac007b0fef497a15d81a271aa Author: Linas Vepstas <[EMAIL PROTECTED]> AuthorDate: Sat Nov 3 07:27:50 2007 +1100 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Thu Nov 8 14:15:32 2007 +1100
[POWERPC] EEH: Drivers that need reset trump others Bugfix: if a driver controlling one part of a multi-function PCI card has asked for a reset, honor that request above all others. Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- arch/powerpc/platforms/pseries/eeh_driver.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 6e631b5..57e025e 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -105,9 +105,10 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata) 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(struct pci_dev *dev, void *userdata) 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; } /** - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html