Skip to contentSkip to conversation

Seeking advice: Restoring MSI-X after device reset

DISCUSSION Jimmie Mayfield 1 participant 1 message May 14, 2013 PCI

lore
Share & tools
lore
#0 lore raw

Hi. I'm looking for advice on how a device driver should handle restoring MSI-X following a device reset. Here's my situation: we have an MSI-X-capable device that for various reasons might be reset by the device driver. One of the features of this device is that a reset also wipes out the MSI-X structure in MMIO address space.

So this leads to my question: what is the recommended way for the driver to restore MSI-X following such a reset?

I suppose one (perhaps naive) way would be to do something like this:
free all IRQs
pci_disable_msix();
reset device
pci_enable_msix()
request new IRQs

That seems unclean. Is there a better way?

JM