Module Name: src
Committed By: msaitoh
Date: Sat May 24 15:09:32 UTC 2014
Modified Files:
src/sys/dev/pci: pci_subr.c
Log Message:
- Fix calculation of supported max payload size in PCIe device capability
register.
- Fix for PCIE_SLCSR_DLLSCE flag.
- invert PCIE_SLCSR_PCC
To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 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.115 src/sys/dev/pci/pci_subr.c:1.116
--- src/sys/dev/pci/pci_subr.c:1.115 Fri May 23 19:31:23 2014
+++ src/sys/dev/pci/pci_subr.c Sat May 24 15:09:31 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.115 2014/05/23 19:31:23 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.116 2014/05/24 15:09:31 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.115 2014/05/23 19:31:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.116 2014/05/24 15:09:31 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -1013,7 +1013,7 @@ pci_conf_print_pcie_cap(const pcireg_t *
reg = regs[o2i(capoff + PCIE_DCAP)];
printf(" Device Capabilities Register: 0x%08x\n", reg);
printf(" Max Payload Size Supported: %u bytes max\n",
- (unsigned int)(reg & PCIE_DCAP_MAX_PAYLOAD) * 256);
+ 128 << (unsigned int)(reg & PCIE_DCAP_MAX_PAYLOAD));
printf(" Phantom Functions Supported: ");
switch ((reg & PCIE_DCAP_PHANTOM_FUNCS) >> 3) {
case 0x0:
@@ -1237,14 +1237,11 @@ pci_conf_print_pcie_cap(const pcireg_t *
break;
}
printf(" Power Controller Control: ");
- if ((reg & PCIE_SLCSR_PCC) != 0)
- printf("off\n");
- else
- printf("on\n");
+ onoff("Power Controller Control", reg, PCIE_SLCSR_PCC);
if ((reg & PCIE_SLCSR_EIC) != 0)
printf(" Electromechanical Interlock Control\n");
- if ((reg & PCIE_SLCSR_LACS) != 0)
- printf(" Data Link Layer State Changed Enable\n");
+ onoff("Data Link Layer State Changed Enable", reg,
+ PCIE_SLCSR_DLLSCE);
/* Slot Status Register */
printf(" Slot Status Register: %04x\n", reg >> 16);