On Mon, Mar 04, 2024 at 04:17:04PM +0200, Andy Shevchenko wrote: > On Mon, Mar 04, 2024 at 04:09:49PM +0200, Andy Shevchenko wrote: > > On Mon, Mar 04, 2024 at 02:59:57PM +0100, Hans de Goede wrote: > > > On 3/4/24 1:13 PM, Shinichiro Kawasaki wrote: > > > > On Mar 04, 2024 / 12:04, Hans de Goede wrote: ... > > > > Thanks for sharing the insights. > > > > > > Looking closer at the actual unhiding I don't think accessing func 0 > > > is the problem. The unhiding is always done on function 0 even when > > > retreiving the bar for function 2 (the SPI function). > > > > > > So taking that into account, as mentioned in the bugzilla, I think > > > the problem is probing the other functions (1, 3-7) by calling > > > pci_scan_single_device() on them. > > > > So, why we can't simply call pci_dev_present() on the function in a loop? > > pci_device_is_present() > > > Will be even simpler fix, no? Oh, it requires a PCI device structure which is probably is not there until we call the pci_scan_single_device()... -- With Best Regards, Andy Shevchenko