From 8306713d99ae3a5ae6e31643bf0c5cbaa154d879 Mon Sep 17 00:00:00 2001 From: msaitoh Date: Wed, 17 Apr 2013 08:07:40 +0000 Subject: [PATCH] Don't check whether PCIe Slot Control Register is all 0 or not. For example, 82801I PCI Express Port #1 (devid 0x2940) is really Root Port and it has the Root Control Register and the default value is 0 (the document say so and really 0 (Tested with my machine)). --- sys/dev/pci/pci_subr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 2e516c99271b..fbbe7d1c33d9 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.101 2013/04/17 06:31:15 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.102 2013/04/17 08:07:40 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.101 2013/04/17 06:31:15 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.102 2013/04/17 08:07:40 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -1094,8 +1094,7 @@ pci_conf_print_pcie_cap(const pcireg_t *regs, int capoff) (reg & PCI_PCIE_LCSR_LINK_AUTO_BW) != 0 ? "on" : "off"); /* XXX Is this check right? */ - if ((check_slot == true) - && ((regs[o2i(capoff + 0x18)] & 0x07ff) != 0)) { + if (check_slot == true) { /* Slot Capability Register */ reg = regs[o2i(capoff + PCI_PCIE_SLCAP)]; printf(" Slot Capability Register: %08x\n", reg);