diff options
| author | Bjorn Helgaas <[email protected]> | 2018-04-04 13:27:36 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2018-04-04 13:27:36 -0500 |
| commit | 63d5ce5fc854293a4f479ff6992ef4efe76ac457 (patch) | |
| tree | a8df44b4b1d68716fcb3ca4030b10a18d930edfc /include/linux | |
| parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) | |
| parent | 3ecac020d6dd09259414f423b577347ebee9f533 (diff) | |
Merge branch 'pci/aer'
- move pci_uevent_ers() out of pci.h (Michael Ellerman)
* pci/aer:
PCI/AER: Move pci_uevent_ers() out of pci.h
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 024a1beda008..19c1dbcff0c6 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2280,41 +2280,9 @@ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) return false; } -/** - * pci_uevent_ers - emit a uevent during recovery path of pci device - * @pdev: pci device to check - * @err_type: type of error event - * - */ -static inline void pci_uevent_ers(struct pci_dev *pdev, - enum pci_ers_result err_type) -{ - int idx = 0; - char *envp[3]; - - switch (err_type) { - case PCI_ERS_RESULT_NONE: - case PCI_ERS_RESULT_CAN_RECOVER: - envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY"; - envp[idx++] = "DEVICE_ONLINE=0"; - break; - case PCI_ERS_RESULT_RECOVERED: - envp[idx++] = "ERROR_EVENT=SUCCESSFUL_RECOVERY"; - envp[idx++] = "DEVICE_ONLINE=1"; - break; - case PCI_ERS_RESULT_DISCONNECT: - envp[idx++] = "ERROR_EVENT=FAILED_RECOVERY"; - envp[idx++] = "DEVICE_ONLINE=0"; - break; - default: - break; - } - - if (idx > 0) { - envp[idx++] = NULL; - kobject_uevent_env(&pdev->dev.kobj, KOBJ_CHANGE, envp); - } -} +#if defined(CONFIG_PCIEAER) || defined(CONFIG_EEH) +void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); +#endif /* Provide the legacy pci_dma_* API */ #include <linux/pci-dma-compat.h> |