On Thu, Jul 17, 2025 at 12:25 AM Brian Norris <briannorris@xxxxxxxxxxxx> wrote: > > On Wed, Jul 16, 2025 at 09:47:41AM -0700, Brian Norris wrote: > > (2) Even after resolving 1, I'm seeing pci_free_host_bridge() exit with > > a bridge->dev.kboj.kref refcount of 1 in some cases. I don't yet > > have an explanation of that one. > > Ah, well now I have an explanation: > One should always be skeptical of out-of-tree drivers. > > In this case, one of my endpoint drivers was mismanaging a pci_dev_put() > reference count, and that cascades to all its children and links, > including the host bridge. > > Once I fix that (and the aforementioned problem (1)), it seems my > problems go away. > > I'll let a v2 soak in my local environment, and unless I hear some news > from Bartosz about OF_POPULATED to change my mind, I'll send it out > eventually. > > Brian Hi! Sorry for the late reply, I would really like to be able to assist with these changes (although Mani is doing a great job!) I'm currently really busy with other stuff. :( FWIW I just spent 30 minutes looking at the tree as of commit f1536585588b~1 and I am no longer sure what exactly did I refer to when I said that the PCI core clears the OF_POPULATED flag but I'm 100% sure I was facing this issue and seeing OF nodes associated with a device that's registered without this flag. Looking at it again now, it's no longer obvious, I wish I had been more verbose in the commit message. Feel free to try and revert this change, maybe over a year later it's no longer needed (or never was). If it is, we should quickly see some issues triggered by it. Bartosz