mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
ixgbevf: restore hw_addr on resume or error
Restore adapter->hw.hw_addr after handling an error, or a resume operation to make sure we can access the registers. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
aeb4c73100
commit
26403b7fde
@ -3851,6 +3851,8 @@ static int ixgbevf_resume(struct pci_dev *pdev)
|
|||||||
dev_err(&pdev->dev, "Cannot enable PCI device from suspend\n");
|
dev_err(&pdev->dev, "Cannot enable PCI device from suspend\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adapter->hw.hw_addr = adapter->io_addr;
|
||||||
smp_mb__before_atomic();
|
smp_mb__before_atomic();
|
||||||
clear_bit(__IXGBEVF_DISABLED, &adapter->state);
|
clear_bit(__IXGBEVF_DISABLED, &adapter->state);
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
@ -4285,6 +4287,7 @@ static pci_ers_result_t ixgbevf_io_slot_reset(struct pci_dev *pdev)
|
|||||||
return PCI_ERS_RESULT_DISCONNECT;
|
return PCI_ERS_RESULT_DISCONNECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adapter->hw.hw_addr = adapter->io_addr;
|
||||||
smp_mb__before_atomic();
|
smp_mb__before_atomic();
|
||||||
clear_bit(__IXGBEVF_DISABLED, &adapter->state);
|
clear_bit(__IXGBEVF_DISABLED, &adapter->state);
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
Loading…
Reference in New Issue
Block a user