diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-05-15 02:14:43 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-06-12 00:05:16 -0400 |
| commit | 4e56828a5db19e2de8f8dc464c6df2e7e9ff4e13 (patch) | |
| tree | acc4c44cb01969f50279d7367cf57870cfefad6f /include | |
| parent | 0e82e5c1fad79ffe9d316296c7a4c1de539d0c48 (diff) | |
fsi/fsi-master-gpio: Implement CRC error recovery
The FSI protocol defines two modes of recovery from CRC errors,
this implements both:
- If the device returns an ECRC (it detected a CRC error in the
command), then we simply issue the command again.
- If the master detects a CRC error in the response, we send
an E_POLL command which requests a resend of the response
without actually re-executing the command (which could otherwise
have unwanted side effects such as dequeuing a FIFO twice).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
Tested-by: Joel Stanley <joel@jms.id.au>
---
Note: This was actually tested by removing some of my fixes, thus
causing us to hit occasional CRC errors during high LPC activity.
Diffstat (limited to 'include')
| -rw-r--r-- | include/trace/events/fsi_master_gpio.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/trace/events/fsi_master_gpio.h b/include/trace/events/fsi_master_gpio.h index 33e928c5acf3..389082132433 100644 --- a/include/trace/events/fsi_master_gpio.h +++ b/include/trace/events/fsi_master_gpio.h | |||
| @@ -64,6 +64,33 @@ TRACE_EVENT(fsi_master_gpio_break, | |||
| 64 | ) | 64 | ) |
| 65 | ); | 65 | ); |
| 66 | 66 | ||
| 67 | TRACE_EVENT(fsi_master_gpio_crc_cmd_error, | ||
| 68 | TP_PROTO(const struct fsi_master_gpio *master), | ||
| 69 | TP_ARGS(master), | ||
| 70 | TP_STRUCT__entry( | ||
| 71 | __field(int, master_idx) | ||
| 72 | ), | ||
| 73 | TP_fast_assign( | ||
| 74 | __entry->master_idx = master->master.idx; | ||
| 75 | ), | ||
| 76 | TP_printk("fsi-gpio%d ----CRC command retry---", | ||
| 77 | __entry->master_idx | ||
| 78 | ) | ||
| 79 | ); | ||
| 80 | |||
| 81 | TRACE_EVENT(fsi_master_gpio_crc_rsp_error, | ||
| 82 | TP_PROTO(const struct fsi_master_gpio *master), | ||
| 83 | TP_ARGS(master), | ||
| 84 | TP_STRUCT__entry( | ||
| 85 | __field(int, master_idx) | ||
| 86 | ), | ||
| 87 | TP_fast_assign( | ||
| 88 | __entry->master_idx = master->master.idx; | ||
| 89 | ), | ||
| 90 | TP_printk("fsi-gpio%d ----CRC response---", | ||
| 91 | __entry->master_idx | ||
| 92 | ) | ||
| 93 | ); | ||
| 67 | 94 | ||
| 68 | TRACE_EVENT(fsi_master_gpio_poll_response_busy, | 95 | TRACE_EVENT(fsi_master_gpio_poll_response_busy, |
| 69 | TP_PROTO(const struct fsi_master_gpio *master, int busy), | 96 | TP_PROTO(const struct fsi_master_gpio *master, int busy), |
