A user can issue a pci function level reset to a device using sysfs entry /sys/bus/pci/devices/.../reset. A kernel driver handling the pci device probably would like to know that such a reset has occured, so this patch calls the pci_driver's slot_reset pci_error_handler. Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx> --- drivers/pci/pci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b127fbda..1bfddc5 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3584,6 +3584,12 @@ int pci_reset_function(struct pci_dev *dev) pci_dev_restore(dev); + if (!rc) { + const struct pci_error_handlers *err_handler = dev->driver ? + dev->driver->err_handler : NULL; + if (err_handler && err_handler->slot_reset) + err_handler->slot_reset(dev); + } return rc; } EXPORT_SYMBOL_GPL(pci_reset_function); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html