From: Bjorn Helgaas Date: Wed, 28 Nov 2012 18:39:19 +0000 (-0700) Subject: Merge branch 'pci/misc' into next X-Git-Tag: v3.8-rc1~128^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c282db1656733c1267e6af4c22179bb04faf2ef;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'pci/misc' into next * pci/misc: PCI/AER: Report success only when every device has AER-aware driver Conflicts: drivers/pci/pcie/aer/aerdrv_core.c --- 3c282db1656733c1267e6af4c22179bb04faf2ef diff --cc drivers/pci/pcie/aer/aerdrv_core.c index af4e31cd3a3b6,eb2f19a9c3cd3..421bbc5fee324 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@@ -232,14 -231,27 +232,28 @@@ static int report_error_detected(struc dev->driver ? "no AER-aware driver" : "no driver"); } - goto out; + + /* + * If there's any device in the subtree that does not + * have an error_detected callback, returning + * PCI_ERS_RESULT_NO_AER_DRIVER prevents calling of + * the subsequent mmio_enabled/slot_reset/resume + * callbacks of "any" device in the subtree. All the + * devices in the subtree are left in the error state + * without recovery. + */ + + if (!(dev->hdr_type & PCI_HEADER_TYPE_BRIDGE)) + vote = PCI_ERS_RESULT_NO_AER_DRIVER; + else + vote = PCI_ERS_RESULT_NONE; + } else { + err_handler = dev->driver->err_handler; + vote = err_handler->error_detected(dev, result_data->state); } - err_handler = dev->driver->err_handler; - vote = err_handler->error_detected(dev, result_data->state); result_data->result = merge_result(result_data->result, vote); - out: + device_unlock(&dev->dev); return 0; }