[PATCH v3 0/5] HID: intel-thc-hid: intel-thc: DMA lifetime fixes
From: Emfox Zhou
Date: Fri Nov 27 2026 - 09:59:47 EST
The THC DMA engines have no defined lifetime: a failed write reports
success, the channel that failed to allocate keeps the tables and
scatter-gather lists it did manage to allocate, the engines are not all
stopped before their tables go away, the SPI gear table has no entry for
the slow clocks some controllers ask for, and the drain that follows a
stop is a fixed 10 ms even when a receive engine is draining a whole
frame.
This series gives them one. It is a prerequisite for the IPTS backend
series that follows: the recovery path there relies on the engines being
stopped in order and on the drain being long enough.
1/5 keep TxDMA write errors
2/5 free the failed channel
3/5 stop all engines first
4/5 add the slow SPI gears
5/5 budget the receive drain
Changes in v3:
- Rebased onto for-7.5/intel-thc (4f048c56c), which carries Even Xu's
safe DMA read series; no functional change.
Emfox Zhou (5):
HID: intel-thc-hid: intel-thc: keep TxDMA write errors
HID: intel-thc-hid: intel-thc: free the failed channel
HID: intel-thc-hid: intel-thc: stop all engines first
HID: intel-thc-hid: intel-thc: add the slow SPI gears
HID: intel-thc-hid: intel-thc: budget the receive drain
.../intel-thc-hid/intel-thc/intel-thc-dev.c | 45 ++++++++---
.../intel-thc-hid/intel-thc/intel-thc-dma.c | 77 +++++++++++--------
.../intel-thc-hid/intel-thc/intel-thc-dma.h | 5 ++
3 files changed, 86 insertions(+), 41 deletions(-)
base-commit: 4f048c56c2697000105a75c28b918ae76f11fcef