@@ -28,6 +28,14 @@ static pci_ers_result_t adf_error_detected(struct pci_dev *pdev,
return PCI_ERS_RESULT_DISCONNECT;
}
+ if (accel_dev->hw_device->exit_arb) {
+ dev_info(&pdev->dev, "Disabling arbitration\n");
+ accel_dev->hw_device->exit_arb(accel_dev);
+ }
+ adf_error_notifier(accel_dev);
+ adf_pf2vf_notify_fatal_error(accel_dev);
+ pci_clear_master(pdev);
+
if (state == pci_channel_io_perm_failure) {
dev_err(&pdev->dev, "Can't recover from device error\n");
return PCI_ERS_RESULT_DISCONNECT;
@@ -111,9 +119,18 @@ static void adf_device_reset_worker(struct work_struct *work)
container_of(work, struct adf_reset_dev_data, reset_work);
struct adf_accel_dev *accel_dev = reset_data->accel_dev;
unsigned long wait_jiffies = msecs_to_jiffies(10000);
+ struct pci_dev *pdev = accel_to_pci_dev(accel_dev);
struct adf_sriov_dev_data sriov_data;
adf_dev_restarting_notify(accel_dev);
+
+ /*
+ * re-enable device to support pf/vf comms as it would be disabled
+ * in the detect function of aer driver
+ */
+ if (!pdev->is_busmaster)
+ pci_set_master(pdev);
+
if (adf_dev_restart(accel_dev)) {
/* The device hanged and we can't restart it so stop here */
dev_err(&GET_DEV(accel_dev), "Restart device failed\n");