summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie/err.c
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-09-20 18:27:15 +0200
committerBjorn Helgaas <bhelgaas@google.com>2018-10-02 23:04:40 +0200
commit7b42d97e99d3a2babffd1b3456ded08b54981538 (patch)
tree72ad40cff66b605b01cbf56daaf744e8f8cb13c8 /drivers/pci/pcie/err.c
parentPCI/ERR: Simplify broadcast callouts (diff)
downloadlinux-7b42d97e99d3a2babffd1b3456ded08b54981538.tar.xz
linux-7b42d97e99d3a2babffd1b3456ded08b54981538.zip
PCI/ERR: Always report current recovery status for udev
A device still participates in error recovery even if it doesn't have the error callbacks. Always provide the status for user event watchers. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Sinan Kaya <okaya@kernel.org>
Diffstat (limited to 'drivers/pci/pcie/err.c')
-rw-r--r--drivers/pci/pcie/err.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index 362a717c831a..31e8a4314384 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -70,9 +70,8 @@ static int report_error_detected(struct pci_dev *dev,
} else {
err_handler = dev->driver->err_handler;
vote = err_handler->error_detected(dev, state);
- pci_uevent_ers(dev, PCI_ERS_RESULT_NONE);
}
-
+ pci_uevent_ers(dev, vote);
*result = merge_result(*result, vote);
device_unlock(&dev->dev);
return 0;
@@ -140,8 +139,8 @@ static int report_resume(struct pci_dev *dev, void *data)
err_handler = dev->driver->err_handler;
err_handler->resume(dev);
- pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
out:
+ pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
device_unlock(&dev->dev);
return 0;
}