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.
This commit is contained in:
@@ -64,6 +64,33 @@ TRACE_EVENT(fsi_master_gpio_break,
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fsi_master_gpio_crc_cmd_error,
|
||||
TP_PROTO(const struct fsi_master_gpio *master),
|
||||
TP_ARGS(master),
|
||||
TP_STRUCT__entry(
|
||||
__field(int, master_idx)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->master_idx = master->master.idx;
|
||||
),
|
||||
TP_printk("fsi-gpio%d ----CRC command retry---",
|
||||
__entry->master_idx
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fsi_master_gpio_crc_rsp_error,
|
||||
TP_PROTO(const struct fsi_master_gpio *master),
|
||||
TP_ARGS(master),
|
||||
TP_STRUCT__entry(
|
||||
__field(int, master_idx)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->master_idx = master->master.idx;
|
||||
),
|
||||
TP_printk("fsi-gpio%d ----CRC response---",
|
||||
__entry->master_idx
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fsi_master_gpio_poll_response_busy,
|
||||
TP_PROTO(const struct fsi_master_gpio *master, int busy),
|
||||
|
Reference in New Issue
Block a user