Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> Cc: Aiqun Yu (Maria) <quic_aiquny@xxxxxxxxxxx>
> Cc: Cheng Jiang <quic_chejiang@xxxxxxxxxxx>
> Cc: Johan Hovold <johan@xxxxxxxxxx>
> Cc: Jens Glathe <jens.glathe@xxxxxxxxxxxxxxxxxxxxxx>
> Cc: Steev Klimaszewski <steev@xxxxxxxx>
> Cc: Paul Menzel <pmenzel@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx # 6.4
> Reviewed-by: Johan Hovold <johan+linaro@xxxxxxxxxx>

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@xxxxxxxxxx>
> Tested-by: Steev Klimaszewski <steev@xxxxxxxx>
> Tested-by: Jens Glathe <jens.glathe@xxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>

> 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
> - Link to v1: https://lore.kernel.org/r/20241113-x13s_wcn6855_fix-v1-1-15af0aa2549c@xxxxxxxxxxx
 
> +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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux