The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] nfc: trf7970a: fix lifetime ordering around IRQ setup and teardown
@ 2026-08-01  5:10 Fan Wu
  2026-08-01  5:10 ` [PATCH net v3 1/2] nfc: trf7970a: set up lock and timeout work before requesting IRQ Fan Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fan Wu @ 2026-08-01  5:10 UTC (permalink / raw)
  To: netdev
  Cc: horms, david, mgreer, oe-linux-nfc, linux-wireless, linux-kernel,
	stable, Fan Wu

Two lifetime-ordering fixes for the trf7970a NFC digital driver.

Patch 1 sets up the lock and timeout work before the threaded IRQ is
registered, and moves the lock to devm_mutex_init() so its teardown is
part of the devres lifetime.

Patch 2 depends on patch 1 and drains the timeout work across removal:
it marks a running handler to skip completion, handles LISTENING_MD in
shutdown, and cancels the work after the digital core stops issuing
commands and before the digital device is freed.

These were previously sent as standalone patches. Per review feedback
from Simon Horman they are respun as a series.

---

v3:
  - Respun as a 2-patch series with an explicit dependency.
  - Patch 1: switch to devm_mutex_init(); remove the explicit
    mutex_destroy() calls and the now-empty err_destroy_lock label.
  - Patch 2: set ignore_timeout before send_err_upstream; handle
    TRF7970A_ST_LISTENING_MD in shutdown.
  - Patch 1 was previously sent standalone.

init-order v1: https://lore.kernel.org/netdev/20260728031021.230831-1-fanwu01@zju.edu.cn/
teardown v2:   https://lore.kernel.org/netdev/20260728030716.230626-1-fanwu01@zju.edu.cn/
teardown v1:   https://lore.kernel.org/netdev/20260721133539.3195899-1-fanwu01@zju.edu.cn/


Fan Wu (2):
  nfc: trf7970a: set up lock and timeout work before requesting IRQ
  nfc: trf7970a: quiesce timeout work before teardown

 drivers/nfc/trf7970a.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-05 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-01  5:10 [PATCH net v3 0/2] nfc: trf7970a: fix lifetime ordering around IRQ setup and teardown Fan Wu
2026-08-01  5:10 ` [PATCH net v3 1/2] nfc: trf7970a: set up lock and timeout work before requesting IRQ Fan Wu
2026-08-01  5:10 ` [PATCH net v3 2/2] nfc: trf7970a: quiesce timeout work before teardown Fan Wu
2026-08-05 11:50 ` [PATCH net v3 0/2] nfc: trf7970a: fix lifetime ordering around IRQ setup and teardown Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox