From: Martin Mares Date: Fri, 26 Dec 2003 23:53:07 +0000 (+0000) Subject: Corrected masking of hdr_type X-Git-Tag: v3.0.0~144 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2240db8ccdfadb8083d082051af448ffff2d180b;p=pciutils.git Corrected masking of hdr_type * lib/proc.c (proc_scan): When reading the header type, don't forget to clear the topmost bit indicating that the device has multiple functions. Grabbed from Debian patches. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-21 --- diff --git a/ChangeLog b/ChangeLog index d192e15..3527b7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-27 Martin Mares + + * lib/proc.c (proc_scan): When reading the header type, don't + forget to clear the topmost bit indicating that the device has + multiple functions. Grabbed from Debian patches. + 2003-12-27 Martin Mares Updated the FreeBSD port. Thanks to Samy Al Bahra diff --git a/lib/proc.c b/lib/proc.c index 7a1191d..d46e5cb 100644 --- a/lib/proc.c +++ b/lib/proc.c @@ -155,7 +155,7 @@ proc_scan(struct pci_access *a) d->func = PCI_FUNC(dfn & 0xff); d->vendor_id = vend >> 16U; d->device_id = vend & 0xffff; - d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE); + d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f; known = PCI_FILL_IDENT; if (!a->buscentric) {