On Tue, 2013-10-29 at 13:09 +0100, Martin Mares wrote: > Hello! > > > When slot is empty, lspci will report "pcilib: sysfs_fill_slots: > > Couldn't parse entry address 0000:01",this is because address entry will > > only contain domain and bus number when the slot is empty. > > > > [root@uselp6 ~]# cat /sys/bus/pci/slots/U5802.001.RCHB059-P1-C7/address > > 0000:01 > Is this behavior intentional? It does not make much sense to me. > > Have a nice fortnight although I am not a expert in PCI, seems this related to PCI hotplug. And I also found a description in kernel source code " Placeholder slots: In most cases, @pci_bus, @slot_nr will be sufficient to uniquely identify a slot. There is one notable exception - pSeries (rpaphp), where the @slot_nr cannot be determined until a device is actually inserted into the slot. In this scenario, the caller may pass -1 for @slot_nr.The following semantics are imposed when the caller passes @slot_nr == -1. First, we no longer check for an existing %struct pci_slot, as there may be many slots with @slot_nr of -1. The other change in semantics is user-visible, which is the 'address' parameter presented in sysfs will consist solely of a dddd:bb tuple, where dddd is the PCI domain of the %struct pci_bus and bb is the bus number. In other words, the devfn of the 'placeholder' slot will not be displayed. " so when slots are empty in some cases, "address" solely contain dddd:bb tuple. But lspci will originally assume address in dddd:dd:dd tuple. so we should skip dddd:bb case in sysfs_fill_slots -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html