Hi,
is there a reason why the mptable creation uses dev_find_slot() to find the bridges instead of dev_find_device()? Since it does not even check whether the device it finds is the one it wants this sounds rather dangerous.
Taking the PCI_CLASS field into regard, it should be possible to search for all bridges in the system and generate the necessary mptable entries from the information gathered from the devices (SUBORDINATE_BUS, SECONDARY_BUS)
Am I digging in the dark?
Stefan