Linux Input/HID development
 help / color / mirror / Atom feed
From: Emfox Zhou <emfox@debian.org>
To: Even Xu <even.xu@intel.com>, Xinpeng Sun <xinpeng.sun@intel.com>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] HID: intel-thc-hid: intel-thc: DMA lifetime fixes
Date: Mon, 16 Nov 2026 21:31:27 +0800	[thread overview]
Message-ID: <20261116133132.1282020-1-emfox@debian.org> (raw)

This series fixes the DMA lifetime problems a protocol driver above the
THC core cannot work around, plus two smaller issues next to them.

Patch 1 makes thc_dma_write() report the error it found instead of
overwriting it with the result of the interrupt restore, and stops a
signal from turning a committed transfer into a restartable one. The
completion interrupt has to wake the queue with wake_up(), because the
new wait is uninterruptible.

Patch 2 unwinds a failed allocation through thc_dma_release(), so the
channel whose setup failed is freed too, and frees a scatter-gather list
that was allocated but never mapped.

Patch 3 stops all four engines before thc_dma_unconfigure() clears their
PRD base addresses; only the two receive engines are stopped today.

Patch 4 adds the low frequency SPI gears, down to 2.23 MHz.

Patch 5 gives the receive engines a drain budget that covers a full frame
at that gear, and leaves the SWDMA path on the old one.

These apply to v7.4-rc3. They are independent of the PRD table capacity
fix posted separately; the two are both needed for the recovery path to be
complete, but neither depends on the other.

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: aebb7274476403040d582c61478df8f4a7bf9cd3

             reply	other threads:[~2026-11-16 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 13:31 Emfox Zhou [this message]
2026-11-16 13:31 ` [PATCH 1/5] HID: intel-thc-hid: intel-thc: keep TxDMA write errors Emfox Zhou
2026-11-16 13:49   ` sashiko-bot
2026-11-16 13:31 ` [PATCH 2/5] HID: intel-thc-hid: intel-thc: free the failed channel Emfox Zhou
2026-11-16 13:31 ` [PATCH 3/5] HID: intel-thc-hid: intel-thc: stop all engines first Emfox Zhou
2026-11-16 13:39   ` sashiko-bot
2026-11-16 13:31 ` [PATCH 4/5] HID: intel-thc-hid: intel-thc: add the slow SPI gears Emfox Zhou
2026-11-16 13:31 ` [PATCH 5/5] HID: intel-thc-hid: intel-thc: budget the receive drain Emfox Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261116133132.1282020-1-emfox@debian.org \
    --to=emfox@debian.org \
    --cc=bentiss@kernel.org \
    --cc=even.xu@intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xinpeng.sun@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox