Re: [PATCH v9 1/9] Bluetooth: btintel: Check firmware version before download
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-03-23 18:50:01
Hi Marcel, On Tue, Mar 16, 2021 at 7:01 AM Marcel Holtmann [off-list ref] wrote:
Hi Tedd,quoted
quoted
This checks the firmware build number, week and year against the repective loaded version. If details are a match, skip the download process. Signed-off-by: Luiz Augusto von Dentz <redacted> --- v2: Add patch that mover checks for operational mode after the version checking. v3: Fix not checking for operation mode before using btintel_read_boot_params since some models depend on that to contruct the fw filename. Also attempt to cleanup duplicated code. v4: Fix forwarding -EALREADY when firmware has already been loaded. v5: Fix not advancing fw_ptr. v6: Fix btusb_setup_intel_new_get_fw_name error checking for ddc. v7: Disable version checking for WsP/SfP. v8: Really disables version checking for WsP/SfP. v9: Reintroduce bootloader checks and add workaround for version checking when operation and version cannot be read. drivers/bluetooth/btintel.c | 106 +++++++++++++++++++++++++++------- drivers/bluetooth/btintel.h | 5 +- drivers/bluetooth/btusb.c | 18 +++++- drivers/bluetooth/hci_intel.c | 7 ++- 4 files changed, 109 insertions(+), 27 deletions(-)I ran a quick test the v9 with the devices what I have. Test cases are: - cold boot - expect to downloading the firmware - reboot - expect to no firmware downloading - fw upgrade - expect to device reset and download new firmware Devices tests: SfP, WsP, ThP, TyP Results: ThP, TyP: All 3 test cases were passed. SfP, WsP: fw upgrade case(#3) didn't work but it was known issue - insufficient fw version information in the firmware file Tested-by: Tedd Ho-Jeong An <redacted> Tested-by: Kiran K <redacted>so I should go ahead and apply these patches?
I will send a v10 shortly, there was a build problem when CONFIG_BT_INTEL is not set.
Regards Marcel
-- Luiz Augusto von Dentz