All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Bluetooth: btnxpuart: Update firmware names
  2024-04-05  9:01 [PATCH v1 1/2] dt-bindings: net: bluetooth: btnxpuart: Add firmware-name property Neeraj Sanjay Kale
@ 2024-04-05  9:32 ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-04-05  9:32 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 2745 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=841719

---Test result---

Test Summary:
CheckPatch                    PASS      1.32 seconds
GitLint                       PASS      0.66 seconds
SubjectPrefix                 FAIL      0.44 seconds
BuildKernel                   PASS      32.47 seconds
CheckAllWarning               PASS      32.98 seconds
CheckSparse                   PASS      38.54 seconds
CheckSmatch                   FAIL      35.09 seconds
BuildKernel32                 PASS      29.36 seconds
TestRunnerSetup               PASS      529.51 seconds
TestRunner_l2cap-tester       PASS      18.48 seconds
TestRunner_iso-tester         FAIL      30.79 seconds
TestRunner_bnep-tester        PASS      4.69 seconds
TestRunner_mgmt-tester        PASS      115.71 seconds
TestRunner_rfcomm-tester      PASS      7.26 seconds
TestRunner_sco-tester         PASS      14.94 seconds
TestRunner_ioctl-tester       PASS      7.66 seconds
TestRunner_mesh-tester        PASS      5.86 seconds
TestRunner_smp-tester         PASS      6.75 seconds
TestRunner_userchan-tester    PASS      4.94 seconds
IncrementalBuild              PASS      32.86 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 121, Passed: 120 (99.2%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success                       Failed       4.223 seconds


---
Regards,
Linux Bluetooth


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

* RE: Bluetooth: btnxpuart: Update firmware names
  2024-04-08 13:22 [PATCH v2 1/2] dt-bindings: net: bluetooth: btnxpuart: Add firmware-name property Neeraj Sanjay Kale
@ 2024-04-08 13:56 ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-04-08 13:56 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 2479 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=842464

---Test result---

Test Summary:
CheckPatch                    PASS      1.19 seconds
GitLint                       PASS      0.57 seconds
SubjectPrefix                 FAIL      0.47 seconds
BuildKernel                   PASS      30.45 seconds
CheckAllWarning               PASS      32.86 seconds
CheckSparse                   PASS      37.91 seconds
CheckSmatch                   FAIL      34.73 seconds
BuildKernel32                 PASS      28.64 seconds
TestRunnerSetup               PASS      527.80 seconds
TestRunner_l2cap-tester       PASS      23.08 seconds
TestRunner_iso-tester         PASS      28.90 seconds
TestRunner_bnep-tester        PASS      4.75 seconds
TestRunner_mgmt-tester        PASS      112.36 seconds
TestRunner_rfcomm-tester      PASS      9.41 seconds
TestRunner_sco-tester         PASS      15.01 seconds
TestRunner_ioctl-tester       PASS      7.76 seconds
TestRunner_mesh-tester        PASS      8.64 seconds
TestRunner_smp-tester         PASS      6.81 seconds
TestRunner_userchan-tester    PASS      4.99 seconds
IncrementalBuild              PASS      33.26 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth


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

* RE: Bluetooth: btnxpuart: Update firmware names
  2024-04-10  8:10 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
@ 2024-04-10  8:36 ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-04-10  8:36 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 2480 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=843127

---Test result---

Test Summary:
CheckPatch                    PASS      1.22 seconds
GitLint                       PASS      0.59 seconds
SubjectPrefix                 FAIL      0.52 seconds
BuildKernel                   PASS      31.12 seconds
CheckAllWarning               PASS      34.48 seconds
CheckSparse                   PASS      39.04 seconds
CheckSmatch                   FAIL      35.21 seconds
BuildKernel32                 PASS      29.19 seconds
TestRunnerSetup               PASS      522.79 seconds
TestRunner_l2cap-tester       PASS      22.22 seconds
TestRunner_iso-tester         PASS      31.00 seconds
TestRunner_bnep-tester        PASS      4.69 seconds
TestRunner_mgmt-tester        PASS      110.71 seconds
TestRunner_rfcomm-tester      PASS      7.28 seconds
TestRunner_sco-tester         PASS      14.99 seconds
TestRunner_ioctl-tester       PASS      7.66 seconds
TestRunner_mesh-tester        PASS      5.74 seconds
TestRunner_smp-tester         PASS      10.07 seconds
TestRunner_userchan-tester    PASS      4.91 seconds
IncrementalBuild              PASS      32.43 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth


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

* RE: Bluetooth: btnxpuart: Update firmware names
  2024-05-14  9:13 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
@ 2024-05-14  9:56 ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-05-14  9:56 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=853011

---Test result---

Test Summary:
CheckPatch                    PASS      0.93 seconds
GitLint                       PASS      0.40 seconds
SubjectPrefix                 FAIL      1.31 seconds
BuildKernel                   PASS      30.03 seconds
CheckAllWarning               PASS      33.64 seconds
CheckSparse                   PASS      38.11 seconds
CheckSmatch                   FAIL      36.25 seconds
BuildKernel32                 PASS      28.97 seconds
TestRunnerSetup               PASS      522.65 seconds
TestRunner_l2cap-tester       PASS      20.49 seconds
TestRunner_iso-tester         FAIL      31.43 seconds
TestRunner_bnep-tester        PASS      4.67 seconds
TestRunner_mgmt-tester        PASS      107.72 seconds
TestRunner_rfcomm-tester      PASS      7.27 seconds
TestRunner_sco-tester         PASS      10.92 seconds
TestRunner_ioctl-tester       PASS      7.67 seconds
TestRunner_mesh-tester        PASS      5.73 seconds
TestRunner_smp-tester         PASS      6.77 seconds
TestRunner_userchan-tester    PASS      4.85 seconds
IncrementalBuild              PASS      31.96 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 121 (99.2%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success                       Failed       4.234 seconds


---
Regards,
Linux Bluetooth


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

* RE: Bluetooth: btnxpuart: Update firmware names
  2024-05-29  9:53 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
@ 2024-05-29 10:14 ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-05-29 10:14 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: drivers/bluetooth/btnxpuart.c:685
error: drivers/bluetooth/btnxpuart.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth


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

* [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names
@ 2024-06-14  8:49 Neeraj Sanjay Kale
  2024-06-14  8:49 ` [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Neeraj Sanjay Kale @ 2024-06-14  8:49 UTC (permalink / raw)
  To: marcel, luiz.dentz, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	amitkumar.karwar, rohit.fule, neeraj.sanjaykale, sherry.sun,
	ziniu.wang_1, haibo.chen, LnxRevLi

This patch series updates the BT firmware file names in BTNXPUART
driver, while maintaining backward compatibility by requesting old
firmware file name if new firmware file not found.

A new optional firmware-name device tree property has been added to help
override the firmware file names hardcoded in the driver.

This change is necessary as newer firmware releases will have
standardized naming convention aligned across all newer and legacy
chipsets.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>

Neeraj Sanjay Kale (2):
  dt-bindings: net: bluetooth: nxp: Add firmware-name property
  Bluetooth: btnxpuart: Update firmware names

 .../net/bluetooth/nxp,88w8987-bt.yaml         |  4 ++
 drivers/bluetooth/btnxpuart.c                 | 67 ++++++++++++++-----
 2 files changed, 54 insertions(+), 17 deletions(-)

-- 
2.34.1


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

* [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property
  2024-06-14  8:49 [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
@ 2024-06-14  8:49 ` Neeraj Sanjay Kale
  2024-06-14  9:35   ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
  2024-06-14  8:49 ` [PATCH v4 2/2] " Neeraj Sanjay Kale
  2024-06-14 17:00 ` [PATCH v4 0/2] " patchwork-bot+bluetooth
  2 siblings, 1 reply; 10+ messages in thread
From: Neeraj Sanjay Kale @ 2024-06-14  8:49 UTC (permalink / raw)
  To: marcel, luiz.dentz, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	amitkumar.karwar, rohit.fule, neeraj.sanjaykale, sherry.sun,
	ziniu.wang_1, haibo.chen, LnxRevLi

This adds a new optional device tree property called firware-name.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
v2: Add maxItems, simplify description, remove "nxp/". (Krzysztof)
v3: Corrected subject. Dropped description. (Krzysztof)
---
 .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
index f01a3988538c..37a65badb448 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -31,6 +31,9 @@ properties:
       This property depends on the module vendor's
       configuration.
 
+  firmware-name:
+    maxItems: 1
+
 required:
   - compatible
 
@@ -42,5 +45,6 @@ examples:
         bluetooth {
             compatible = "nxp,88w8987-bt";
             fw-init-baudrate = <3000000>;
+            firmware-name = "uartuart8987_bt_v0.bin";
         };
     };
-- 
2.34.1


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

* [PATCH v4 2/2] Bluetooth: btnxpuart: Update firmware names
  2024-06-14  8:49 [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
  2024-06-14  8:49 ` [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
@ 2024-06-14  8:49 ` Neeraj Sanjay Kale
  2024-06-14 17:00 ` [PATCH v4 0/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 10+ messages in thread
From: Neeraj Sanjay Kale @ 2024-06-14  8:49 UTC (permalink / raw)
  To: marcel, luiz.dentz, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt
  Cc: linux-bluetooth, netdev, devicetree, linux-kernel,
	amitkumar.karwar, rohit.fule, neeraj.sanjaykale, sherry.sun,
	ziniu.wang_1, haibo.chen, LnxRevLi

This updates the firmware names of 3 chipsets: w8987, w8997, w9098.
These changes are been done to standardize chip specific firmware
file names to be in sync with firmware names of newer chipsets.

The naming convention for BT-only files would be as follows:
For dual-radio WiFi+BT chipsets:
- <protocol-BT><chip-name>_bt_v<HW-version>.bin
For tri-radio WiFi+BT+15.4 chipsets:
- <protocol-BT><protocol-15.4><chip-name>_bt_v<HW-version>.bin

To maintain backward compatibility, this commit adds a provision to
request older firmware file name, if new firmware file name not found in
/lib/firmware/nxp/.

A new device tree property has been introduced called firmware-name, to
override the hardcoded firmware names (old and new) in the driver.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
v2: Remove "nxp/" from all firmware name definitions to be inline with
firmware file name read from device tree file. (Krzysztof)
v4: Request old firmware file name if new firmware file not found, to
avoid regressions. Added new naming schema in commit message. (Paul Menzel)
---
 drivers/bluetooth/btnxpuart.c | 67 ++++++++++++++++++++++++++---------
 1 file changed, 50 insertions(+), 17 deletions(-)

diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index ac4408e16369..ab471f1807cb 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -34,16 +34,19 @@
 /* NXP HW err codes */
 #define BTNXPUART_IR_HW_ERR		0xb0
 
-#define FIRMWARE_W8987		"nxp/uartuart8987_bt.bin"
-#define FIRMWARE_W8997		"nxp/uartuart8997_bt_v4.bin"
-#define FIRMWARE_W9098		"nxp/uartuart9098_bt_v1.bin"
-#define FIRMWARE_IW416		"nxp/uartiw416_bt_v0.bin"
-#define FIRMWARE_IW612		"nxp/uartspi_n61x_v1.bin.se"
-#define FIRMWARE_IW624		"nxp/uartiw624_bt.bin"
-#define FIRMWARE_SECURE_IW624	"nxp/uartiw624_bt.bin.se"
-#define FIRMWARE_AW693		"nxp/uartaw693_bt.bin"
-#define FIRMWARE_SECURE_AW693	"nxp/uartaw693_bt.bin.se"
-#define FIRMWARE_HELPER		"nxp/helper_uart_3000000.bin"
+#define FIRMWARE_W8987		"uart8987_bt_v0.bin"
+#define FIRMWARE_W8987_OLD	"uartuart8987_bt.bin"
+#define FIRMWARE_W8997		"uart8997_bt_v4.bin"
+#define FIRMWARE_W8997_OLD	"uartuart8997_bt_v4.bin"
+#define FIRMWARE_W9098		"uart9098_bt_v1.bin"
+#define FIRMWARE_W9098_OLD	"uartuart9098_bt_v1.bin"
+#define FIRMWARE_IW416		"uartiw416_bt_v0.bin"
+#define FIRMWARE_IW612		"uartspi_n61x_v1.bin.se"
+#define FIRMWARE_IW624		"uartiw624_bt.bin"
+#define FIRMWARE_SECURE_IW624	"uartiw624_bt.bin.se"
+#define FIRMWARE_AW693		"uartaw693_bt.bin"
+#define FIRMWARE_SECURE_AW693	"uartaw693_bt.bin.se"
+#define FIRMWARE_HELPER		"helper_uart_3000000.bin"
 
 #define CHIP_ID_W9098		0x5c03
 #define CHIP_ID_IW416		0x7201
@@ -145,6 +148,7 @@ struct psmode_cmd_payload {
 struct btnxpuart_data {
 	const char *helper_fw_name;
 	const char *fw_name;
+	const char *fw_name_old;
 };
 
 struct btnxpuart_dev {
@@ -694,19 +698,30 @@ static bool process_boot_signature(struct btnxpuart_dev *nxpdev)
 	return is_fw_downloading(nxpdev);
 }
 
-static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name)
+static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name,
+				const char *fw_name_old)
 {
 	struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
+	const char *fw_name_dt;
 	int err = 0;
 
 	if (!fw_name)
 		return -ENOENT;
 
 	if (!strlen(nxpdev->fw_name)) {
-		snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "%s", fw_name);
+		if (strcmp(fw_name, FIRMWARE_HELPER) &&
+		    !device_property_read_string(&nxpdev->serdev->dev,
+						 "firmware-name",
+						 &fw_name_dt))
+			fw_name = fw_name_dt;
+		snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "nxp/%s", fw_name);
+		err = request_firmware_direct(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);
+		if (err < 0 && fw_name_old) {
+			snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "nxp/%s", fw_name_old);
+			err = request_firmware_direct(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);
+		}
 
 		bt_dev_info(hdev, "Request Firmware: %s", nxpdev->fw_name);
-		err = request_firmware(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);
 		if (err < 0) {
 			bt_dev_err(hdev, "Firmware file %s not found", nxpdev->fw_name);
 			clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
@@ -785,10 +800,10 @@ static int nxp_recv_fw_req_v1(struct hci_dev *hdev, struct sk_buff *skb)
 	}
 
 	if (!nxp_data->helper_fw_name || nxpdev->helper_downloaded) {
-		if (nxp_request_firmware(hdev, nxp_data->fw_name))
+		if (nxp_request_firmware(hdev, nxp_data->fw_name, nxp_data->fw_name_old))
 			goto free_skb;
 	} else if (nxp_data->helper_fw_name && !nxpdev->helper_downloaded) {
-		if (nxp_request_firmware(hdev, nxp_data->helper_fw_name))
+		if (nxp_request_firmware(hdev, nxp_data->helper_fw_name, NULL))
 			goto free_skb;
 	}
 
@@ -890,10 +905,25 @@ static char *nxp_get_fw_name_from_chipid(struct hci_dev *hdev, u16 chipid,
 	return fw_name;
 }
 
+static char *nxp_get_old_fw_name_from_chipid(struct hci_dev *hdev, u16 chipid,
+					 u8 loader_ver)
+{
+	char *fw_name_old = NULL;
+
+	switch (chipid) {
+	case CHIP_ID_W9098:
+		fw_name_old = FIRMWARE_W9098_OLD;
+		break;
+	}
+	return fw_name_old;
+}
+
 static int nxp_recv_chip_ver_v3(struct hci_dev *hdev, struct sk_buff *skb)
 {
 	struct v3_start_ind *req = skb_pull_data(skb, sizeof(*req));
 	struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
+	const char *fw_name;
+	const char *fw_name_old;
 	u16 chip_id;
 	u8 loader_ver;
 
@@ -903,8 +933,9 @@ static int nxp_recv_chip_ver_v3(struct hci_dev *hdev, struct sk_buff *skb)
 	chip_id = le16_to_cpu(req->chip_id);
 	loader_ver = req->loader_ver;
 	bt_dev_info(hdev, "ChipID: %04x, Version: %d", chip_id, loader_ver);
-	if (!nxp_request_firmware(hdev, nxp_get_fw_name_from_chipid(hdev,
-								    chip_id, loader_ver)))
+	fw_name = nxp_get_fw_name_from_chipid(hdev, chip_id, loader_ver);
+	fw_name_old = nxp_get_old_fw_name_from_chipid(hdev, chip_id, loader_ver);
+	if (!nxp_request_firmware(hdev, fw_name, fw_name_old))
 		nxp_send_ack(NXP_ACK_V3, hdev);
 
 free_skb:
@@ -1426,11 +1457,13 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
 static struct btnxpuart_data w8987_data __maybe_unused = {
 	.helper_fw_name = NULL,
 	.fw_name = FIRMWARE_W8987,
+	.fw_name_old = FIRMWARE_W8987_OLD,
 };
 
 static struct btnxpuart_data w8997_data __maybe_unused = {
 	.helper_fw_name = FIRMWARE_HELPER,
 	.fw_name = FIRMWARE_W8997,
+	.fw_name_old = FIRMWARE_W8997_OLD,
 };
 
 static const struct of_device_id nxpuart_of_match_table[] __maybe_unused = {
-- 
2.34.1


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

* RE: Bluetooth: btnxpuart: Update firmware names
  2024-06-14  8:49 ` [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
@ 2024-06-14  9:35   ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2024-06-14  9:35 UTC (permalink / raw)
  To: linux-bluetooth, neeraj.sanjaykale

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=861981

---Test result---

Test Summary:
CheckPatch                    PASS      1.81 seconds
GitLint                       PASS      0.65 seconds
SubjectPrefix                 FAIL      0.50 seconds
BuildKernel                   PASS      29.42 seconds
CheckAllWarning               PASS      32.42 seconds
CheckSparse                   PASS      37.90 seconds
CheckSmatch                   PASS      109.66 seconds
BuildKernel32                 PASS      28.65 seconds
TestRunnerSetup               PASS      529.34 seconds
TestRunner_l2cap-tester       PASS      18.91 seconds
TestRunner_iso-tester         PASS      33.54 seconds
TestRunner_bnep-tester        PASS      4.97 seconds
TestRunner_mgmt-tester        FAIL      115.22 seconds
TestRunner_rfcomm-tester      PASS      7.70 seconds
TestRunner_sco-tester         PASS      15.43 seconds
TestRunner_ioctl-tester       PASS      8.29 seconds
TestRunner_mesh-tester        PASS      6.08 seconds
TestRunner_smp-tester         PASS      7.03 seconds
TestRunner_userchan-tester    PASS      5.53 seconds
IncrementalBuild              PASS      34.24 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 488 (99.2%), Failed: 2, Not Run: 2

Failed Test Cases
LL Privacy - Add Device 4 (2 Devices to AL)          Failed       0.162 seconds
LL Privacy - Add Device 6 (RL is full)               Failed       0.198 seconds


---
Regards,
Linux Bluetooth


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

* Re: [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names
  2024-06-14  8:49 [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
  2024-06-14  8:49 ` [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
  2024-06-14  8:49 ` [PATCH v4 2/2] " Neeraj Sanjay Kale
@ 2024-06-14 17:00 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-14 17:00 UTC (permalink / raw)
  To: Neeraj Sanjay Kale
  Cc: marcel, luiz.dentz, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt, linux-bluetooth, netdev, devicetree, linux-kernel,
	amitkumar.karwar, rohit.fule, sherry.sun, ziniu.wang_1,
	haibo.chen, LnxRevLi

Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 14 Jun 2024 14:19:39 +0530 you wrote:
> This patch series updates the BT firmware file names in BTNXPUART
> driver, while maintaining backward compatibility by requesting old
> firmware file name if new firmware file not found.
> 
> A new optional firmware-name device tree property has been added to help
> override the firmware file names hardcoded in the driver.
> 
> [...]

Here is the summary with links:
  - [v4,1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property
    https://git.kernel.org/bluetooth/bluetooth-next/c/3a8decfc6350
  - [v4,2/2] Bluetooth: btnxpuart: Update firmware names
    https://git.kernel.org/bluetooth/bluetooth-next/c/2c4d9d8e879b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-06-14 17:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14  8:49 [PATCH v4 0/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
2024-06-14  8:49 ` [PATCH v4 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
2024-06-14  9:35   ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
2024-06-14  8:49 ` [PATCH v4 2/2] " Neeraj Sanjay Kale
2024-06-14 17:00 ` [PATCH v4 0/2] " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2024-05-29  9:53 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
2024-05-29 10:14 ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
2024-05-14  9:13 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
2024-05-14  9:56 ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
2024-04-10  8:10 [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
2024-04-10  8:36 ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
2024-04-08 13:22 [PATCH v2 1/2] dt-bindings: net: bluetooth: btnxpuart: Add firmware-name property Neeraj Sanjay Kale
2024-04-08 13:56 ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot
2024-04-05  9:01 [PATCH v1 1/2] dt-bindings: net: bluetooth: btnxpuart: Add firmware-name property Neeraj Sanjay Kale
2024-04-05  9:32 ` Bluetooth: btnxpuart: Update firmware names bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.