f70ecc1099
So far pcie_get_mbar() has been the only way to retrieve a MBAR. But it's logic does not fit all uses cases as we will see further. The meaning of its parameter "index" is not about BAR index but about a valid Base Address count instead. It's an arbitrary way to index MBARs unrelated to the actual BAR index. While this has proven to be just the function we needed so far, this has not been the case for MSI-X, which one (through BIR info) needs to access the BAR by their actual index. Same as ivshmem in fact, though that one did not generate any bug since it never has IO BARs nor 64bits BARs (so far?). So: - renaming existing pcie_get_mbar() to pcie_probe_mbar(), which is a more relevant name as it indeed probes the BARs to find the nth valid one. - Introducing a new pcie_get_mbar() which this time really asks for the BAR index. - Applying the change where relevant. So all use pcie_probe_mbar() now but MSI-X and ivshmem. Fixes #37444 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> |
||
---|---|---|
.. | ||
endpoint | ||
host | ||
CMakeLists.txt | ||
Kconfig |