Commit 7b42d97e authored by Keith Busch's avatar Keith Busch Committed by Bjorn Helgaas

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: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarSinan Kaya <okaya@kernel.org>
parent 542aeb9c
...@@ -70,9 +70,8 @@ static int report_error_detected(struct pci_dev *dev, ...@@ -70,9 +70,8 @@ static int report_error_detected(struct pci_dev *dev,
} else { } else {
err_handler = dev->driver->err_handler; err_handler = dev->driver->err_handler;
vote = err_handler->error_detected(dev, state); 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); *result = merge_result(*result, vote);
device_unlock(&dev->dev); device_unlock(&dev->dev);
return 0; return 0;
...@@ -140,8 +139,8 @@ static int report_resume(struct pci_dev *dev, void *data) ...@@ -140,8 +139,8 @@ static int report_resume(struct pci_dev *dev, void *data)
err_handler = dev->driver->err_handler; err_handler = dev->driver->err_handler;
err_handler->resume(dev); err_handler->resume(dev);
pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
out: out:
pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
device_unlock(&dev->dev); device_unlock(&dev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment