e5da18d3 | 14-Jan-2021 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Fix kernel-doc references
Both, ssh_rtl_rx_start() and ssh_rtl_tx_start() functions, do not exist and have been consolidated into ssh_rtl_start(). Nevertheless, kernel-
platform/surface: aggregator: Fix kernel-doc references
Both, ssh_rtl_rx_start() and ssh_rtl_tx_start() functions, do not exist and have been consolidated into ssh_rtl_start(). Nevertheless, kernel-doc references the former functions. Replace those references with references to ssh_rtl_start().
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210114150826.19109-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
eb0e90a8 | 21-Dec-2020 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Add dedicated bus and device type
The Surface Aggregator EC provides varying functionality, depending on the Surface device. To manage this functionality, we use dedica
platform/surface: aggregator: Add dedicated bus and device type
The Surface Aggregator EC provides varying functionality, depending on the Surface device. To manage this functionality, we use dedicated client devices for each subsystem or virtual device of the EC. While some of these clients are described as standard devices in ACPI and the corresponding client drivers can be implemented as platform drivers in the kernel (making use of the controller API already present), many devices, especially on newer Surface models, cannot be found there.
To simplify management of these devices, we introduce a new bus and client device type for the Surface Aggregator subsystem. The new device type takes care of managing the controller reference, essentially guaranteeing its validity for as long as the client device exists, thus alleviating the need to manually establish device links for that purpose in the client driver (as has to be done with the platform devices).
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201221183959.1186143-7-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
02be44f6 | 21-Dec-2020 |
Maximilian Luz <luzmaximilian@gmail.com> |
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
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>
show more ...
|
0d21bb85 | 21-Dec-2020 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Add trace points
Add trace points to the Surface Aggregator subsystem core. These trace points can be used to track packets, requests, and allocations. They are further
platform/surface: aggregator: Add trace points
Add trace points to the Surface Aggregator subsystem core. These trace points can be used to track packets, requests, and allocations. They are further intended for debugging and testing/validation, specifically in combination with the error injection capabilities introduced in the subsequent commit.
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-5-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
3a7081f6 | 21-Dec-2020 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Add event item allocation caching
Event items are used for completing Surface Aggregator EC events, i.e. placing event command data and payload on a workqueue for later
platform/surface: aggregator: Add event item allocation caching
Event items are used for completing Surface Aggregator EC events, i.e. placing event command data and payload on a workqueue for later processing to avoid doing said processing directly on the receiver thread. This means that event items are allocated for each incoming event, regardless of that event being transmitted via sequenced or unsequenced packets.
On the Surface Book 3 and Surface Laptop 3, touchpad HID input events (unsequenced), can constitute a larger amount of traffic, and therefore allocation of event items. This warrants caching event items to reduce memory fragmentation. The size of the cached objects is specifically tuned to accommodate keyboard and touchpad input events and their payloads on those devices. As a result, this effectively also covers most other event types. In case of a larger event payload, event item allocation will fall back to kzalloc().
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201221183959.1186143-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
44b84ee7 | 21-Dec-2020 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Add control packet allocation caching
Surface Serial Hub communication is, in its core, packet based. Each sequenced packet requires to be acknowledged, via an ACK-type
platform/surface: aggregator: Add control packet allocation caching
Surface Serial Hub communication is, in its core, packet based. Each sequenced packet requires to be acknowledged, via an ACK-type control packet. In case invalid data has been received by the driver, a NAK-type (not-acknowledge/negative acknowledge) control packet is sent, triggering retransmission.
Control packets are therefore a core communication primitive and used frequently enough (with every sequenced packet transmission sent by the embedded controller, including events and request responses) that it may warrant caching their allocations to reduce possible memory fragmentation.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201221183959.1186143-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|