All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Bluetooth: btintel: Fix boot address
@ 2021-08-31 13:00 Kiran K
  2021-08-31 13:00 ` [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode Kiran K
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kiran K @ 2021-08-31 13:00 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: ravishankar.srivatsa, chethan.tumkur.narayan, tedd.an,
	luiz.von.dentz, Kiran K

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 <kiran.k@intel.com>
---

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


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

* [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode
  2021-08-31 13:00 [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Kiran K
@ 2021-08-31 13:00 ` Kiran K
  2021-08-31 13:38   ` Marcel Holtmann
  2021-08-31 13:38 ` [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Marcel Holtmann
  2021-08-31 19:09 ` [v2,1/2] " bluez.test.bot
  2 siblings, 1 reply; 5+ messages in thread
From: Kiran K @ 2021-08-31 13:00 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: ravishankar.srivatsa, chethan.tumkur.narayan, tedd.an,
	luiz.von.dentz, Kiran K

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 <kiran.k@intel.com>
---

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


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

* Re: [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode
  2021-08-31 13:00 ` [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode Kiran K
@ 2021-08-31 13:38   ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2021-08-31 13:38 UTC (permalink / raw)
  To: Kiran K
  Cc: open list:BLUETOOTH SUBSYSTEM, ravishankar.srivatsa,
	chethan.tumkur.narayan, tedd.an, Luiz Augusto von Dentz

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 <kiran.k@intel.com>
> ---
> 
> 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


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

* Re: [PATCH v2 1/2] Bluetooth: btintel: Fix boot address
  2021-08-31 13:00 [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Kiran K
  2021-08-31 13:00 ` [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode Kiran K
@ 2021-08-31 13:38 ` Marcel Holtmann
  2021-08-31 19:09 ` [v2,1/2] " bluez.test.bot
  2 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2021-08-31 13:38 UTC (permalink / raw)
  To: Kiran K
  Cc: open list:BLUETOOTH SUBSYSTEM, Srivatsa, Ravishankar,
	Chethan T N, Tedd Ho-Jeong An, Luiz Augusto von Dentz

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 <kiran.k@intel.com>
> ---
> 
> 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


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

* RE: [v2,1/2] Bluetooth: btintel: Fix boot address
  2021-08-31 13:00 [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Kiran K
  2021-08-31 13:00 ` [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode Kiran K
  2021-08-31 13:38 ` [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Marcel Holtmann
@ 2021-08-31 19:09 ` bluez.test.bot
  2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2021-08-31 19:09 UTC (permalink / raw)
  To: linux-bluetooth, kiran.k

[-- Attachment #1: Type: text/plain, Size: 2630 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=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


[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 44386 bytes --]

[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3592 bytes --]

[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 622561 bytes --]

[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11713 bytes --]

[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9948 bytes --]

[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11859 bytes --]

[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5490 bytes --]

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

end of thread, other threads:[~2021-08-31 19:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:00 [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Kiran K
2021-08-31 13:00 ` [PATCH v2 2/2] Bluetooth: btintel: Read boot address irrespective of controller mode Kiran K
2021-08-31 13:38   ` Marcel Holtmann
2021-08-31 13:38 ` [PATCH v2 1/2] Bluetooth: btintel: Fix boot address Marcel Holtmann
2021-08-31 19:09 ` [v2,1/2] " 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.