From: Ameen Al-Asady <ameenaladdin@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Paul Menzel <pmenzel@molgen.mpg.de>,
Ameen Al-Asady <ameenaladdin@gmail.com>
Subject: [PATCH v2 1/2] Bluetooth: btintel: Fix spurious error on FW download error recovery
Date: Mon, 13 Jul 2026 23:10:04 -0400 [thread overview]
Message-ID: <20260714031005.230895-1-ameenaladdin@gmail.com> (raw)
When the firmware download errors out because the controller is
running an operational image whose version does not match the
firmware file on disk, btintel_reset_to_bootloader() sends the Intel
Reset vendor command to force the controller back into bootloader
mode and retry the download. This is the normal upgrade path after a
linux-firmware update followed by a warm reboot, since the
operational image survives in controller RAM. In the log below the
controller is still running build 81755 (2024.33) while
intel/ibt-0041-0041.sfi on disk contains build 82122 (2026.5).
The controller acts on Intel Reset by resetting and re-enumerating
on the bus. This can happen before the command complete event is
delivered, in which case __hci_cmd_sync() returns -ENODEV and the
driver logs a misleading error even though recovery is working:
Bluetooth: hci0: Firmware timestamp 2024.33 buildtype 1 build 81755
Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
usb 1-6: USB disconnect, device number 4
Bluetooth: hci0: FW download error recovery failed (-19)
usb 1-6: new full-speed USB device number 5 using xhci_hcd
...
Bluetooth: hci0: Firmware loaded in 2827613 usecs
Bluetooth: hci0: Firmware timestamp 2026.5 buildtype 1 build 82122
Treat -ENODEV as the expected outcome of the reset and keep the
error message for genuine failures.
Tested on an Intel AX210 (USB 8087:0032) on a 7.1.3 kernel by
rebinding btusb with a non-matching firmware file on disk, in both
the downgrade and upgrade direction. Both runs took the -ENODEV
path, logged the info message instead of the error and completed
the download after re-enumeration.
Signed-off-by: Ameen Al-Asady <ameenaladdin@gmail.com>
---
v2: reword commit message, add firmware versions and tested system
(Paul Menzel)
drivers/bluetooth/btintel.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 5e9cac090..472542bff 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1363,12 +1363,22 @@ static void btintel_reset_to_bootloader(struct hci_dev *hdev)
skb = __hci_cmd_sync(hdev, BTINTEL_HCI_OP_RESET, sizeof(params),
¶ms, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
- bt_dev_err(hdev, "FW download error recovery failed (%ld)",
- PTR_ERR(skb));
- return;
+ /* The controller acts on Intel Reset by resetting and
+ * re-enumerating on the bus, which can happen before the
+ * command complete event is delivered. The resulting
+ * -ENODEV means the reset took effect, not that recovery
+ * failed.
+ */
+ if (PTR_ERR(skb) != -ENODEV) {
+ bt_dev_err(hdev,
+ "FW download error recovery failed (%ld)",
+ PTR_ERR(skb));
+ return;
+ }
+ } else {
+ kfree_skb(skb);
}
bt_dev_info(hdev, "Intel reset sent to retry FW download");
- kfree_skb(skb);
/* Current Intel BT controllers(ThP/JfP) hold the USB reset
* lines for 2ms when it receives Intel Reset in bootloader mode.
base-commit: eab19cb7618e5c50fd1f8c1efdc4e66e16575975
--
2.55.0
next reply other threads:[~2026-07-14 3:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 3:10 Ameen Al-Asady [this message]
2026-07-14 3:10 ` [PATCH v2 2/2] Bluetooth: hci_sync: Skip MSFT/AOSP init when controller init failed Ameen Al-Asady
2026-07-14 4:07 ` [v2,1/2] Bluetooth: btintel: Fix spurious error on FW download error recovery 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=20260714031005.230895-1-ameenaladdin@gmail.com \
--to=ameenaladdin@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=pmenzel@molgen.mpg.de \
/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