X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fcaps.c;h=039c86f7e206a6bf5ec7a7bb0b85491a65eaacfa;hb=4c2b4b1bfa348ea22a22f4ca271bc13096ab3e78;hp=c3b918059fe12d0e3b287b183ddf0c8c59461220;hpb=e6f95ee78be139be5f0b2ab3fbeb630f845f701f;p=pciutils.git diff --git a/lib/caps.c b/lib/caps.c index c3b9180..039c86f 100644 --- a/lib/caps.c +++ b/lib/caps.c @@ -80,17 +80,16 @@ pci_scan_ext_caps(struct pci_dev *d) while (where); } -unsigned int +void pci_scan_caps(struct pci_dev *d, unsigned int want_fields) { - if ((want_fields & PCI_FILL_EXT_CAPS) && !(d->known_fields & PCI_FILL_CAPS)) + if (want_fields & PCI_FILL_EXT_CAPS) want_fields |= PCI_FILL_CAPS; - if (want_fields & PCI_FILL_CAPS) + if (want_fill(d, want_fields, PCI_FILL_CAPS)) pci_scan_trad_caps(d); - if (want_fields & PCI_FILL_EXT_CAPS) + if (want_fill(d, want_fields, PCI_FILL_EXT_CAPS)) pci_scan_ext_caps(d); - return want_fields; } void @@ -129,7 +128,7 @@ pci_find_cap_nr(struct pci_dev *d, unsigned int id, unsigned int type, unsigned int target = (cap_number ? *cap_number : 0); unsigned int index = 0; - pci_fill_info_v35(d, ((type == PCI_CAP_NORMAL) ? PCI_FILL_CAPS : PCI_FILL_EXT_CAPS)); + pci_fill_info_v38(d, ((type == PCI_CAP_NORMAL) ? PCI_FILL_CAPS : PCI_FILL_EXT_CAPS)); for (c=d->first_cap; c; c=c->next) {