mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
@ 2024-11-16 15:49 Zijun Hu
  2024-11-18 12:43 ` Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Zijun Hu @ 2024-11-16 15:49 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Bjorn Andersson,
	Steev Klimaszewski
  Cc: Paul Menzel, Zijun Hu, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Johan Hovold, Jens Glathe, stable, Johan Hovold,
	Zijun Hu

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>
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>
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>
---
Thank you Paul, Jens, Steev, Johan, Luiz for code review, various
verification, comments and suggestions. these comments and suggestions
are very good, and all of them are taken by this v2 patch.

Regarding the variant 'g', sorry for that i can say nothing due to
confidential information (CCI), but fortunately, we don't need to
care about its difference against one without 'g' from BT host
perspective, qca_get_hsp_nvm_name_generic() shows how to map BT chip
to firmware.

I will help to backport it to LTS kernels ASAP once this commit
is mainlined.
---
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@quicinc.com
---
 drivers/bluetooth/btqca.c | 44 +++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index dfbbac92242a..ddfe7e3c9b50 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -717,6 +717,29 @@ static void qca_generate_hsp_nvm_name(char *fwname, size_t max_size,
 		snprintf(fwname, max_size, "qca/hpnv%02x%s.%x", rom_ver, variant, bid);
 }
 
+static void qca_get_hsp_nvm_name_generic(struct qca_fw_config *cfg,
+					 struct qca_btsoc_version ver,
+					 u8 rom_ver, u16 bid)
+{
+	const char *variant;
+
+	/* hsp gf chip */
+	if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID)
+		variant = "g";
+	else
+		variant = "";
+
+	if (bid == 0x0)
+		snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/hpnv%02x%s.bin",
+			 rom_ver, variant);
+	else if (bid & 0xff00)
+		snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/hpnv%02x%s.b%x",
+			 rom_ver, variant, bid);
+	else
+		snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/hpnv%02x%s.b%02x",
+			 rom_ver, variant, bid);
+}
+
 static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg,
 					    const char *stem, u8 rom_ver, u16 bid)
 {
@@ -810,8 +833,15 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 	/* Give the controller some time to get ready to receive the NVM */
 	msleep(10);
 
-	if (soc_type == QCA_QCA2066 || soc_type == QCA_WCN7850)
+	switch (soc_type) {
+	case QCA_QCA2066:
+	case QCA_WCN6855:
+	case QCA_WCN7850:
 		qca_read_fw_board_id(hdev, &boardid);
+		break;
+	default:
+		break;
+	}
 
 	/* Download NVM configuration */
 	config.type = TLV_TYPE_NVM;
@@ -848,8 +878,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 				 "qca/msnv%02x.bin", rom_ver);
 			break;
 		case QCA_WCN6855:
-			snprintf(config.fwname, sizeof(config.fwname),
-				 "qca/hpnv%02x.bin", rom_ver);
+			qca_get_hsp_nvm_name_generic(&config, ver, rom_ver, boardid);
 			break;
 		case QCA_WCN7850:
 			qca_get_nvm_name_generic(&config, "hmt", rom_ver, boardid);
@@ -861,9 +890,18 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 		}
 	}
 
+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;
 	}
 

---
base-commit: e88b020190bf5bc3e7ce5bd8003fc39b23cc95fe
change-id: 20241113-x13s_wcn6855_fix-53c573ff7878

Best regards,
-- 
Zijun Hu <quic_zijuhu@quicinc.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-11-16 15:49 [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855 Zijun Hu
@ 2024-11-18 12:43 ` Johan Hovold
  2024-11-19  2:13   ` quic_zijuhu
  2024-12-04  4:50 ` quic_zijuhu
  2024-12-13  9:22 ` Johan Hovold
  2 siblings, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2024-11-18 12:43 UTC (permalink / raw)
  To: Zijun Hu
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Bjorn Andersson,
	Steev Klimaszewski, Paul Menzel, Zijun Hu, linux-bluetooth,
	linux-kernel, Luiz Augusto von Dentz, Bjorn Andersson,
	Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-11-18 12:43 ` Johan Hovold
@ 2024-11-19  2:13   ` quic_zijuhu
  2024-11-19  7:10     ` Johan Hovold
  0 siblings, 1 reply; 9+ messages in thread
From: quic_zijuhu @ 2024-11-19  2:13 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Bjorn Andersson,
	Steev Klimaszewski, Paul Menzel, Zijun Hu, linux-bluetooth,
	linux-kernel, Luiz Augusto von Dentz, Bjorn Andersson,
	Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

On 11/18/2024 8:43 PM, Johan Hovold wrote:
> 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.
> 

thank you for pointing out this and sharing good suggestions
will follow these suggestions for further patches.

>> 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.
> 

make sense. will notice these aspects for further patches.

> The fallback handling looks good to me though (and also works as
> expected).
> 

so, is it okay to make this patch still keep tags given by you ?

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

yes. i think it is okay now.

