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 print the bad values in panic messages
details: https://anonhg.NetBSD.org/src/rev/82aab704d1c4
branches: trunk
changeset: 333531:82aab704d1c4
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 07 12:48:21 2014 +0000
description:
print the bad values in panic messages
diffstat:
sys/arch/x86/pci/pci_machdep.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 098be1be07e0 -r 82aab704d1c4 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c Fri Nov 07 12:44:58 2014 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c Fri Nov 07 12:48:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.68 2014/11/05 05:07:43 christos Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.69 2014/11/07 12:48:21 christos 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.68 2014/11/05 05:07:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.69 2014/11/07 12:48:21 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -333,7 +333,7 @@
case 2:
return tag.mode1 & mode2_mask.mode1;
default:
- panic("%s: mode not configured", __func__);
+ panic("%s: mode %d not configured", __func__, pci_mode);
}
}
@@ -346,7 +346,7 @@
case 2:
return tag.mode2.port | reg;
default:
- panic("%s: mode not configured", __func__);
+ panic("%s: mode %d not configured", __func__, pci_mode);
}
}
@@ -366,7 +366,7 @@
outb(PCI_MODE2_FORWARD_REG, tag.mode2.forward);
return;
default:
- panic("%s: mode not configured", __func__);
+ panic("%s: mode %d not configured", __func__, pci_mode);
}
}
@@ -415,21 +415,23 @@
switch (pci_mode) {
case 1:
if (bus >= 256 || device >= 32 || function >= 8)
- panic("%s: bad request", __func__);
+ panic("%s: bad request(%d, %d, %d)", __func__,
+ bus, device, function);
tag.mode1 = PCI_MODE1_ENABLE |
(bus << 16) | (device << 11) | (function << 8);
return tag;
case 2:
if (bus >= 256 || device >= 16 || function >= 8)
- panic("%s: bad request", __func__);
+ panic("%s: bad request(%d, %d, %d)", __func__,
+ bus, device, function);
tag.mode2.port = 0xc000 | (device << 8);
tag.mode2.enable = 0xf0 | (function << 1);
tag.mode2.forward = bus;
return tag;
default:
- panic("%s: mode not configured", __func__);
+ panic("%s: mode %d not configured", __func__, pci_mode);
}
}
@@ -465,7 +467,7 @@
*fp = (tag.mode2.enable >> 1) & 0x7;
return;
default:
- panic("%s: mode not configured", __func__);
+ panic("%s: mode %d not configured", __func__, pci_mode);
}
}
Home |
Main Index |
Thread Index |
Old Index