* [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable
@ 2021-08-12 4:23 Koba Ko
2021-08-12 5:14 ` bluez.test.bot
2021-08-12 5:29 ` [PATCH] " Marcel Holtmann
0 siblings, 2 replies; 5+ messages in thread
From: Koba Ko @ 2021-08-12 4:23 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
David S. Miller, Jakub Kicinski, linux-bluetooth, netdev,
linux-kernel, apusaka
With Intel AC9560, follow this scenario and can't turn on bt since.
1. turn off BT
2. then suspend&resume multiple times
3. turn on BT
Get this error message after turn on bt.
[ 877.194032] Bluetooth: hci0: urb 0000000061b9a002 failed to resubmit (113)
[ 886.941327] Bluetooth: hci0: Failed to read MSFT supported features (-110)
Remove msft from compilation would be helpful.
Turn off msft would be also helpful.
Because msft is enabled as default and can't turn off without
compliation,
Introduce a bluetooth parameter, msft_enable, to control.
Signed-off-by: Koba Ko <koba.ko@canonical.com>
---
include/net/bluetooth/hci_core.h | 1 +
net/bluetooth/hci_core.c | 16 ++++++++++++++++
net/bluetooth/msft.c | 30 +++++++++++++++++++++++++++++-
3 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index a7d06d7da602..002753db936a 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1229,6 +1229,7 @@ static inline void *hci_get_priv(struct hci_dev *hdev)
return (char *)hdev + sizeof(*hdev);
}
+void hci_set_msft(bool enable);
struct hci_dev *hci_dev_get(int index);
struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src, u8 src_type);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index cb2e9e513907..9e1bdaea20a8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1045,6 +1045,22 @@ static int hci_linkpol_req(struct hci_request *req, unsigned long opt)
return 0;
}
+void hci_set_msft(bool enable)
+{
+ struct hci_dev *hdev = NULL, *d;
+
+ read_lock(&hci_dev_list_lock);
+ list_for_each_entry(d, &hci_dev_list, list) {
+ hdev = hci_dev_hold(d);
+ if (enable)
+ msft_do_open(hdev);
+ else
+ msft_do_close(hdev);
+ hci_dev_put(hdev);
+ }
+ read_unlock(&hci_dev_list_lock);
+}
+
/* Get HCI device by index.
* Device is held on return. */
struct hci_dev *hci_dev_get(int index)
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index b4bfae41e8a5..0bb50ee11bf8 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -97,6 +97,34 @@ struct msft_data {
__u8 filter_enabled;
};
+static bool msft_enable = true;
+
+static int msft_set_enable(const char *s, const struct kernel_param *kp)
+{
+ bool do_enable;
+ int ret;
+
+ if (!s)
+ return 0;
+
+ ret = strtobool(s, &do_enable);
+ if (ret || msft_enable == do_enable)
+ return ret;
+
+ hci_set_msft(do_enable);
+
+ msft_enable = do_enable;
+
+ return ret;
+}
+
+static const struct kernel_param_ops msft_enable_ops = {
+ .set = msft_set_enable,
+ .get = param_get_bool,
+};
+
+module_param_cb(msft_enable, &msft_enable_ops, &msft_enable, 0644);
+
static int __msft_add_monitor_pattern(struct hci_dev *hdev,
struct adv_monitor *monitor);
@@ -186,7 +214,7 @@ void msft_do_open(struct hci_dev *hdev)
{
struct msft_data *msft;
- if (hdev->msft_opcode == HCI_OP_NOP)
+ if (!msft_enable || hdev->msft_opcode == HCI_OP_NOP)
return;
bt_dev_dbg(hdev, "Initialize MSFT extension");
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: Bluetooth: msft: add a bluetooth parameter, msft_enable
2021-08-12 4:23 [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable Koba Ko
@ 2021-08-12 5:14 ` bluez.test.bot
2021-08-12 5:29 ` [PATCH] " Marcel Holtmann
1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2021-08-12 5:14 UTC (permalink / raw)
To: linux-bluetooth, koba.ko
[-- Attachment #1: Type: text/plain, Size: 2727 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=530287
---Test result---
Test Summary:
CheckPatch PASS 0.77 seconds
GitLint PASS 0.11 seconds
BuildKernel PASS 474.03 seconds
TestRunner: Setup PASS 308.77 seconds
TestRunner: l2cap-tester PASS 2.36 seconds
TestRunner: bnep-tester PASS 1.78 seconds
TestRunner: mgmt-tester PASS 29.83 seconds
TestRunner: rfcomm-tester PASS 1.89 seconds
TestRunner: sco-tester PASS 1.85 seconds
TestRunner: smp-tester FAIL 1.94 seconds
TestRunner: userchan-tester PASS 1.82 seconds
Details
##############################
Test: CheckPatch - PASS - 0.77 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - PASS - 0.11 seconds
Run gitlint with rule in .gitlint
##############################
Test: BuildKernel - PASS - 474.03 seconds
Build Kernel with minimal configuration supports Bluetooth
##############################
Test: TestRunner: Setup - PASS - 308.77 seconds
Setup environment for running Test Runner
##############################
Test: TestRunner: l2cap-tester - PASS - 2.36 seconds
Run test-runner with l2cap-tester
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: bnep-tester - PASS - 1.78 seconds
Run test-runner with bnep-tester
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: mgmt-tester - PASS - 29.83 seconds
Run test-runner with mgmt-tester
Total: 448, Passed: 445 (99.3%), Failed: 0, Not Run: 3
##############################
Test: TestRunner: rfcomm-tester - PASS - 1.89 seconds
Run test-runner with rfcomm-tester
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: sco-tester - PASS - 1.85 seconds
Run test-runner with sco-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: smp-tester - FAIL - 1.94 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.018 seconds
##############################
Test: TestRunner: userchan-tester - PASS - 1.82 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: 3593 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 616863 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11712 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9948 bytes --]
[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11741 bytes --]
[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable
2021-08-12 4:23 [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable Koba Ko
2021-08-12 5:14 ` bluez.test.bot
@ 2021-08-12 5:29 ` Marcel Holtmann
2021-08-12 5:37 ` Koba Ko
1 sibling, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2021-08-12 5:29 UTC (permalink / raw)
To: Koba Ko
Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
Jakub Kicinski, BlueZ, open list:NETWORKING [GENERAL],
open list, Archie Pusaka
Hi Koba,
> With Intel AC9560, follow this scenario and can't turn on bt since.
> 1. turn off BT
> 2. then suspend&resume multiple times
> 3. turn on BT
>
> Get this error message after turn on bt.
> [ 877.194032] Bluetooth: hci0: urb 0000000061b9a002 failed to resubmit (113)
> [ 886.941327] Bluetooth: hci0: Failed to read MSFT supported features (-110)
>
> Remove msft from compilation would be helpful.
> Turn off msft would be also helpful.
>
> Because msft is enabled as default and can't turn off without
> compliation,
> Introduce a bluetooth parameter, msft_enable, to control.
>
> Signed-off-by: Koba Ko <koba.ko@canonical.com>
> ---
> include/net/bluetooth/hci_core.h | 1 +
> net/bluetooth/hci_core.c | 16 ++++++++++++++++
> net/bluetooth/msft.c | 30 +++++++++++++++++++++++++++++-
> 3 files changed, 46 insertions(+), 1 deletion(-)
NAK.
This is for the Intel guys to figure out. Otherwise I am going to disable MSFT extension for AC9560 completely. What is your hw_variant for that hardware?
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable
2021-08-12 5:29 ` [PATCH] " Marcel Holtmann
@ 2021-08-12 5:37 ` Koba Ko
2021-08-12 6:00 ` Koba Ko
0 siblings, 1 reply; 5+ messages in thread
From: Koba Ko @ 2021-08-12 5:37 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
Jakub Kicinski, BlueZ, open list:NETWORKING [GENERAL],
open list, Archie Pusaka
On Thu, Aug 12, 2021 at 1:29 PM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Koba,
>
> > With Intel AC9560, follow this scenario and can't turn on bt since.
> > 1. turn off BT
> > 2. then suspend&resume multiple times
> > 3. turn on BT
> >
> > Get this error message after turn on bt.
> > [ 877.194032] Bluetooth: hci0: urb 0000000061b9a002 failed to resubmit (113)
> > [ 886.941327] Bluetooth: hci0: Failed to read MSFT supported features (-110)
> >
> > Remove msft from compilation would be helpful.
> > Turn off msft would be also helpful.
> >
> > Because msft is enabled as default and can't turn off without
> > compliation,
> > Introduce a bluetooth parameter, msft_enable, to control.
> >
> > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > ---
> > include/net/bluetooth/hci_core.h | 1 +
> > net/bluetooth/hci_core.c | 16 ++++++++++++++++
> > net/bluetooth/msft.c | 30 +++++++++++++++++++++++++++++-
> > 3 files changed, 46 insertions(+), 1 deletion(-)
>
> NAK.
>
> This is for the Intel guys to figure out. Otherwise I am going to disable MSFT extension for AC9560 completely. What is your hw_variant for that hardware?
Would you please guide to dump hw_variant? thanks
>
> Regards
>
> Marcel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable
2021-08-12 5:37 ` Koba Ko
@ 2021-08-12 6:00 ` Koba Ko
0 siblings, 0 replies; 5+ messages in thread
From: Koba Ko @ 2021-08-12 6:00 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
Jakub Kicinski, BlueZ, open list:NETWORKING [GENERAL],
open list, Archie Pusaka
On Thu, Aug 12, 2021 at 1:37 PM Koba Ko <koba.ko@canonical.com> wrote:
>
> On Thu, Aug 12, 2021 at 1:29 PM Marcel Holtmann <marcel@holtmann.org> wrote:
> >
> > Hi Koba,
> >
> > > With Intel AC9560, follow this scenario and can't turn on bt since.
> > > 1. turn off BT
> > > 2. then suspend&resume multiple times
> > > 3. turn on BT
> > >
> > > Get this error message after turn on bt.
> > > [ 877.194032] Bluetooth: hci0: urb 0000000061b9a002 failed to resubmit (113)
> > > [ 886.941327] Bluetooth: hci0: Failed to read MSFT supported features (-110)
> > >
> > > Remove msft from compilation would be helpful.
> > > Turn off msft would be also helpful.
> > >
> > > Because msft is enabled as default and can't turn off without
> > > compliation,
> > > Introduce a bluetooth parameter, msft_enable, to control.
> > >
> > > Signed-off-by: Koba Ko <koba.ko@canonical.com>
> > > ---
> > > include/net/bluetooth/hci_core.h | 1 +
> > > net/bluetooth/hci_core.c | 16 ++++++++++++++++
> > > net/bluetooth/msft.c | 30 +++++++++++++++++++++++++++++-
> > > 3 files changed, 46 insertions(+), 1 deletion(-)
> >
> > NAK.
> >
> > This is for the Intel guys to figure out. Otherwise I am going to disable MSFT extension for AC9560 completely. What is your hw_variant for that hardware?
> Would you please guide to dump hw_variant? thanks
Found it,
Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-19-0-1.ddc
> >
> > Regards
> >
> > Marcel
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-12 6:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 4:23 [PATCH] Bluetooth: msft: add a bluetooth parameter, msft_enable Koba Ko
2021-08-12 5:14 ` bluez.test.bot
2021-08-12 5:29 ` [PATCH] " Marcel Holtmann
2021-08-12 5:37 ` Koba Ko
2021-08-12 6:00 ` Koba Ko
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.