reprobing BAR sizes and capabilities after a FLR?
Hi all,
I've just been talking to some firmware developers that were a little surprised that Linux does not reprobe BAR sizes after a FLR. I looked at our code and we do not reprobe anything at all after a FLR. Is it a good assumption that a devices comes back in exactly the same state after an FLR?
Quoted 8 lines · Christoph Hellwig
Hi all,
I've just been talking to some firmware developers that were a little surprised that Linux does not reprobe BAR sizes after a FLR. I looked at our code and we do not reprobe anything at all after a FLR. Is it a good assumption that a devices comes back in exactly the same state after an FLR?
What's the use case for BAR size changing? I do remember that code was saving the assigned BAR values.
I don't think FLR can be treated as a full enumeration.
[+cc Alex]
Quoted 7 lines · Christoph Hellwig
Hi all,
I've just been talking to some firmware developers that were a little surprised that Linux does not reprobe BAR sizes after a FLR. I looked at our code and we do not reprobe anything at all after a FLR. Is it a good assumption that a devices comes back in exactly the same state after an FLR?
I am a little nervous about the fact that we don't reprobe devices after reset because the reset may cause the device to load new firmware, which may cause arbitrary changes (device type, number and size of BARs, etc). FLR is a little more restrictive than Conventional Reset, e.g., FLR must not affect the link state, so maybe it's safer to assume BAR sizes are unchanged. But I'm not at all confident about that.
I mooted the idea of reprobing after reset, but that would break higher level software that isn't prepared to see hotplug-like events caused by reset, so haven't gone that direction (yet).
Bjorn