On Fri, 2021-02-12 at 14:52 +0200, mika.westerberg@xxxxxxxxxxxxxxx wrote: > Hi, > > On Thu, Feb 11, 2021 at 05:45:20PM +0000, Sergei Miroshnichenko > wrote: > > What a pity. Yes, please, I would of course like to take a look why > > that happened, and compare, what went wrong (before and after the > > hotplug: lspci -tv, dmesg -t and /proc/iomem with /proc/ioports, if > > it > > wouldn't be too much trouble). > > I just sent these logs to you in a separate email. Let me know if you > need more. Thanks, from them it's clear that the "full rescan" apprach currently doesn't involve the pci_bus_distribute_available_resources(), that's why hot-adding a second nested switch breaks: because of non- distributed free bus numbers. The first switch seems was hot-added just fine, with BARs being moved a bit. This is to be fixed in v10, along with the mpt3sas+pci_dev_is_disconnected() moment Lukas had found (thanks Lukas!), CONFIG_DEBUG_LOCK_ALLOC macro, and a more useful debug messages. Serge