Loading drivers/pci/pcie/aer/aerdrv.h +4 −1 Original line number Diff line number Diff line Loading @@ -87,6 +87,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_NO_AER_DRIVER) return PCI_ERS_RESULT_NO_AER_DRIVER; if (new == PCI_ERS_RESULT_NONE) return orig; Loading @@ -97,7 +100,7 @@ static inline pci_ers_result_t merge_result(enum pci_ers_result orig, break; case PCI_ERS_RESULT_DISCONNECT: if (new == PCI_ERS_RESULT_NEED_RESET) orig = new; orig = PCI_ERS_RESULT_NEED_RESET; break; default: break; Loading drivers/pci/pcie/aer/aerdrv_core.c +18 −4 Original line number Diff line number Diff line Loading @@ -232,13 +232,27 @@ static int report_error_detected(struct pci_dev *dev, void *data) 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); } result_data->result = merge_result(result_data->result, vote); out: device_unlock(&dev->dev); return 0; } Loading include/linux/pci.h +3 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,9 @@ enum pci_ers_result { /* Device driver is fully recovered and operational */ PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, /* No AER capabilities registered for the driver */ PCI_ERS_RESULT_NO_AER_DRIVER = (__force pci_ers_result_t) 6, }; /* PCI bus error event callbacks */ Loading Loading
drivers/pci/pcie/aer/aerdrv.h +4 −1 Original line number Diff line number Diff line Loading @@ -87,6 +87,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_NO_AER_DRIVER) return PCI_ERS_RESULT_NO_AER_DRIVER; if (new == PCI_ERS_RESULT_NONE) return orig; Loading @@ -97,7 +100,7 @@ static inline pci_ers_result_t merge_result(enum pci_ers_result orig, break; case PCI_ERS_RESULT_DISCONNECT: if (new == PCI_ERS_RESULT_NEED_RESET) orig = new; orig = PCI_ERS_RESULT_NEED_RESET; break; default: break; Loading
drivers/pci/pcie/aer/aerdrv_core.c +18 −4 Original line number Diff line number Diff line Loading @@ -232,13 +232,27 @@ static int report_error_detected(struct pci_dev *dev, void *data) 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); } result_data->result = merge_result(result_data->result, vote); out: device_unlock(&dev->dev); return 0; } Loading
include/linux/pci.h +3 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,9 @@ enum pci_ers_result { /* Device driver is fully recovered and operational */ PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, /* No AER capabilities registered for the driver */ PCI_ERS_RESULT_NO_AER_DRIVER = (__force pci_ers_result_t) 6, }; /* PCI bus error event callbacks */ Loading