Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci A device except Root Complex integrated has a li...



details:   https://anonhg.NetBSD.org/src/rev/78b350b1fcbd
branches:  trunk
changeset: 823793:78b350b1fcbd
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue May 09 11:17:07 2017 +0000

description:
A device except Root Complex integrated has a link, so print link related
registers on device except Root Complex Integrated Endpoint and Root Complex
Event Collector.

diffstat:

 sys/dev/pci/pci_subr.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r e8fdffaade8d -r 78b350b1fcbd sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c    Tue May 09 11:14:16 2017 +0000
+++ b/sys/dev/pci/pci_subr.c    Tue May 09 11:17:07 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_subr.c,v 1.179 2017/04/27 04:26:12 msaitoh Exp $   */
+/*     $NetBSD: pci_subr.c,v 1.180 2017/05/09 11:17:07 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.179 2017/04/27 04:26:12 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.180 2017/05/09 11:17:07 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1648,7 +1648,7 @@
 {
        pcireg_t reg; /* for each register */
        pcireg_t val; /* for each bitfield */
-       bool check_link = false;
+       bool check_link = true;
        bool check_slot = false;
        bool check_rootport = false;
        unsigned int pciever;
@@ -1664,15 +1664,12 @@
        switch ((reg & 0x00f00000) >> 20) {
        case PCIE_XCAP_TYPE_PCIE_DEV:   /* 0x0 */
                printf("PCI Express Endpoint device\n");
-               check_link = true;
                break;
        case PCIE_XCAP_TYPE_PCI_DEV:    /* 0x1 */
                printf("Legacy PCI Express Endpoint device\n");
-               check_link = true;
                break;
        case PCIE_XCAP_TYPE_ROOT:       /* 0x4 */
                printf("Root Port of PCI Express Root Complex\n");
-               check_link = true;
                check_slot = true;
                check_rootport = true;
                break;
@@ -1693,10 +1690,12 @@
                break;
        case PCIE_XCAP_TYPE_ROOT_INTEP: /* 0x9 */
                printf("Root Complex Integrated Endpoint\n");
+               check_link = false;
                break;
        case PCIE_XCAP_TYPE_ROOT_EVNTC: /* 0xa */
+               printf("Root Complex Event Collector\n");
+               check_link = false;
                check_rootport = true;
-               printf("Root Complex Event Collector\n");
                break;
        default:
                printf("unknown\n");



Home | Main Index | Thread Index | Old Index