Xilinx / dma_ip_drivers

Xilinx QDMA IP Drivers
https://xilinx.github.io/dma_ip_drivers/
581 stars 421 forks source link

save initial device state #105

Open hinxx opened 3 years ago

hinxx commented 3 years ago

It was observed that in case root port supports AER it might request a reset of the secondary bus. In this case devices on that bus need to restore its state to what it was before the reset in order to continue working.

This PR adds a call to save the device state at probe time. This state is then used during error recovery to configure the device back after its PCI(e) control registers have been wiped (i.e. due to bus reset).

Tested on 5.11.0-rc3 with https://lore.kernel.org/linux-pci/20210104230300.1277180-1-kbusch@kernel.org/ applied.

Obsoletes PR #97.