Module Name: src
Committed By: thorpej
Date: Sat Mar 21 17:09:29 UTC 2020
Modified Files:
src/sys/dev/pci: pci_subr.c
Log Message:
When parsing Enhanced Allocation entries, use the correct calulation for
finding the next entry.
To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/sys/dev/pci/pci_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.221 src/sys/dev/pci/pci_subr.c:1.222
--- src/sys/dev/pci/pci_subr.c:1.221 Sat Jan 25 08:13:39 2020
+++ src/sys/dev/pci/pci_subr.c Sat Mar 21 17:09:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.221 2020/01/25 08:13:39 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.222 2020/03/21 17:09:29 thorpej Exp $ */
/*
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.221 2020/01/25 08:13:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.222 2020/03/21 17:09:29 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -2566,9 +2566,7 @@ pci_conf_print_ea_cap(const pcireg_t *re
printf(" range: 0x%016" PRIx64 "-0x%016" PRIx64
"\n", base, base + offset);
- entoff += 4;
- entoff += baseis64 ? 8 : 4;
- entoff += offsetis64 ? 8 : 4;
+ entoff += 4 + (4 * entry_size);
}
}