linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features
@ 2021-07-10  3:01 Jun Miao
  2021-07-10  4:10 ` bluez.test.bot
  2021-07-13  2:40 ` [PATCH] " Joseph Hwang
  0 siblings, 2 replies; 3+ messages in thread
From: Jun Miao @ 2021-07-10  3:01 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz
  Cc: kiran.k, chethan.tumkur.narayan, AyappadasX.Ps, linux-bluetooth,
	linux-kernel

When reading the support debug features failed, there are not available
features init. Continue to set the debug features is illogical, we should
skip btintel_set_debug_features(), even if checked by "if (!features)".

Fixes: c453b10c2b28 ("Bluetooth: btusb: Configure Intel debug feature based on available support")
Signed-off-by: Jun Miao <jun.miao@windriver.com>
---
 drivers/bluetooth/btusb.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index a9855a2dd561..20c804069991 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2907,10 +2907,11 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
 	/* Read the Intel supported features and if new exception formats
 	 * supported, need to load the additional DDC config to enable.
 	 */
-	btintel_read_debug_features(hdev, &features);
-
-	/* Set DDC mask for available debug features */
-	btintel_set_debug_features(hdev, &features);
+	err = btintel_read_debug_features(hdev, &features);
+	if (!err) {
+		/* Set DDC mask for available debug features */
+		btintel_set_debug_features(hdev, &features);
+	}
 
 	/* Read the Intel version information after loading the FW  */
 	err = btintel_read_version(hdev, &ver);
@@ -3003,10 +3004,11 @@ static int btusb_setup_intel_newgen(struct hci_dev *hdev)
 	/* Read the Intel supported features and if new exception formats
 	 * supported, need to load the additional DDC config to enable.
 	 */
-	btintel_read_debug_features(hdev, &features);
-
-	/* Set DDC mask for available debug features */
-	btintel_set_debug_features(hdev, &features);
+	err = btintel_read_debug_features(hdev, &features);
+	if (!err) {
+		/* Set DDC mask for available debug features */
+		btintel_set_debug_features(hdev, &features);
+	}
 
 	/* Read the Intel version information after loading the FW  */
 	err = btintel_read_version_tlv(hdev, &version);
-- 
2.32.0


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

* RE: [v2] Bluetooth: btusb: Fix a unspported condition to set debug features
  2021-07-10  3:01 [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features Jun Miao
@ 2021-07-10  4:10 ` bluez.test.bot
  2021-07-13  2:40 ` [PATCH] " Joseph Hwang
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-07-10  4:10 UTC (permalink / raw)
  To: linux-bluetooth, jun.miao

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

---Test result---

Test Summary:
CheckPatch                    FAIL      0.52 seconds
GitLint                       FAIL      0.13 seconds
BuildKernel                   PASS      610.96 seconds
TestRunner: Setup             PASS      406.62 seconds
TestRunner: l2cap-tester      PASS      2.89 seconds
TestRunner: bnep-tester       PASS      2.12 seconds
TestRunner: mgmt-tester       PASS      31.82 seconds
TestRunner: rfcomm-tester     PASS      2.31 seconds
TestRunner: sco-tester        PASS      2.24 seconds
TestRunner: smp-tester        FAIL      2.31 seconds
TestRunner: userchan-tester   PASS      2.16 seconds

Details
##############################
Test: CheckPatch - FAIL - 0.52 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
Bluetooth: btusb: Fix a unspported condition to set debug features
WARNING: Unknown commit id 'c453b10c2b28', maybe rebased or not pulled?
#11: 
Fixes: c453b10c2b28 ("Bluetooth: btusb: Configure Intel debug feature based on available support")

total: 0 errors, 1 warnings, 30 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] Bluetooth: btusb: Fix a unspported condition to set debug" has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL - 0.13 seconds
Run gitlint with rule in .gitlint
Bluetooth: btusb: Fix a unspported condition to set debug features
7: B1 Line exceeds max length (98>80): "Fixes: c453b10c2b28 ("Bluetooth: btusb: Configure Intel debug feature based on available support")"


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


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


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

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

##############################
Test: TestRunner: mgmt-tester - PASS - 31.82 seconds
Run test-runner with mgmt-tester
Total: 446, Passed: 443 (99.3%), Failed: 0, Not Run: 3

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

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

##############################
Test: TestRunner: smp-tester - FAIL - 2.31 seconds
Run test-runner with smp-tester
Total: 8, Passed: 7 (87.5%), Failed: 1, Not Run: 0

Failed Test Cases
SMP Client - SC Request 2                            Failed       0.024 seconds

##############################
Test: TestRunner: userchan-tester - PASS - 2.16 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: 44350 bytes --]

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

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

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

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

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

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

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

* Re: [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features
  2021-07-10  3:01 [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features Jun Miao
  2021-07-10  4:10 ` bluez.test.bot
@ 2021-07-13  2:40 ` Joseph Hwang
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Hwang @ 2021-07-13  2:40 UTC (permalink / raw)
  To: Jun Miao
  Cc: marcel, johan.hedberg, luiz.dentz, kiran.k,
	chethan.tumkur.narayan, AyappadasX.Ps, linux-bluetooth,
	linux-kernel

Hi Jun Miao:

  Thanks for the patch checking out the condition of debug features.
However, the patch is actually covered by two patches that are being
reviewed.

  - [v4,1/4] Bluetooth: btusb: disable Intel link statistics telemetry
events (https://patchwork.kernel.org/project/bluetooth/patch/20210618160016.v4.1.I41aec59e65ffd3226d368dabeb084af13cc133c8@changeid/)
— this patch disables the debug features by default to avoid overhead.

  - [v4,3/4] Bluetooth: set quality report callback for Intel
(https://patchwork.kernel.org/project/bluetooth/patch/20210618160016.v4.3.I50ffa4cd0b3ab11669ff2541fc719fee00b4e244@changeid/)
— this patch checks the condition of debug features and does some
other things.

Thanks and regards,
Joseph

On Sat, Jul 10, 2021 at 11:02 AM Jun Miao <jun.miao@windriver.com> wrote:
>
> When reading the support debug features failed, there are not available
> features init. Continue to set the debug features is illogical, we should
> skip btintel_set_debug_features(), even if checked by "if (!features)".
>
> Fixes: c453b10c2b28 ("Bluetooth: btusb: Configure Intel debug feature based on available support")
> Signed-off-by: Jun Miao <jun.miao@windriver.com>
> ---
>  drivers/bluetooth/btusb.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index a9855a2dd561..20c804069991 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2907,10 +2907,11 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
>         /* Read the Intel supported features and if new exception formats
>          * supported, need to load the additional DDC config to enable.
>          */
> -       btintel_read_debug_features(hdev, &features);
> -
> -       /* Set DDC mask for available debug features */
> -       btintel_set_debug_features(hdev, &features);
> +       err = btintel_read_debug_features(hdev, &features);
> +       if (!err) {
> +               /* Set DDC mask for available debug features */
> +               btintel_set_debug_features(hdev, &features);
> +       }
>
>         /* Read the Intel version information after loading the FW  */
>         err = btintel_read_version(hdev, &ver);
> @@ -3003,10 +3004,11 @@ static int btusb_setup_intel_newgen(struct hci_dev *hdev)
>         /* Read the Intel supported features and if new exception formats
>          * supported, need to load the additional DDC config to enable.
>          */
> -       btintel_read_debug_features(hdev, &features);
> -
> -       /* Set DDC mask for available debug features */
> -       btintel_set_debug_features(hdev, &features);
> +       err = btintel_read_debug_features(hdev, &features);
> +       if (!err) {
> +               /* Set DDC mask for available debug features */
> +               btintel_set_debug_features(hdev, &features);
> +       }
>
>         /* Read the Intel version information after loading the FW  */
>         err = btintel_read_version_tlv(hdev, &version);
> --
> 2.32.0
>


-- 

Joseph Shyh-In Hwang
Email: josephsih@google.com

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

end of thread, other threads:[~2021-07-13  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10  3:01 [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features Jun Miao
2021-07-10  4:10 ` bluez.test.bot
2021-07-13  2:40 ` [PATCH] " Joseph Hwang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).