From 2240db8ccdfadb8083d082051af448ffff2d180b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 26 Dec 2003 23:53:07 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ lib/proc.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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) { -- 2.39.5