]> mj.ucw.cz Git - pciutils.git/commitdiff
Fix inconsistent bus centric view between the sysfs and proc methods
authorYu Zhao <yu.zhao@intel.com>
Sun, 4 Jan 2009 08:03:45 +0000 (16:03 +0800)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Jan 2009 21:57:51 +0000 (22:57 +0100)
The vendor and device IDs may be different when using sysfs and proc
methods with bus centric view enabled. The sysfs method reads the IDs
from the configuration space rather than uses the values from sysfs
entries. But the proc method always uses values from the proc files.
This fix makes the proc method use the values from the configuration
space too for bus centric view.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
lib/proc.c

index bf877c4b2fa697685eef645b94c306d0659cf876..e9ca24d019f40f93bcc40fd0136dd4caa921fafb 100644 (file)
@@ -97,10 +97,10 @@ proc_scan(struct pci_access *a)
       d->func = PCI_FUNC(dfn & 0xff);
       d->vendor_id = vend >> 16U;
       d->device_id = vend & 0xffff;
-      known = PCI_FILL_IDENT;
+      known = 0;
       if (!a->buscentric)
        {
-         known |= PCI_FILL_IRQ | PCI_FILL_BASES;
+         known |= PCI_FILL_IDENT | PCI_FILL_IRQ | PCI_FILL_BASES;
          if (cnt >= 10)
            known |= PCI_FILL_ROM_BASE;
          if (cnt >= 17)