Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix a bug that IRQ(MSI) bits in PCIe capability ...
details: https://anonhg.NetBSD.org/src/rev/1d4b54b6cbfa
branches: trunk
changeset: 786118:1d4b54b6cbfa
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Apr 16 09:13:04 2013 +0000
description:
Fix a bug that IRQ(MSI) bits in PCIe capability register is incorrectly
decoded. The bit field is not 0x4e000000 but 0x3e000000.
diffstat:
sys/dev/pci/pci_subr.c | 6 +++---
sys/dev/pci/pcireg.h | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 2b9f1af2bb0f -r 1d4b54b6cbfa sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c Tue Apr 16 09:04:24 2013 +0000
+++ b/sys/dev/pci/pci_subr.c Tue Apr 16 09:13:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.96 2013/04/15 18:51:29 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.97 2013/04/16 09:13:04 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.96 2013/04/15 18:51:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.97 2013/04/16 09:13:04 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -855,7 +855,7 @@
if (check_slot && (regs[o2i(capoff)] & 0x01000000) != 0)
printf(" Slot implemented\n");
printf(" Interrupt Message Number: %x\n",
- (unsigned int)((regs[o2i(capoff)] & 0x4e000000) >> 27));
+ (unsigned int)((regs[o2i(capoff)] & PCI_PCIE_XCAP_IRQ) >> 27));
printf(" Link Capabilities Register: 0x%08x\n",
regs[o2i(capoff + 0x0c)]);
printf(" Maximum Link Speed: ");
diff -r 2b9f1af2bb0f -r 1d4b54b6cbfa sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Tue Apr 16 09:04:24 2013 +0000
+++ b/sys/dev/pci/pcireg.h Tue Apr 16 09:13:04 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcireg.h,v 1.78 2013/04/15 18:48:36 msaitoh Exp $ */
+/* $NetBSD: pcireg.h,v 1.79 2013/04/16 09:13:04 msaitoh Exp $ */
/*
* Copyright (c) 1995, 1996, 1999, 2000
@@ -647,6 +647,7 @@
#define PCI_PCIE_XCAP_TYPE_ROOT_INTEP __SHIFTIN(0x9, PCI_PCIE_XCAP_TYPE_MASK)
#define PCI_PCIE_XCAP_TYPE_ROOT_EVNTC __SHIFTIN(0xa, PCI_PCIE_XCAP_TYPE_MASK)
#define PCI_PCIE_XCAP_SI __SHIFTIN(__BIT(8), PCI_PCIE_XCAP_MASK) /* Slot Implemented */
+#define PCI_PCIE_XCAP_IRQ __SHIFTIN(__BITS(13, 9), PCI_PCIE_XCAP_MASK)
#define PCI_PCIE_DCAP 0x04 /* Device Capabilities Register */
#define PCI_PCIE_DCAP_MAX_PAYLOAD __BITS(2, 0)
#define PCI_PCIE_DCAP_PHANTHOM_FUNCS __BITS(4, 3)
Home |
Main Index |
Thread Index |
Old Index