On Sat, Nov 16, 2024 at 07:49:23AM -0800, Zijun Hu wrote:
For WCN6855, board ID specific NVM needs to be downloaded once board ID is available, but the default NVM is always downloaded currently, and the wrong NVM causes poor RF performance which effects user experience.
Fix by downloading board ID specific NVM if board ID is available.
Cc: Bjorn Andersson bjorande@quicinc.com Cc: Aiqun Yu (Maria) quic_aiquny@quicinc.com Cc: Cheng Jiang quic_chejiang@quicinc.com Cc: Johan Hovold johan@kernel.org Cc: Jens Glathe jens.glathe@oldschoolsolutions.biz Cc: Steev Klimaszewski steev@kali.org Cc: Paul Menzel pmenzel@molgen.mpg.de
Nit: These Cc tags should typically not be here in the commit message, and should at least not be needed for people who git-send-email will already include because of Tested-by and Reviewed-by tags.
If they help with your workflow then perhaps you can just put them below the cut-off (---) line.
Fixes: 095327fede00 ("Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855") Cc: stable@vger.kernel.org # 6.4 Reviewed-by: Johan Hovold johan+linaro@kernel.org
When making non-trivial changes, like the addition of the fallback NVM feature in v2, you should probably have dropped any previous Reviewed-by tags.
The fallback handling looks good to me though (and also works as expected).
Tested-by: Johan Hovold johan+linaro@kernel.org Tested-by: Steev Klimaszewski steev@kali.org Tested-by: Jens Glathe jens.glathe@oldschoolsolutions.biz Signed-off-by: Zijun Hu quic_zijuhu@quicinc.com
Changes in v2:
- Correct subject and commit message
- Temporarily add nvm fallback logic to speed up backport.
— Add fix/stable tags as suggested by Luiz and Johan
+download_nvm: err = qca_download_firmware(hdev, &config, soc_type, rom_ver); if (err < 0) { bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
if (err == -ENOENT && boardid != 0 &&
soc_type == QCA_WCN6855) {
boardid = 0;
qca_get_hsp_nvm_name_generic(&config, ver,
rom_ver, boardid);
bt_dev_warn(hdev, "QCA fallback to default NVM");
goto download_nvm;
return err;}
If you think it's ok for people to continue using the wrong (default) NVM file for a while still until their distros ship the board-specific ones, then this looks good to me and should ease the transition:
[ 6.125626] Bluetooth: hci0: QCA Downloading qca/hpnv21g.b8c [ 6.126730] bluetooth hci0: Direct firmware load for qca/hpnv21g.b8c failed with error -2 [ 6.126826] Bluetooth: hci0: QCA Failed to request file: qca/hpnv21g.b8c (-2) [ 6.126894] Bluetooth: hci0: QCA Failed to download NVM (-2) [ 6.126951] Bluetooth: hci0: QCA fallback to default NVM [ 6.127003] Bluetooth: hci0: QCA Downloading qca/hpnv21g.bin [ 6.309322] Bluetooth: hci0: QCA setup on UART is completed
Johan