Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci When parsing Enhanced Allocation entries, use th...



details:   https://anonhg.NetBSD.org/src/rev/65b18b7d02d0
branches:  trunk
changeset: 970357:65b18b7d02d0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Mar 21 17:09:29 2020 +0000

description:
When parsing Enhanced Allocation entries, use the correct calulation for
finding the next entry.

diffstat:

 sys/dev/pci/pci_subr.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 782beb7a765d -r 65b18b7d02d0 sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c    Sat Mar 21 17:00:47 2020 +0000
+++ b/sys/dev/pci/pci_subr.c    Sat Mar 21 17:09:29 2020 +0000
@@ -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 @@
                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);
        }
 }
 



Home | Main Index | Thread Index | Old Index