Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci Avoid trying to create a tag for locating A...
details: https://anonhg.NetBSD.org/src/rev/24f15f91a915
branches: trunk
changeset: 345844:24f15f91a915
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Jun 10 23:07:52 2016 +0000
description:
Avoid trying to create a tag for locating AMD HyperTransport bridge that will
panic a machine that uses Configuration Mechanism 2.
diffstat:
sys/arch/x86/pci/pci_machdep.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r b1284def3355 -r 24f15f91a915 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c Fri Jun 10 21:32:46 2016 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c Fri Jun 10 23:07:52 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.73 2015/11/26 16:27:05 jakllsch Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.73 2015/11/26 16:27:05 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -512,10 +512,12 @@
* If that device has a HyperTransport capability, bus 0 must
* be a HyperTransport bus and we disable MSI.
*/
- tag = pci_make_tag(pc, 0, 24, 0);
- if (pci_get_capability(pc, tag, PCI_CAP_LDT, NULL, NULL)) {
- pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
- pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
+ if (24 < pci_bus_maxdevs(pc, 0)) {
+ tag = pci_make_tag(pc, 0, 24, 0);
+ if (pci_get_capability(pc, tag, PCI_CAP_LDT, NULL, NULL)) {
+ pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
+ pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
+ }
}
#endif /* __HAVE_PCI_MSI_MSIX */
}
Home |
Main Index |
Thread Index |
Old Index