diff mbox series

Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT

Message ID 20240123071523.23480-1-quic_janathot@quicinc.com (mailing list archive)
State New, archived
Headers show
Series Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Janaki Ramaiah Thota Jan. 23, 2024, 7:15 a.m. UTC
This change is done to avoid BT not to go UNCONFIGURED state when BDA
fwnode is not available in DT for QTI SOCs.

Signed-off-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com>
---
 drivers/bluetooth/hci_qca.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)


base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
prerequisite-patch-id: de5460a6c886a233feff19313b545ee6569369fb
prerequisite-patch-id: e18252a26d0f289afcbec18113b7f636a46a9aed
prerequisite-patch-id: 26e607ac96dc6d0d295793a0449a5b4c0f7ddc92
prerequisite-patch-id: c8d7f229399fc8075722ffe05260675ece93f691
prerequisite-patch-id: 554cc93ba4899eabe31585bf9591052058609d96
prerequisite-patch-id: 99c00a3d8d98a880c0d3a5545def0ca9ade0f903
prerequisite-patch-id: b1ef1add471677d1e1b60eaaab3e109abf7c7b2b
prerequisite-patch-id: 96131754c09914f327f353dee4daabb7ab5e6f29
prerequisite-patch-id: 610b5ec4a338d15cf8dba0459d5a1bfd28dccb4d
prerequisite-patch-id: 5172cd9d99462e123f264f0fd9a9768f2cae5498
prerequisite-patch-id: f57b8285516730da78089325d53f6125daaf2e6a
prerequisite-patch-id: 69dc26e36476660935070261f0e11cdd55c35688
prerequisite-patch-id: 8087dd28f6ef90fc3ad847b4bcde8a096ff721b5
prerequisite-patch-id: 8640fbfd7e5dcbdb4eacf5b748ea49678a2e6675
prerequisite-patch-id: b3613c0002cfd9cc77923f6ce781cec90a2f0cd1
prerequisite-patch-id: dc4f4077bfa02a5d5128bb39ef3a36dfc3db27bc
prerequisite-patch-id: 9c9aa8de9b4c50252d451a2dd76717c287fe1848
prerequisite-patch-id: 3c4a931debe7e8aa7d0b70870456421a17ff86a5
prerequisite-patch-id: df500031c7b6de9320021d52b060338b71340d91
prerequisite-patch-id: 14758d2fb4b6151aa9c27ab7e3cb8c742988f1d7
prerequisite-patch-id: 1c28faa0d8a4e294752229611ade87a216da0ce6
prerequisite-patch-id: 03680549373d9a5b0ab0e4c94260e8aaea04ef25
prerequisite-patch-id: cfcc27083466c9c87801628fe9c0f2131fc22dae

Comments

bluez.test.bot@gmail.com Jan. 23, 2024, 7:57 a.m. UTC | #1
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=818971

---Test result---

Test Summary:
CheckPatch                    PASS      5.45 seconds
GitLint                       PASS      0.37 seconds
SubjectPrefix                 PASS      0.13 seconds
BuildKernel                   PASS      28.58 seconds
CheckAllWarning               PASS      31.20 seconds
CheckSparse                   PASS      36.95 seconds
CheckSmatch                   PASS      100.82 seconds
BuildKernel32                 PASS      27.48 seconds
TestRunnerSetup               PASS      439.03 seconds
TestRunner_l2cap-tester       PASS      23.45 seconds
TestRunner_iso-tester         PASS      46.07 seconds
TestRunner_bnep-tester        PASS      6.88 seconds
TestRunner_mgmt-tester        PASS      155.01 seconds
TestRunner_rfcomm-tester      PASS      12.97 seconds
TestRunner_sco-tester         PASS      14.94 seconds
TestRunner_ioctl-tester       PASS      11.99 seconds
TestRunner_mesh-tester        PASS      8.71 seconds
TestRunner_smp-tester         PASS      9.75 seconds
TestRunner_userchan-tester    PASS      7.21 seconds
IncrementalBuild              PASS      26.67 seconds



---
Regards,
Linux Bluetooth
Paul Menzel Jan. 23, 2024, 9:38 a.m. UTC | #2
Dear Janaki,


Thank you for your patch.


Am 23.01.24 um 08:15 schrieb Janaki Ramaiah Thota:
> This change is done to avoid BT not to go UNCONFIGURED state when BDA

“This change is done to” is redundant, and can be left out.

> fwnode is not available in DT for QTI SOCs.

It’d be great if you documented the test setup exactly, on how to 
reproduce this.

Please also add a Fixes: tag.

