Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci - Don't print TPH requester's ST Table Size if t...
details: https://anonhg.NetBSD.org/src/rev/b8993928b5e4
branches: trunk
changeset: 433769:b8993928b5e4
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Oct 03 06:46:09 2018 +0000
description:
- Don't print TPH requester's ST Table Size if the ST table location field
is not PCI_TPH_REQ_STTBLLOC_TPHREQ because the size field is only applicaple
for PCI_TPH_REQ_STTBLLOC_TPHREQ case.
- Add comment.
diffstat:
sys/dev/pci/pci_subr.c | 12 +++++++-----
sys/dev/pci/pcireg.h | 6 +++---
2 files changed, 10 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r 709750150be2 -r b8993928b5e4 sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c Wed Oct 03 06:02:33 2018 +0000
+++ b/sys/dev/pci/pci_subr.c Wed Oct 03 06:46:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.204 2018/09/27 07:09:29 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.205 2018/10/03 06:46:09 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.204 2018/09/27 07:09:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.205 2018/10/03 06:46:09 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -3538,7 +3538,7 @@
pci_conf_print_tph_req_cap(const pcireg_t *regs, int extcapoff)
{
pcireg_t reg;
- int size, i, j;
+ int size = 0, i, j;
uint8_t sttbloc;
printf("\n TPH Requester Extended Capability\n");
@@ -3552,8 +3552,10 @@
sttbloc = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLLOC);
printf(" ST Table Location: %s\n",
pci_conf_print_tph_req_cap_sttabloc(sttbloc));
- size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1;
- printf(" ST Table Size: %d\n", size);
+ if (sttbloc == PCI_TPH_REQ_STTBLLOC_TPHREQ) {
+ size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1;
+ printf(" ST Table Size: %d\n", size);
+ }
reg = regs[o2i(extcapoff + PCI_TPH_REQ_CTL)];
printf(" TPH Requester Control register: 0x%08x\n", reg);
diff -r 709750150be2 -r b8993928b5e4 sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Wed Oct 03 06:02:33 2018 +0000
+++ b/sys/dev/pci/pcireg.h Wed Oct 03 06:46:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcireg.h,v 1.141 2018/09/27 07:09:29 msaitoh Exp $ */
+/* $NetBSD: pcireg.h,v 1.142 2018/10/03 06:46:09 msaitoh Exp $ */
/*
* Copyright (c) 1995, 1996, 1999, 2000
@@ -1186,8 +1186,8 @@
uint32_t pci_msix_vector_control;
};
#define PCI_MSIX_VECTCTL_MASK __BIT(0)
-#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16)
-#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24)
+#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16) /* ST lower */
+#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24) /* ST upper */
/* Max number of MSI-X vectors. See PCI-SIG specification. */
#define PCI_MSIX_MAX_VECTORS 2048
Home |
Main Index |
Thread Index |
Old Index