Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203528
b: refs/heads/master
c: 4b58645
h: refs/heads/master
v: v3
  • Loading branch information
Jay Sternberg authored and Wey-Yi Guy committed Jul 9, 2010
1 parent 679aa7b commit 768e534
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0326433995ad43b64ebabdd2390a5d11f33f025b
refs/heads/master: 4b58645ce68c5fd446bff0c847ff9385cd204680
36 changes: 30 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2296,17 +2296,41 @@ static const char *desc_lookup_text[] = {
"DEBUG_1",
"DEBUG_2",
"DEBUG_3",
"ADVANCED SYSASSERT"
};

static const char *desc_lookup(int i)
static struct { char *name; u8 num; } advanced_lookup[] = {
{ "NMI_INTERRUPT_WDG", 0x34 },
{ "SYSASSERT", 0x35 },
{ "UCODE_VERSION_MISMATCH", 0x37 },
{ "BAD_COMMAND", 0x38 },
{ "NMI_INTERRUPT_DATA_ACTION_PT", 0x3C },
{ "FATAL_ERROR", 0x3D },
{ "NMI_TRM_HW_ERR", 0x46 },
{ "NMI_INTERRUPT_TRM", 0x4C },
{ "NMI_INTERRUPT_BREAK_POINT", 0x54 },
{ "NMI_INTERRUPT_WDG_RXF_FULL", 0x5C },
{ "NMI_INTERRUPT_WDG_NO_RBD_RXF_FULL", 0x64 },
{ "NMI_INTERRUPT_HOST", 0x66 },
{ "NMI_INTERRUPT_ACTION_PT", 0x7C },
{ "NMI_INTERRUPT_UNKNOWN", 0x84 },
{ "NMI_INTERRUPT_INST_ACTION_PT", 0x86 },
{ "ADVANCED_SYSASSERT", 0 },
};

static const char *desc_lookup(u32 num)
{
int max = ARRAY_SIZE(desc_lookup_text) - 1;
int i;
int max = ARRAY_SIZE(desc_lookup_text);

if (i < 0 || i > max)
i = max;
if (num < max)
return desc_lookup_text[num];

return desc_lookup_text[i];
max = ARRAY_SIZE(advanced_lookup) - 1;
for (i = 0; i < max; i++) {
if (advanced_lookup[i].num == num)
break;;
}
return advanced_lookup[i].name;
}

#define ERROR_START_OFFSET (1 * sizeof(u32))
Expand Down

0 comments on commit 768e534

Please sign in to comment.