/* eeh_report_reset - tell device that slot has been reset  */
static int eeh_report_reset(struct pci_dev *dev, void *userdata)
/* eeh_report_reset - tell device that slot has been reset  */
static int eeh_report_reset(struct pci_dev *dev, void *userdata)
{
	enum pci_ers_result rc, *res = userdata;
	struct pci_driver *driver = dev->driver;
	if (!driver)
		return 0;
	dev->error_state = pci_channel_io_normal;
	eeh_enable_irq(dev);
	if (!driver->err_handler ||
	    !driver->err_handler->slot_reset)
		return 0;
	rc = driver->err_handler->slot_reset(dev);
	if ((*res == PCI_ERS_RESULT_NONE) ||
	    (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc;
	if (*res == PCI_ERS_RESULT_DISCONNECT &&
	     rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
	return 0;
}