/* This function is called after a PCI bus error affecting this device has been detected.  */
static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
/* This function is called after a PCI bus error affecting this device has been detected.  */
static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
{
	struct adapter *adapter = pci_get_drvdata(pdev);
	int ret;
	if (state == pci_channel_io_perm_failure)
		return PCI_ERS_RESULT_DISCONNECT;
	ret = t3_adapter_error(adapter, 0);
	return PCI_ERS_RESULT_NEED_RESET;
}