Skip to content

Commit 10b91ca

Browse files
shuaz-shuaiche-jiang
authored andcommitted
FROMLIST: driver: bluetooth:btusb: Allow firmwarea 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. Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260108074353.1027877-1-shuai.zhang@oss.qualcomm.com/
1 parent 7fd2df2 commit 10b91ca

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
@@ -3540,7 +3540,10 @@ static int btusb_setup_qca_load_rampatch(struct hci_dev *hdev,
35403540
"firmware rome 0x%x build 0x%x",
35413541
rver_rom, rver_patch, ver_rom, ver_patch);
35423542

3543-
if (rver_rom != ver_rom || rver_patch <= ver_patch) {
3543+
/* Allow rampatch if version is greater than or equal to firmware version.
3544+
* Equal versions are acceptable for re-flashing or recovery scenarios.
3545+
*/
3546+
if (rver_rom != ver_rom || rver_patch < ver_patch) {
35443547
bt_dev_err(hdev, "rampatch file version did not match with firmware");
35453548
err = -EINVAL;
35463549
goto done;

0 commit comments

Comments
 (0)