]> git.baikalelectronics.ru Git - kernel.git/commit
platform/surface: aggregator: Add error injection capabilities
authorMaximilian Luz <luzmaximilian@gmail.com>
Mon, 21 Dec 2020 18:39:55 +0000 (19:39 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 6 Jan 2021 23:06:22 +0000 (00:06 +0100)
commitbc06275172f5f098e1604eeea0a41abd7e7fa1c9
treed9ca5068c272e80d1fb086ab93b6775abcd02f1d
parenteb9b2fa1bc21791ef0c66fc69fe03b7af1a43282
platform/surface: aggregator: Add error injection capabilities

This commit adds error injection hooks to the Surface Serial Hub
communication protocol implementation, to:

 - simulate simple serial transmission errors,

 - drop packets, requests, and responses, simulating communication
   failures and potentially trigger retransmission timeouts, as well as

 - inject invalid data into submitted and received packets.

Together with the trace points introduced in the previous commit, these
facilities are intended to aid in testing, validation, and debugging of
the Surface Aggregator communication layer.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20201221183959.1186143-6-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/surface/aggregator/Kconfig
drivers/platform/surface/aggregator/ssh_packet_layer.c
drivers/platform/surface/aggregator/ssh_request_layer.c
drivers/platform/surface/aggregator/trace.h