[PATCH v2 1/2] Bluetooth: btintel: Fix boot address

Subsystems: bluetooth drivers, the rest

STALE1795d

5 messages, 3 authors, 2021-08-31 · open the first message on its own page

[PATCH v2 1/2] Bluetooth: btintel: Fix boot address

From: Kiran K <hidden>
Date: 2021-08-31 12:55:06

Cache Boot address present in firmware file which
is later used in Intel_Soft_Reset command to bring
controller from boot mode to operational mode.

Signed-off-by: Kiran K <redacted>
---

Notes:
    * changes in v2:
     - move reading of boot address to seprate patch
    
    * changes in v1:
     - cache boot address
     - read boot address irrespective of mode

 drivers/bluetooth/btintel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 778d803159f3..14360370a2ac 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1037,8 +1037,9 @@ static bool btintel_firmware_version(struct hci_dev *hdev,
 
 			params = (void *)(fw_ptr + sizeof(*cmd));
 
-			bt_dev_info(hdev, "Boot Address: 0x%x",
-				    le32_to_cpu(params->boot_addr));
+			*boot_addr = le32_to_cpu(params->boot_addr);
+
+			bt_dev_info(hdev, "Boot Address: 0x%x", *boot_addr);
 
 			bt_dev_info(hdev, "Firmware Version: %u-%u.%u",
 				    params->fw_build_num, params->fw_build_ww,
-- 
2.17.1

[PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode

From: Kiran K <hidden>
Date: 2021-08-31 12:55:08

Boot address was not getting updated when controller is present
in boot mode which is required to move the controller from boot mode
to operation mode after firmware download. This patch reads boot address
even if controller is present in boot mode.

Signed-off-by: Kiran K <redacted>
---

Notes:
    changes in v2 (new patch):
     - Read boot address irrespective of controller mode

 drivers/bluetooth/btintel.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 14360370a2ac..7236f40b7a9c 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1072,9 +1072,6 @@ int btintel_download_firmware(struct hci_dev *hdev,
 		/* Skip version checking */
 		break;
 	default:
-		/* Skip reading firmware file version in bootloader mode */
-		if (ver->fw_variant == 0x06)
-			break;
 
 		/* Skip download if firmware has the same version */
 		if (btintel_firmware_version(hdev, ver->fw_build_num,
@@ -1115,19 +1112,16 @@ static int btintel_download_fw_tlv(struct hci_dev *hdev,
 	int err;
 	u32 css_header_ver;
 
-	/* Skip reading firmware file version in bootloader mode */
-	if (ver->img_type != 0x01) {
-		/* Skip download if firmware has the same version */
-		if (btintel_firmware_version(hdev, ver->min_fw_build_nn,
-					     ver->min_fw_build_cw,
-					     ver->min_fw_build_yy,
-					     fw, boot_param)) {
-			bt_dev_info(hdev, "Firmware already loaded");
-			/* Return -EALREADY to indicate that firmware has
-			 * already been loaded.
-			 */
-			return -EALREADY;
-		}
+	/* Skip download if firmware has the same version */
+	if (btintel_firmware_version(hdev, ver->min_fw_build_nn,
+				     ver->min_fw_build_cw,
+				     ver->min_fw_build_yy,
+				     fw, boot_param)) {
+		bt_dev_info(hdev, "Firmware already loaded");
+		/* Return -EALREADY to indicate that firmware has
+		 * already been loaded.
+		 */
+		return -EALREADY;
 	}
 
 	/* The firmware variant determines if the device is in bootloader
-- 
2.17.1

Re: [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2021-08-31 13:38:16

Hi Kiran,
Boot address was not getting updated when controller is present
in boot mode which is required to move the controller from boot mode
to operation mode after firmware download. This patch reads boot address
even if controller is present in boot mode.

Signed-off-by: Kiran K <redacted>
---

Notes:
   changes in v2 (new patch):
    - Read boot address irrespective of controller mode

drivers/bluetooth/btintel.c | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
patch has been applied to bluetooth-next tree.

Regards

Marcel

Re: [PATCH v2 1/2] Bluetooth: btintel: Fix boot address

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2021-08-31 13:38:20

Hi Kiran,
Cache Boot address present in firmware file which
is later used in Intel_Soft_Reset command to bring
controller from boot mode to operational mode.

Signed-off-by: Kiran K <redacted>
---

Notes:
   * changes in v2:
    - move reading of boot address to seprate patch

   * changes in v1:
    - cache boot address
    - read boot address irrespective of mode

drivers/bluetooth/btintel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.

Regards

Marcel

RE: [v2,1/2] Bluetooth: btintel: Fix boot address

From: <hidden>
Date: 2021-08-31 19:09:47

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

---Test result---

Test Summary:
CheckPatch                    PASS      1.03 seconds
GitLint                       PASS      0.24 seconds
BuildKernel                   PASS      601.24 seconds
TestRunner: Setup             PASS      396.13 seconds
TestRunner: l2cap-tester      PASS      2.71 seconds
TestRunner: bnep-tester       PASS      2.06 seconds
TestRunner: mgmt-tester       PASS      32.82 seconds
TestRunner: rfcomm-tester     PASS      2.32 seconds
TestRunner: sco-tester        PASS      2.19 seconds
TestRunner: smp-tester        PASS      2.26 seconds
TestRunner: userchan-tester   PASS      2.09 seconds

Details
##############################
Test: CheckPatch - PASS - 1.03 seconds
Run checkpatch.pl script with rule in .checkpatch.conf


##############################
Test: GitLint - PASS - 0.24 seconds
Run gitlint with rule in .gitlint


##############################
Test: BuildKernel - PASS - 601.24 seconds
Build Kernel with minimal configuration supports Bluetooth


##############################
Test: TestRunner: Setup - PASS - 396.13 seconds
Setup environment for running Test Runner


##############################
Test: TestRunner: l2cap-tester - PASS - 2.71 seconds
Run test-runner with l2cap-tester
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: bnep-tester - PASS - 2.06 seconds
Run test-runner with bnep-tester
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: mgmt-tester - PASS - 32.82 seconds
Run test-runner with mgmt-tester
Total: 452, Passed: 452 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: rfcomm-tester - PASS - 2.32 seconds
Run test-runner with rfcomm-tester
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: sco-tester - PASS - 2.19 seconds
Run test-runner with sco-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: smp-tester - PASS - 2.26 seconds
Run test-runner with smp-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: TestRunner: userchan-tester - PASS - 2.09 seconds
Run test-runner with userchan-tester
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0



---
Regards,
Linux Bluetooth
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help