call the capability list ptr by its name

This commit is contained in:
drochner 2002-09-21 19:14:14 +00:00
parent 7bc4622603
commit 69ea314996
1 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_subr.c,v 1.52 2002/09/21 18:56:03 drochner Exp $ */ /* $NetBSD: pci_subr.c,v 1.53 2002/09/21 19:14:14 drochner Exp $ */
/* /*
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved. * Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
@ -40,7 +40,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.52 2002/09/21 18:56:03 drochner Exp $"); __KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.53 2002/09/21 19:14:14 drochner Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_pci.h" #include "opt_pci.h"
@ -955,7 +955,12 @@ pci_conf_print_type1(
printf(" base upper 32 bits register: 0x%08x\n", regs[o2i(0x28)]); printf(" base upper 32 bits register: 0x%08x\n", regs[o2i(0x28)]);
printf(" limit upper 32 bits register: 0x%08x\n", regs[o2i(0x2c)]); printf(" limit upper 32 bits register: 0x%08x\n", regs[o2i(0x2c)]);
if (regs[o2i(PCI_COMMAND_STATUS_REG)] & PCI_STATUS_CAPLIST_SUPPORT)
printf(" Capability list pointer: 0x%02x\n",
PCI_CAPLIST_PTR(regs[o2i(PCI_CAPLISTPTR_REG)]));
else
printf(" Reserved @ 0x34: 0x%08x\n", regs[o2i(0x34)]); printf(" Reserved @ 0x34: 0x%08x\n", regs[o2i(0x34)]);
/* XXX */ /* XXX */
printf(" Expansion ROM Base Address: 0x%08x\n", regs[o2i(0x38)]); printf(" Expansion ROM Base Address: 0x%08x\n", regs[o2i(0x38)]);
@ -1024,6 +1029,10 @@ pci_conf_print_type2(
pci_conf_print_bar(regs, 0x10, "CardBus socket/ExCA registers"); pci_conf_print_bar(regs, 0x10, "CardBus socket/ExCA registers");
#endif #endif
if (regs[o2i(PCI_COMMAND_STATUS_REG)] & PCI_STATUS_CAPLIST_SUPPORT)
printf(" Capability list pointer: 0x%02x\n",
PCI_CAPLIST_PTR(regs[o2i(PCI_CARDBUS_CAPLISTPTR_REG)]));
else
printf(" Reserved @ 0x14: 0x%04x\n", printf(" Reserved @ 0x14: 0x%04x\n",
(regs[o2i(0x14)] >> 0) & 0xffff); (regs[o2i(0x14)] >> 0) & 0xffff);
rval = (regs[o2i(0x14)] >> 16) & 0xffff; rval = (regs[o2i(0x14)] >> 16) & 0xffff;