> [    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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-11-19  2:13   ` quic_zijuhu
@ 2024-11-19  7:10     ` Johan Hovold
  0 siblings, 0 replies; 9+ messages in thread
From: Johan Hovold @ 2024-11-19  7:10 UTC (permalink / raw)
  To: quic_zijuhu
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Bjorn Andersson,
	Steev Klimaszewski, Paul Menzel, Zijun Hu, linux-bluetooth,
	linux-kernel, Luiz Augusto von Dentz, Bjorn Andersson,
	Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

On Tue, Nov 19, 2024 at 10:13:11AM +0800, quic_zijuhu wrote:
> On 11/18/2024 8:43 PM, Johan Hovold wrote:
> > 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.

> >> 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.
> 
> make sense. will notice these aspects for further patches.
> 
> > The fallback handling looks good to me though (and also works as
> > expected).
> 
> so, is it okay to make this patch still keep tags given by you ?

Yes, it's fine to keep my Reviewed-by and Tested-by tags.

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

> > 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:
> 
> yes. i think it is okay now.

Then I think this patch is ready to be merged.

Thanks again for your help with this.

Johan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-11-16 15:49 [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855 Zijun Hu
  2024-11-18 12:43 ` Johan Hovold
@ 2024-12-04  4:50 ` quic_zijuhu
  2024-12-13  9:22 ` Johan Hovold
  2 siblings, 0 replies; 9+ messages in thread
From: quic_zijuhu @ 2024-12-04  4:50 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Paul Menzel, Zijun Hu, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Johan Hovold, Jens Glathe, stable, Johan Hovold,
	Bjorn Andersson, Steev Klimaszewski, Marcel Holtmann

On 11/16/2024 11:49 PM, 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.
> 

Hi Luiz,

could you please code review for this change ?

several types of product in market need this fix, hope it will go to
mainline as early as possible.

sorry for this noise.

> 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>
> 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>
> 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>
> ---
> Thank you Paul, Jens, Steev, Johan, Luiz for code review, various
> verification, comments and suggestions. these comments and suggestions
> are very good, and all of them are taken by this v2 patch.
> 
> Regarding the variant 'g', sorry for that i can say nothing due to
> confidential information (CCI), but fortunately, we don't need to
> care about its difference against one without 'g' from BT host
> perspective, qca_get_hsp_nvm_name_generic() shows how to map BT chip
> to firmware.
> 
> I will help to backport it to LTS kernels ASAP once this commit
> is mainlined.
> ---
> 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@quicinc.com
> ---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-11-16 15:49 [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855 Zijun Hu
  2024-11-18 12:43 ` Johan Hovold
  2024-12-04  4:50 ` quic_zijuhu
@ 2024-12-13  9:22 ` Johan Hovold
  2025-01-13  9:24   ` Johan Hovold
  2 siblings, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2024-12-13  9:22 UTC (permalink / raw)
  To: Zijun Hu, Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Bjorn Andersson, Steev Klimaszewski,
	Paul Menzel, Zijun Hu, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

Hi Luiz,

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>
> 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>
> 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>

> I will help to backport it to LTS kernels ASAP once this commit
> is mainlined.
> ---
> 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@quicinc.com

The board-specific NVM configuration files have now been included in the
linux-firmware-20241210 release and are making their way into the
distros (e.g. Arch Linux ARM and Fedora now ship them).

Could we get this merged for 6.13-rc (and backported) so that Lenovo
ThinkPad X13s users can finally enjoy excellent Bluetooth range? :)

Johan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2024-12-13  9:22 ` Johan Hovold
@ 2025-01-13  9:24   ` Johan Hovold
  2025-01-13 12:37     ` Zijun Hu
  2025-01-13 13:55     ` Luiz Augusto von Dentz
  0 siblings, 2 replies; 9+ messages in thread
From: Johan Hovold @ 2025-01-13  9:24 UTC (permalink / raw)
  To: Zijun Hu, Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Bjorn Andersson, Steev Klimaszewski,
	Paul Menzel, Zijun Hu, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

Hi Luiz,

On Fri, Dec 13, 2024 at 10:22:05AM +0100, Johan Hovold wrote:
> 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.

> > 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>
> > 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>
> 
> > I will help to backport it to LTS kernels ASAP once this commit
> > is mainlined.
> > ---
> > 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@quicinc.com
> 
> The board-specific NVM configuration files have now been included in the
> linux-firmware-20241210 release and are making their way into the
> distros (e.g. Arch Linux ARM and Fedora now ship them).
> 
> Could we get this merged for 6.13-rc (and backported) so that Lenovo
> ThinkPad X13s users can finally enjoy excellent Bluetooth range? :)

This fix is still pending in your queue (I hope) and I was hoping you
would be able to get it into 6.13-rc. The reason, apart from this being
a crucial fix for users of this chipset, was also to avoid any conflicts
with the new "rampatch" firmware name feature (which will also
complicate backporting somewhat).

Those patches were resent on January 7 and have now been merged for 6.14
(presumably):

	https://lore.kernel.org/all/20250107092650.498154-1-quic_chejiang@quicinc.com/

How do we handle this? Can you still get this fix into 6.13 or is it
now, as I assume, too late for that?

Zijun, depending on Luiz' reply, can you look into rebasing on top of the
patches now queued for linux-next?

Johan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2025-01-13  9:24   ` Johan Hovold
@ 2025-01-13 12:37     ` Zijun Hu
  2025-01-13 13:55     ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 9+ messages in thread
From: Zijun Hu @ 2025-01-13 12:37 UTC (permalink / raw)
  To: Johan Hovold, Zijun Hu, Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Bjorn Andersson, Steev Klimaszewski,
	Paul Menzel, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

On 2025/1/13 17:24, Johan Hovold wrote:
> Hi Luiz,
> 
> On Fri, Dec 13, 2024 at 10:22:05AM +0100, Johan Hovold wrote:
>> 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.
> 
>>> 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>
>>> 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>
>>
>>> I will help to backport it to LTS kernels ASAP once this commit
>>> is mainlined.
>>> ---
>>> 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@quicinc.com
>>
>> The board-specific NVM configuration files have now been included in the
>> linux-firmware-20241210 release and are making their way into the
>> distros (e.g. Arch Linux ARM and Fedora now ship them).
>>
>> Could we get this merged for 6.13-rc (and backported) so that Lenovo
>> ThinkPad X13s users can finally enjoy excellent Bluetooth range? :)
> 
> This fix is still pending in your queue (I hope) and I was hoping you
> would be able to get it into 6.13-rc. The reason, apart from this being
> a crucial fix for users of this chipset, was also to avoid any conflicts
> with the new "rampatch" firmware name feature (which will also
> complicate backporting somewhat).
> 
> Those patches were resent on January 7 and have now been merged for 6.14
> (presumably):
> 
> 	https://lore.kernel.org/all/20250107092650.498154-1-quic_chejiang@quicinc.com/
> 
> How do we handle this? Can you still get this fix into 6.13 or is it
> now, as I assume, too late for that?
> 
> Zijun, depending on Luiz' reply, can you look into rebasing on top of the
> patches now queued for linux-next?
> 

sure. let me do it with high priority.

> Johan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855
  2025-01-13  9:24   ` Johan Hovold
  2025-01-13 12:37     ` Zijun Hu
@ 2025-01-13 13:55     ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2025-01-13 13:55 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Zijun Hu, Marcel Holtmann, Bjorn Andersson, Steev Klimaszewski,
	Paul Menzel, Zijun Hu, linux-bluetooth, linux-kernel,
	Luiz Augusto von Dentz, Bjorn Andersson, Aiqun Yu (Maria),
	Cheng Jiang, Jens Glathe, stable, Johan Hovold

Hi Johan,

On Mon, Jan 13, 2025 at 4:24 AM Johan Hovold <johan@kernel.org> wrote:
>
> Hi Luiz,
>
> On Fri, Dec 13, 2024 at 10:22:05AM +0100, Johan Hovold wrote:
> > 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.
>
> > > 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>
> > > 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>
> >
> > > I will help to backport it to LTS kernels ASAP once this commit
> > > is mainlined.
> > > ---
> > > 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@quicinc.com
> >
> > The board-specific NVM configuration files have now been included in the
> > linux-firmware-20241210 release and are making their way into the
> > distros (e.g. Arch Linux ARM and Fedora now ship them).
> >
> > Could we get this merged for 6.13-rc (and backported) so that Lenovo
> > ThinkPad X13s users can finally enjoy excellent Bluetooth range? :)
>
> This fix is still pending in your queue (I hope) and I was hoping you
> would be able to get it into 6.13-rc. The reason, apart from this being
> a crucial fix for users of this chipset, was also to avoid any conflicts
> with the new "rampatch" firmware name feature (which will also
> complicate backporting somewhat).
>
> Those patches were resent on January 7 and have now been merged for 6.14
> (presumably):
>
>         https://lore.kernel.org/all/20250107092650.498154-1-quic_chejiang@quicinc.com/
>
> How do we handle this? Can you still get this fix into 6.13 or is it
> now, as I assume, too late for that?
>
> Zijun, depending on Luiz' reply, can you look into rebasing on top of the
> patches now queued for linux-next?
>
> Johan

I will send a pull request later this week that includes everything on
bluetooth-next, so it has been merged on bluetooth-next it should be
fine, it hasn't been merged then please resend it.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-01-13 13:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-16 15:49 [PATCH v2] Bluetooth: qca: Support downloading board ID specific NVM for WCN6855 Zijun Hu
2024-11-18 12:43 ` Johan Hovold
2024-11-19  2:13   ` quic_zijuhu
2024-11-19  7:10     ` Johan Hovold
2024-12-04  4:50 ` quic_zijuhu
2024-12-13  9:22 ` Johan Hovold
2025-01-13  9:24   ` Johan Hovold
2025-01-13 12:37     ` Zijun Hu
2025-01-13 13:55     ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®