Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Bluetooth: btintel_pcie: debug INI rework and fatal error injection
@ 2026-11-04 12:25 Sai Teja Aluvala
  2026-11-04 12:25 ` [PATCH v5 1/2] Bluetooth: btintel_pcie: Move debug INI parsing to debug file Sai Teja Aluvala
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sai Teja Aluvala @ 2026-11-04 12:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: kiran.k, chethan.tumkur.narayan, Sai Teja Aluvala

This series moves the btintel_pcie debug INI parsing into the debug
file and adds a test mode for injecting firmware exceptions.

Patch 1 moves the debug INI parser (DBG_PATH, ENABLE_INI, LOG_MASK)
from btintel_pcie.c to btintel_pcie_debug.c, so that all debug INI
handling lives in one file. The parsing behaviour is unchanged.

Patch 2 adds the FATAL_ERR_TESTMODE debug INI option. It injects a
firmware exception for testing. The INI value selects the exception
type and the injection context (thread, IRQ or rfkill). Whether the
exception is expected to trigger recovery depends on its type. The
test mode is disabled when the OPFW API lock is set, unless the
unlocker firmware was loaded.

v5: address the issues raised in the Sashiko cross review of v4:
 - Commit messages: describe the parser split, the new export and the
   MODULE_DESCRIPTION update (patch 1), and that the rfkill button only
   triggers the injection, that the injection is repeated after every
   setup and recovery re-probe, and that normal rfkill handling applies
   while HCI is down (patch 2).
 - Do not log an error when the injection fails with -ENETDOWN (HCI
   down), and log "unavailable" instead of "not found" when the lookup
   fails with an error.
 - Remove the unused api_lock_enabled field.
 - Reword comments: the initial rfkill check is deferred, not skipped,
   and "notification" is now "injection".

v4:
 - In test mode, ignore an rfkill release only if the assertion was not
   handled by the normal path (HWRFKILL_ON clear), instead of testing
   HCI_UP without req_lock.

v3:
 - Fall back to the normal rfkill handling when HCI is down, so the
   test mode no longer suppresses it.
 - Send the deferred post-setup notification when HCI is opened again.

v2:
 - Drop the btintel "Zero-initialize new_ver" patch, as
   btintel_read_version_tlv() already clears the structure.
 - Arm the post-setup injection before setting SETUP_DONE, so the rfkill
   work cannot inject ahead of it.
 - Keep the post-setup injection pending if HCI is down when the rfkill
   work runs.
 - Document that the test mode intentionally injects on every rfkill
   assertion and skips the initial rfkill check after the post-setup
   injection, and that the api_lock check uses the operational firmware
   version.

Sai Teja Aluvala (2):
  Bluetooth: btintel_pcie: Move debug INI parsing to debug file
  Bluetooth: btintel_pcie: Add fatal error injection test mode

 drivers/bluetooth/btintel.c            |   5 +-
 drivers/bluetooth/btintel.h            |   1 +
 drivers/bluetooth/btintel_pcie.c       | 161 ++++----------
 drivers/bluetooth/btintel_pcie.h       |   5 +-
 drivers/bluetooth/btintel_pcie_debug.c | 295 ++++++++++++++++++++++++-
 drivers/bluetooth/btintel_pcie_debug.h |  32 ++-
 6 files changed, 371 insertions(+), 128 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-11-04 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 12:25 [PATCH v5 0/2] Bluetooth: btintel_pcie: debug INI rework and fatal error injection Sai Teja Aluvala
2026-11-04 12:25 ` [PATCH v5 1/2] Bluetooth: btintel_pcie: Move debug INI parsing to debug file Sai Teja Aluvala
2026-11-04 16:43   ` Bluetooth: btintel_pcie: debug INI rework and fatal error injection bluez.test.bot
2026-11-04 12:25 ` [PATCH v5 2/2] Bluetooth: btintel_pcie: Add fatal error injection test mode Sai Teja Aluvala
2026-11-04 16:30 ` [PATCH v5 0/2] Bluetooth: btintel_pcie: debug INI rework and fatal error injection patchwork-bot+bluetooth

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