diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-05-04 19:56:52 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-05-13 15:01:50 -0400 |
commit | 5065054790b111bf677b1eccf3f8f76f20cc0ae6 (patch) | |
tree | ff2f555c101affd1dbabb1af3fabbc035078a262 | |
parent | 4ce7cc2b09553a91d4aea014c39674685715173a (diff) |
iwlagn: more ucode error log info
No functional changes, just logging more information when uCode crash, also
change change the format.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 66 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-devtrace.h | 41 |
2 files changed, 65 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 675b9a644a0d..a7054a5ee34a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1622,10 +1622,7 @@ static const char *desc_lookup(u32 num) | |||
1622 | 1622 | ||
1623 | void iwl_dump_nic_error_log(struct iwl_priv *priv) | 1623 | void iwl_dump_nic_error_log(struct iwl_priv *priv) |
1624 | { | 1624 | { |
1625 | u32 data2, line; | 1625 | u32 base; |
1626 | u32 desc, time, count, base, data1; | ||
1627 | u32 blink1, blink2, ilink1, ilink2; | ||
1628 | u32 pc, hcmd; | ||
1629 | struct iwl_error_event_table table; | 1626 | struct iwl_error_event_table table; |
1630 | 1627 | ||
1631 | base = priv->device_pointers.error_event_table; | 1628 | base = priv->device_pointers.error_event_table; |
@@ -1648,37 +1645,40 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1648 | 1645 | ||
1649 | iwl_read_targ_mem_words(priv, base, &table, sizeof(table)); | 1646 | iwl_read_targ_mem_words(priv, base, &table, sizeof(table)); |
1650 | 1647 | ||
1651 | count = table.valid; | 1648 | if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { |
1652 | |||
1653 | if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { | ||
1654 | IWL_ERR(priv, "Start IWL Error Log Dump:\n"); | 1649 | IWL_ERR(priv, "Start IWL Error Log Dump:\n"); |
1655 | IWL_ERR(priv, "Status: 0x%08lX, count: %d\n", | 1650 | IWL_ERR(priv, "Status: 0x%08lX, count: %d\n", |
1656 | priv->status, count); | 1651 | priv->status, table.valid); |
1657 | } | 1652 | } |
1658 | 1653 | ||
1659 | desc = table.error_id; | 1654 | priv->isr_stats.err_code = table.error_id; |
1660 | priv->isr_stats.err_code = desc; | 1655 | |
1661 | pc = table.pc; | 1656 | trace_iwlwifi_dev_ucode_error(priv, table.error_id, table.tsf_low, |
1662 | blink1 = table.blink1; | 1657 | table.data1, table.data2, table.line, |
1663 | blink2 = table.blink2; | 1658 | table.blink1, table.blink2, table.ilink1, |
1664 | ilink1 = table.ilink1; | 1659 | table.ilink2, table.bcon_time, table.gp1, |
1665 | ilink2 = table.ilink2; | 1660 | table.gp2, table.gp3, table.ucode_ver, |
1666 | data1 = table.data1; | 1661 | table.hw_ver, table.brd_ver); |
1667 | data2 = table.data2; | 1662 | IWL_ERR(priv, "0x%08X | %-28s\n", table.error_id, |
1668 | line = table.line; | 1663 | desc_lookup(table.error_id)); |
1669 | time = table.tsf_low; | 1664 | IWL_ERR(priv, "0x%08X | uPc\n", table.pc); |
1670 | hcmd = table.hcmd; | 1665 | IWL_ERR(priv, "0x%08X | branchlink1\n", table.blink1); |
1671 | 1666 | IWL_ERR(priv, "0x%08X | branchlink2\n", table.blink2); | |
1672 | trace_iwlwifi_dev_ucode_error(priv, desc, time, data1, data2, line, | 1667 | IWL_ERR(priv, "0x%08X | interruptlink1\n", table.ilink1); |
1673 | blink1, blink2, ilink1, ilink2); | 1668 | IWL_ERR(priv, "0x%08X | interruptlink2\n", table.ilink2); |
1674 | 1669 | IWL_ERR(priv, "0x%08X | data1\n", table.data1); | |
1675 | IWL_ERR(priv, "Desc Time " | 1670 | IWL_ERR(priv, "0x%08X | data2\n", table.data2); |
1676 | "data1 data2 line\n"); | 1671 | IWL_ERR(priv, "0x%08X | line\n", table.line); |
1677 | IWL_ERR(priv, "%-28s (0x%04X) %010u 0x%08X 0x%08X %u\n", | 1672 | IWL_ERR(priv, "0x%08X | beacon time\n", table.bcon_time); |
1678 | desc_lookup(desc), desc, time, data1, data2, line); | 1673 | IWL_ERR(priv, "0x%08X | tsf low\n", table.tsf_low); |
1679 | IWL_ERR(priv, "pc blink1 blink2 ilink1 ilink2 hcmd\n"); | 1674 | IWL_ERR(priv, "0x%08X | tsf hi\n", table.tsf_hi); |
1680 | IWL_ERR(priv, "0x%05X 0x%05X 0x%05X 0x%05X 0x%05X 0x%05X\n", | 1675 | IWL_ERR(priv, "0x%08X | time gp1\n", table.gp1); |
1681 | pc, blink1, blink2, ilink1, ilink2, hcmd); | 1676 | IWL_ERR(priv, "0x%08X | time gp2\n", table.gp2); |
1677 | IWL_ERR(priv, "0x%08X | time gp3\n", table.gp3); | ||
1678 | IWL_ERR(priv, "0x%08X | uCode version\n", table.ucode_ver); | ||
1679 | IWL_ERR(priv, "0x%08X | hw version\n", table.hw_ver); | ||
1680 | IWL_ERR(priv, "0x%08X | board version\n", table.brd_ver); | ||
1681 | IWL_ERR(priv, "0x%08X | hcmd\n", table.hcmd); | ||
1682 | } | 1682 | } |
1683 | 1683 | ||
1684 | #define EVENT_START_OFFSET (4 * sizeof(u32)) | 1684 | #define EVENT_START_OFFSET (4 * sizeof(u32)) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h index fc131867c10b..2c84ba95afca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h | |||
@@ -209,15 +209,18 @@ TRACE_EVENT(iwlwifi_dev_tx, | |||
209 | ); | 209 | ); |
210 | 210 | ||
211 | TRACE_EVENT(iwlwifi_dev_ucode_error, | 211 | TRACE_EVENT(iwlwifi_dev_ucode_error, |
212 | TP_PROTO(struct iwl_priv *priv, u32 desc, u32 time, | 212 | TP_PROTO(struct iwl_priv *priv, u32 desc, u32 tsf_low, |
213 | u32 data1, u32 data2, u32 line, u32 blink1, | 213 | u32 data1, u32 data2, u32 line, u32 blink1, |
214 | u32 blink2, u32 ilink1, u32 ilink2), | 214 | u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time, |
215 | TP_ARGS(priv, desc, time, data1, data2, line, | 215 | u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver, |
216 | blink1, blink2, ilink1, ilink2), | 216 | u32 brd_ver), |
217 | TP_ARGS(priv, desc, tsf_low, data1, data2, line, | ||
218 | blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2, | ||
219 | gp3, ucode_ver, hw_ver, brd_ver), | ||
217 | TP_STRUCT__entry( | 220 | TP_STRUCT__entry( |
218 | PRIV_ENTRY | 221 | PRIV_ENTRY |
219 | __field(u32, desc) | 222 | __field(u32, desc) |
220 | __field(u32, time) | 223 | __field(u32, tsf_low) |
221 | __field(u32, data1) | 224 | __field(u32, data1) |
222 | __field(u32, data2) | 225 | __field(u32, data2) |
223 | __field(u32, line) | 226 | __field(u32, line) |
@@ -225,11 +228,18 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
225 | __field(u32, blink2) | 228 | __field(u32, blink2) |
226 | __field(u32, ilink1) | 229 | __field(u32, ilink1) |
227 | __field(u32, ilink2) | 230 | __field(u32, ilink2) |
231 | __field(u32, bcon_time) | ||
232 | __field(u32, gp1) | ||
233 | __field(u32, gp2) | ||
234 | __field(u32, gp3) | ||
235 | __field(u32, ucode_ver) | ||
236 | __field(u32, hw_ver) | ||
237 | __field(u32, brd_ver) | ||
228 | ), | 238 | ), |
229 | TP_fast_assign( | 239 | TP_fast_assign( |
230 | PRIV_ASSIGN; | 240 | PRIV_ASSIGN; |
231 | __entry->desc = desc; | 241 | __entry->desc = desc; |
232 | __entry->time = time; | 242 | __entry->tsf_low = tsf_low; |
233 | __entry->data1 = data1; | 243 | __entry->data1 = data1; |
234 | __entry->data2 = data2; | 244 | __entry->data2 = data2; |
235 | __entry->line = line; | 245 | __entry->line = line; |
@@ -237,12 +247,25 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
237 | __entry->blink2 = blink2; | 247 | __entry->blink2 = blink2; |
238 | __entry->ilink1 = ilink1; | 248 | __entry->ilink1 = ilink1; |
239 | __entry->ilink2 = ilink2; | 249 | __entry->ilink2 = ilink2; |
250 | __entry->bcon_time = bcon_time; | ||
251 | __entry->gp1 = gp1; | ||
252 | __entry->gp2 = gp2; | ||
253 | __entry->gp3 = gp3; | ||
254 | __entry->ucode_ver = ucode_ver; | ||
255 | __entry->hw_ver = hw_ver; | ||
256 | __entry->brd_ver = brd_ver; | ||
240 | ), | 257 | ), |
241 | TP_printk("[%p] #%02d %010u data 0x%08X 0x%08X line %u, " | 258 | TP_printk("[%p] #%02d %010u data 0x%08X 0x%08X line %u, " |
242 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X", | 259 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X " |
243 | __entry->priv, __entry->desc, __entry->time, __entry->data1, | 260 | "bcon_tm %010u gp 0x%08X 0x%08X 0x%08X uCode 0x%08X " |
261 | "hw 0x%08X brd 0x%08X", | ||
262 | __entry->priv, __entry->desc, __entry->tsf_low, | ||
263 | __entry->data1, | ||
244 | __entry->data2, __entry->line, __entry->blink1, | 264 | __entry->data2, __entry->line, __entry->blink1, |
245 | __entry->blink2, __entry->ilink1, __entry->ilink2) | 265 | __entry->blink2, __entry->ilink1, __entry->ilink2, |
266 | __entry->bcon_time, __entry->gp1, __entry->gp2, | ||
267 | __entry->gp3, __entry->ucode_ver, __entry->hw_ver, | ||
268 | __entry->brd_ver) | ||
246 | ); | 269 | ); |
247 | 270 | ||
248 | TRACE_EVENT(iwlwifi_dev_ucode_event, | 271 | TRACE_EVENT(iwlwifi_dev_ucode_event, |