]> mj.ucw.cz Git - pciutils.git/commitdiff
Corrected masking of hdr_type
authorMartin Mares <mj@ucw.cz>
Fri, 26 Dec 2003 23:53:07 +0000 (23:53 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:12 +0000 (14:18 +0200)
* 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
lib/proc.c

index d192e15339eefb484999e02f039525a45c265b3a..3527b7ad72444b82916669f2ec996742cd041334 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-27  Martin Mares  <mj@ucw.cz>
+
+       * 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  <mj@ucw.cz>
 
        Updated the FreeBSD port. Thanks to Samy Al Bahra <samy@kerneled.com>
index 7a1191da55af2df93a63676b58fd44e5cf2aa791..d46e5cba4aba1e4dd0bd3c43c85b3b29a3a86862 100644 (file)
@@ -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)
        {