Re: [PATCH] nfc: pn533: add timeout to USB frame send completion wait
From: Zhao Feng
Date: Tue Oct 27 2026 - 03:01:54 EST
Thanks for the detailed review. All three issues are legitimate, and
I'm respinning as v2.
[High] Confirmed against the code: pn533_wq_cmd() drops a queued
command on send failure without calling complete_cb, without clearing
cmd_pending and without rescheduling cmd_work, so a
pn533_send_cmd_sync() caller would indeed sleep forever and the queue
freezes. v2 patch 1/2 now completes the failed command with the error
and reschedules cmd_work, so the queue drains with errors instead of
freezing.
[Medium] v2 patch 2/2 mirrors usb_start_wait_urb(): after
usb_kill_urb() it checks urb->status and proceeds normally if the
transfer completed between the timeout expiring and the kill, instead
of reporting a spurious -ETIMEDOUT.
Regarding a protocol-level ACK abort on timeout: pn533_usb_send_ack()
is a no-op on ACR122U, and after a genuine stall we cannot know how
much of the frame the device consumed, so I kept the timeout path
minimal. The stale-response desync you describe remains possible
after a real timeout; a full device reset looks too invasive for this
fix, but I'm happy to revisit it if the maintainers prefer.
[Low] Fixes tag added with the commit you identified, and Cc: stable
on both patches.
pw-bot: cr