Module Name: src
Committed By: msaitoh
Date: Fri Oct 2 07:04:17 UTC 2015
Modified Files:
src/sys/dev/pci: pci_subr.c
Log Message:
Fix a bug that the TPH ST Table is wrongly decoded. Found by llvm.
To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 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.135 src/sys/dev/pci/pci_subr.c:1.136
--- src/sys/dev/pci/pci_subr.c:1.135 Fri Oct 2 05:22:53 2015
+++ src/sys/dev/pci/pci_subr.c Fri Oct 2 07:04:17 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.135 2015/10/02 05:22:53 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.136 2015/10/02 07:04:17 msaitoh 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.135 2015/10/02 05:22:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.136 2015/10/02 07:04:17 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -2710,7 +2710,7 @@ pci_conf_print_tph_req_cap(const pcireg_
for (i = 0; i < size ; i += 2) {
reg = regs[o2i(extcapoff + PCI_TPH_REQ_STTBL + i / 2)];
for (j = 0; j < 2 ; j++) {
- uint16_t entry = reg;
+ uint32_t entry = reg;
if (j != 0)
entry >>= 16;