Netdev List
 help / color / mirror / Atom feed
* [PATCH net v9 0/3] nfc: nfcmrvl: split firmware teardown fixes
@ 2026-11-30 13:02 Shubham Antil
  2026-11-30 13:02 ` [PATCH net v9 1/3] nfc: nci: add a pre-unregister shutdown stage Shubham Antil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shubham Antil @ 2026-11-30 13:02 UTC (permalink / raw)
  To: netdev; +Cc: Simon Horman, gio, David Heidelberg, oe-linux-nfc

The v8 series combined the firmware teardown fix with unrelated UART work.
This standalone submission applies directly to the base below and divides
the change into core infrastructure, firmware worker synchronization, and
the nfcmrvl unregister hook.

The first patch adds the NCI pre-unregister shutdown stage and a terminal
command-drain helper.  It prevents a close-time response from scheduling
command work after that drain.  The second patch serializes Marvell
firmware completion, timeout, and receive work.  The final patch invokes
the abort while the NCI workqueues are still alive.

The issue was found during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol.  The active-download detach condition was reproduced at runtime
by starting a firmware download and removing the N_NCI line discipline.
One hundred immediate detach iterations and timed completion-boundary modes
were exercised.  No production incident or pre-fix sanitizer report was
captured.  Patch development and test planning used the same assistant.

Each mail patch was applied independently to the base below on the Linux
test host.  The affected NFC objects built after every patch with W=1 and
sparse.  A KASAN, UBSAN, and lockdep kernel completed 100 immediate
firmware-download detach iterations and the timed completion modes without
a diagnostic, failure, or remaining device.  No physical Marvell
controller was available.

Changes since v8:

  - make firmware teardown a standalone submission on the original base
  - split NCI infrastructure, firmware synchronization, and driver hookup
  - drain late responses before the command work and timer are cancelled
  - leave overlapping-download admission to its independent patch set
  - correct the command-drain helper name in the changelog
  - remove an obsolete write-only completion marker
  - add the requested AI-assistance trailer

Shubham Antil (3):
  nfc: nci: add a pre-unregister shutdown stage
  nfc: nfcmrvl: serialize firmware completion and teardown
  nfc: nfcmrvl: abort firmware work before unregistering

 drivers/nfc/nfcmrvl/fw_dnld.c | 231 ++++++++++++++++++++++++++++++------------
 drivers/nfc/nfcmrvl/fw_dnld.h |  10 ++
 drivers/nfc/nfcmrvl/main.c    |  10 +-
 include/net/nfc/nci_core.h    |   9 ++
 net/nfc/nci/core.c            |  31 ++++--
 net/nfc/nci/rsp.c             |   3 +
 6 files changed, 222 insertions(+), 72 deletions(-)


base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
-- 
2.54.0


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

end of thread, other threads:[~2026-11-30 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:02 [PATCH net v9 0/3] nfc: nfcmrvl: split firmware teardown fixes Shubham Antil
2026-11-30 13:02 ` [PATCH net v9 1/3] nfc: nci: add a pre-unregister shutdown stage Shubham Antil
2026-11-30 13:02 ` [PATCH net v9 2/3] nfc: nfcmrvl: serialize firmware completion and teardown Shubham Antil
2026-11-30 13:02 ` [PATCH net v9 3/3] nfc: nfcmrvl: abort firmware work before unregistering Shubham Antil

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