> Signed-off-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com>
> ---
>   drivers/bluetooth/hci_qca.c | 13 ++++++++++++-
>   1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 94b8c406f0c0..11d66f3e5f3f 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -7,6 +7,7 @@
>    *
>    *  Copyright (C) 2007 Texas Instruments, Inc.
>    *  Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
> + *  Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
>    *
>    *  Acknowledgements:
>    *  This file is based on hci_ll.c, which was...
> @@ -1904,7 +1905,17 @@ static int qca_setup(struct hci_uart *hu)
>   	case QCA_WCN6750:
>   	case QCA_WCN6855:
>   	case QCA_WCN7850:
> -		set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
> +
> +		/* Set BDA quirk bit for reading BDA value from fwnode property
> +		 * only if that property exist in DT.
> +		 */
> +		if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) {
> +			set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
> +			bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later");
> +		} else {
> +			bt_dev_info(hdev, "Not setting quirk bit for BDA");

In my opinion, the message in the else branch, should be a debug 
message, and should also contain that `local-bd-address` is not present 
in the devicetree..

> +		}
> +
>   		hci_set_aosp_capable(hdev);
>   
>   		ret = qca_read_soc_version(hdev, &ver, soc_type);
> 
> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> prerequisite-patch-id: de5460a6c886a233feff19313b545ee6569369fb
> prerequisite-patch-id: e18252a26d0f289afcbec18113b7f636a46a9aed
> prerequisite-patch-id: 26e607ac96dc6d0d295793a0449a5b4c0f7ddc92
> prerequisite-patch-id: c8d7f229399fc8075722ffe05260675ece93f691
> prerequisite-patch-id: 554cc93ba4899eabe31585bf9591052058609d96
> prerequisite-patch-id: 99c00a3d8d98a880c0d3a5545def0ca9ade0f903
> prerequisite-patch-id: b1ef1add471677d1e1b60eaaab3e109abf7c7b2b
> prerequisite-patch-id: 96131754c09914f327f353dee4daabb7ab5e6f29
> prerequisite-patch-id: 610b5ec4a338d15cf8dba0459d5a1bfd28dccb4d
> prerequisite-patch-id: 5172cd9d99462e123f264f0fd9a9768f2cae5498
> prerequisite-patch-id: f57b8285516730da78089325d53f6125daaf2e6a
> prerequisite-patch-id: 69dc26e36476660935070261f0e11cdd55c35688
> prerequisite-patch-id: 8087dd28f6ef90fc3ad847b4bcde8a096ff721b5
> prerequisite-patch-id: 8640fbfd7e5dcbdb4eacf5b748ea49678a2e6675
> prerequisite-patch-id: b3613c0002cfd9cc77923f6ce781cec90a2f0cd1
> prerequisite-patch-id: dc4f4077bfa02a5d5128bb39ef3a36dfc3db27bc
> prerequisite-patch-id: 9c9aa8de9b4c50252d451a2dd76717c287fe1848
> prerequisite-patch-id: 3c4a931debe7e8aa7d0b70870456421a17ff86a5
> prerequisite-patch-id: df500031c7b6de9320021d52b060338b71340d91
> prerequisite-patch-id: 14758d2fb4b6151aa9c27ab7e3cb8c742988f1d7
> prerequisite-patch-id: 1c28faa0d8a4e294752229611ade87a216da0ce6
> prerequisite-patch-id: 03680549373d9a5b0ab0e4c94260e8aaea04ef25
> prerequisite-patch-id: cfcc27083466c9c87801628fe9c0f2131fc22dae

What to do about these lines?


Kind regards,

PPaul
Janaki Ramaiah Thota Jan. 24, 2024, 2 p.m. UTC | #3
Hi Paul Menzel,
Thanks for the review, addressed comments in-lined.

