Skip to content

Commit ec8dd95

Browse files
committed
FROMLIST: driver: bluetooth:btusb: Allow firmware re-download when version matches
Since USB can disconnect at any time, if it disconnects during the BT firmware download, the BT controller firmware version may still be updated even without completing the download. When USB reconnects, the BT host detects the same version as in the firmware file, which prevents the firmware from being downloaded again. Therefore, remove the equality check to ensure that after USB reconnection, the BT host can still download the firmware. Link: https://lore.kernel.org/all/20260108074353.1027877-1-shuai.zhang@oss.qualcomm.com/ Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
1 parent 0cf570b commit ec8dd95

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/bluetooth/btusb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,10 @@ static int btusb_setup_qca_load_rampatch(struct hci_dev *hdev,
34663466
"firmware rome 0x%x build 0x%x",
34673467
rver_rom, rver_patch, ver_rom, ver_patch);
34683468

3469-
if (rver_rom != ver_rom || rver_patch <= ver_patch) {
3469+
/* Allow rampatch if version is greater than or equal to firmware version.
3470+
* Equal versions are acceptable for re-flashing or recovery scenarios.
3471+
*/
3472+
if (rver_rom != ver_rom || rver_patch < ver_patch) {
34703473
bt_dev_err(hdev, "rampatch file version did not match with firmware");
34713474
err = -EINVAL;
34723475
goto done;

0 commit comments

Comments
 (0)