From: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: chethan.tumkur.narayan@intel.com, kiran.k@intel.com,
Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Subject: [PATCH v2 1/2] Bluetooth: btintel: Add TOP silent reset hooks
Date: Fri, 23 Oct 2026 15:10:32 +0530 [thread overview]
Message-ID: <20261023094033.212251-1-chandrashekar.devegowda@intel.com> (raw)
Add an INTEL_TOP_RESET flag so btintel_boot() returns -ECANCELED and
the transport can run its own TOP silent reset instead of the Intel
soft reset. Cache boot_addr in struct btintel_data for the replay.
No functional change on its own.
Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
---
Changes in v2:
- Drop btintel_top_reset_pending() and the operational image special
case; check INTEL_TOP_RESET directly in btintel_boot().
- Clear the cached boot_addr when reading the firmware version.
v1: https://lore.kernel.org/linux-bluetooth/20261014114752.174669-1-chandrashekar.devegowda@intel.com/
drivers/bluetooth/btintel.c | 23 +++++++++++++++++++++++
drivers/bluetooth/btintel.h | 2 ++
2 files changed, 25 insertions(+)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 0709fb3212f9..999b292bb69e 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1238,6 +1238,12 @@ static bool btintel_firmware_version(struct hci_dev *hdev,
{
const u8 *fw_ptr;
+ if (hdev->bus == HCI_PCI) {
+ struct btintel_data *data = hci_get_priv(hdev);
+
+ data->boot_addr = 0;
+ }
+
fw_ptr = fw->data;
while (fw_ptr - fw->data < fw->size) {
@@ -1255,6 +1261,12 @@ static bool btintel_firmware_version(struct hci_dev *hdev,
*boot_addr = le32_to_cpu(params->boot_addr);
+ if (hdev->bus == HCI_PCI) {
+ struct btintel_data *data = hci_get_priv(hdev);
+
+ data->boot_addr = *boot_addr;
+ }
+
bt_dev_info(hdev, "Boot Address: 0x%x", *boot_addr);
bt_dev_info(hdev, "Firmware Version: %u-%u.%u",
@@ -2064,6 +2076,13 @@ static int btintel_boot(struct hci_dev *hdev, u32 boot_addr)
ktime_t calltime;
int err;
+ /* Let the transport replace the Intel soft reset for a TOP reset */
+ if (hdev->bus == HCI_PCI &&
+ btintel_test_flag(hdev, INTEL_TOP_RESET)) {
+ bt_dev_info(hdev, "TOP reset pending, skipping Intel soft reset");
+ return -ECANCELED;
+ }
+
calltime = ktime_get();
btintel_set_flag(hdev, INTEL_BOOTING);
@@ -3549,6 +3568,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv new_ver;
struct btintel_data *data = hci_get_priv(hdev);
u8 hw_variant = INTEL_HW_VARIANT(ver->cnvi_bt);
+ bool top_reset = btintel_test_flag(hdev, INTEL_TOP_RESET);
bt_dev_dbg(hdev, "");
@@ -3565,6 +3585,9 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
for (int i = 0; i < __INTEL_NUM_FLAGS; i++)
btintel_clear_flag(hdev, i);
+ if (top_reset)
+ btintel_set_flag(hdev, INTEL_TOP_RESET);
+
btintel_set_flag(hdev, INTEL_BOOTLOADER);
data->unlocker = false;
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index 9526acf65959..97fbe0ddf2d3 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -257,6 +257,7 @@ enum {
INTEL_ROM_LEGACY_NO_WBS_SUPPORT,
INTEL_ACPI_RESET_ACTIVE,
INTEL_WAIT_FOR_D0,
+ INTEL_TOP_RESET,
__INTEL_NUM_FLAGS,
};
@@ -265,6 +266,7 @@ struct btintel_data {
DECLARE_BITMAP(flags, __INTEL_NUM_FLAGS);
int (*acpi_reset_method)(struct hci_dev *hdev);
u32 cnvi_bt;
+ u32 boot_addr;
bool unlocker;
};
base-commit: 27731ba091954eccddb2657053b590d2113e8d98
--
2.43.0
next reply other threads:[~2026-10-23 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 9:40 Chandrashekar Devegowda [this message]
2026-10-23 9:40 ` [PATCH v2 2/2] Bluetooth: btintel_pcie: Add TOP silent reset support Chandrashekar Devegowda
2026-10-23 12:57 ` [v2,1/2] Bluetooth: btintel: Add TOP silent reset hooks bluez.test.bot
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=20261023094033.212251-1-chandrashekar.devegowda@intel.com \
--to=chandrashekar.devegowda@intel.com \
--cc=chethan.tumkur.narayan@intel.com \
--cc=kiran.k@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/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