On 1/23/2024 3:08 PM, Paul Menzel wrote:
> Dear Janaki,
> 
> 
> Thank you for your patch.
> 
> 
> Am 23.01.24 um 08:15 schrieb Janaki Ramaiah Thota:
>> This change is done to avoid BT not to go UNCONFIGURED state when BDA
> 
> “This change is done to” is redundant, and can be left out.
> 
Agreed, addressed in incremental patch.
>> fwnode is not available in DT for QTI SOCs.
> 
> It’d be great if you documented the test setup exactly, on how to reproduce this.
> 
> Please also add a Fixes: tag.
> 
sure, addressed in incremental patch.
>> Signed-off-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com>
>> ---
>>   drivers/bluetooth/hci_qca.c | 13 ++++++++++++-
>>   1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index 94b8c406f0c0..11d66f3e5f3f 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -7,6 +7,7 @@
>>    *
>>    *  Copyright (C) 2007 Texas Instruments, Inc.
>>    *  Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
>> + *  Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
>>    *
>>    *  Acknowledgements:
>>    *  This file is based on hci_ll.c, which was...
>> @@ -1904,7 +1905,17 @@ static int qca_setup(struct hci_uart *hu)
>>       case QCA_WCN6750:
>>       case QCA_WCN6855:
>>       case QCA_WCN7850:
>> -        set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
>> +
>> +        /* Set BDA quirk bit for reading BDA value from fwnode property
>> +         * only if that property exist in DT.
>> +         */
>> +        if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) {
>> +            set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
>> +            bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later");
>> +        } else {
>> +            bt_dev_info(hdev, "Not setting quirk bit for BDA");
> 
> In my opinion, the message in the else branch, should be a debug message, and should also contain that `local-bd-address` is not present in the devicetree..
> 
Agreed, addressed in incremental patch.
>> +        }
>> +
>>           hci_set_aosp_capable(hdev);
>>           ret = qca_read_soc_version(hdev, &ver, soc_type);
>>
>> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
>> prerequisite-patch-id: de5460a6c886a233feff19313b545ee6569369fb
>> prerequisite-patch-id: e18252a26d0f289afcbec18113b7f636a46a9aed
>> prerequisite-patch-id: 26e607ac96dc6d0d295793a0449a5b4c0f7ddc92
>> prerequisite-patch-id: c8d7f229399fc8075722ffe05260675ece93f691
>> prerequisite-patch-id: 554cc93ba4899eabe31585bf9591052058609d96
>> prerequisite-patch-id: 99c00a3d8d98a880c0d3a5545def0ca9ade0f903
>> prerequisite-patch-id: b1ef1add471677d1e1b60eaaab3e109abf7c7b2b
>> prerequisite-patch-id: 96131754c09914f327f353dee4daabb7ab5e6f29
>> prerequisite-patch-id: 610b5ec4a338d15cf8dba0459d5a1bfd28dccb4d
>> prerequisite-patch-id: 5172cd9d99462e123f264f0fd9a9768f2cae5498
>> prerequisite-patch-id: f57b8285516730da78089325d53f6125daaf2e6a
>> prerequisite-patch-id: 69dc26e36476660935070261f0e11cdd55c35688
>> prerequisite-patch-id: 8087dd28f6ef90fc3ad847b4bcde8a096ff721b5
>> prerequisite-patch-id: 8640fbfd7e5dcbdb4eacf5b748ea49678a2e6675
>> prerequisite-patch-id: b3613c0002cfd9cc77923f6ce781cec90a2f0cd1
>> prerequisite-patch-id: dc4f4077bfa02a5d5128bb39ef3a36dfc3db27bc
>> prerequisite-patch-id: 9c9aa8de9b4c50252d451a2dd76717c287fe1848
>> prerequisite-patch-id: 3c4a931debe7e8aa7d0b70870456421a17ff86a5
>> prerequisite-patch-id: df500031c7b6de9320021d52b060338b71340d91
>> prerequisite-patch-id: 14758d2fb4b6151aa9c27ab7e3cb8c742988f1d7
>> prerequisite-patch-id: 1c28faa0d8a4e294752229611ade87a216da0ce6
>> prerequisite-patch-id: 03680549373d9a5b0ab0e4c94260e8aaea04ef25
>> prerequisite-patch-id: cfcc27083466c9c87801628fe9c0f2131fc22dae
> 
> What to do about these lines?
> 
These are auto generated, not related to change.
> 
> Kind regards,
> 
> PPaul
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 94b8c406f0c0..11d66f3e5f3f 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -7,6 +7,7 @@ 
  *
  *  Copyright (C) 2007 Texas Instruments, Inc.
  *  Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
+ *  Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  *  Acknowledgements:
  *  This file is based on hci_ll.c, which was...
@@ -1904,7 +1905,17 @@  static int qca_setup(struct hci_uart *hu)
 	case QCA_WCN6750:
 	case QCA_WCN6855:
 	case QCA_WCN7850:
-		set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
+
+		/* Set BDA quirk bit for reading BDA value from fwnode property
+		 * only if that property exist in DT.
+		 */
+		if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) {
+			set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
+			bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later");
+		} else {
+			bt_dev_info(hdev, "Not setting quirk bit for BDA");
+		}
+
 		hci_set_aosp_capable(hdev);
 
 		ret = qca_read_soc_version(hdev, &ver, soc_type);