summaryrefslogtreecommitdiffstats
path: root/tools/hciconfig.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-03-17 19:03:58 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-03-17 19:03:58 +0000
commitac2daf48298cb601d1a57b0e00e38887b5e0a675 (patch)
treea5067eb247a7a56e91f7013c93463f57d1fc9f6f /tools/hciconfig.c
parentcfb680f0660169fe231c575cb2a0c7f72826f4f4 (diff)
Add support for reading CSR panic and fault codes
Diffstat (limited to 'tools/hciconfig.c')
-rw-r--r--tools/hciconfig.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index d8c40e8f..defe59c9 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -974,7 +974,7 @@ static void print_rev_ericsson(int dd)
static void print_rev_csr(int dd, uint16_t rev)
{
- uint16_t buildid, chipver, chiprev, maxkeylen, mapsco;
+ uint16_t buildid, chipver, chiprev, maxkeylen, mapsco, error;
if (csr_read_varid_uint16(dd, 0, CSR_VARID_BUILDID, &buildid) < 0) {
printf("\t%s\n", csr_buildidtostr(rev));
@@ -994,6 +994,16 @@ static void print_rev_csr(int dd, uint16_t rev)
if (!csr_read_pskey_uint16(dd, 4, CSR_PSKEY_HOSTIO_MAP_SCO_PCM, &mapsco))
printf("\tSCO mapping: %s\n", mapsco ? "PCM" : "HCI");
+
+ if (!csr_read_varid_uint16(dd, 5, CSR_VARID_PANIC_ARG, &error)) {
+ if (error < 0x0100)
+ printf("\tPanic code: 0x%02x\n", error);
+ }
+
+ if (!csr_read_varid_uint16(dd, 6, CSR_VARID_FAULT_ARG, &error)) {
+ if (error < 0x0100)
+ printf("\tFault code: 0x%02x\n", error);
+ }
}
static void print_rev_digianswer(int dd)