* [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
@ 2022-09-30 14:06 Ajye Huang
2022-09-30 14:44 ` [v1] " bluez.test.bot
2022-09-30 19:57 ` [PATCH v1] " Luiz Augusto von Dentz
0 siblings, 2 replies; 5+ messages in thread
From: Ajye Huang @ 2022-09-30 14:06 UTC (permalink / raw)
To: linux-kernel
Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Ajye Huang, linux-bluetooth, netdev
When "hciconfig hci0 up" command is used to bluetooth ON, but
the bluetooth UI icon in settings still not be turned ON.
Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
Add back mgmt_power_on(hdev, ret) into function hci_dev_do_open(struct hci_dev *hdev)
in hci_core.c
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
net/bluetooth/hci_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0540555b3704..5061845c8fc2 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -481,6 +481,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
hci_req_sync_lock(hdev);
ret = hci_dev_open_sync(hdev);
+ mgmt_power_on(hdev, ret);
hci_req_sync_unlock(hdev);
return ret;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
2022-09-30 14:06 [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up Ajye Huang
@ 2022-09-30 14:44 ` bluez.test.bot
2022-09-30 19:57 ` [PATCH v1] " Luiz Augusto von Dentz
1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2022-09-30 14:44 UTC (permalink / raw)
To: linux-bluetooth, ajye_huang
[-- Attachment #1: Type: text/plain, Size: 2940 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=682277
---Test result---
Test Summary:
CheckPatch FAIL 1.86 seconds
GitLint FAIL 0.50 seconds
SubjectPrefix FAIL 0.35 seconds
BuildKernel PASS 43.87 seconds
BuildKernel32 PASS 40.11 seconds
Incremental Build with patchesPASS 56.96 seconds
TestRunner: Setup PASS 661.93 seconds
TestRunner: l2cap-tester PASS 20.78 seconds
TestRunner: iso-tester PASS 21.56 seconds
TestRunner: bnep-tester PASS 8.22 seconds
TestRunner: mgmt-tester PASS 130.75 seconds
TestRunner: rfcomm-tester PASS 12.63 seconds
TestRunner: sco-tester PASS 11.80 seconds
TestRunner: ioctl-tester PASS 13.50 seconds
TestRunner: smp-tester PASS 11.82 seconds
TestRunner: userchan-tester PASS 8.27 seconds
Details
##############################
Test: CheckPatch - FAIL - 1.86 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
[v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up\WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#92:
Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit fatal: unsaf ("ace/src' is owned by someone else)")'
#92:
Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
total: 1 errors, 1 warnings, 0 checks, 7 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.
/github/workspace/src/12995489.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL - 0.50 seconds
Run gitlint with rule in .gitlint
[v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
6: B1 Line exceeds max length (89>80): "Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")"
7: B1 Line exceeds max length (85>80): "Add back mgmt_power_on(hdev, ret) into function hci_dev_do_open(struct hci_dev *hdev)"
##############################
Test: SubjectPrefix - FAIL - 0.35 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
2022-09-30 14:06 [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up Ajye Huang
2022-09-30 14:44 ` [v1] " bluez.test.bot
@ 2022-09-30 19:57 ` Luiz Augusto von Dentz
2022-09-30 22:30 ` Ajye Huang
1 sibling, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2022-09-30 19:57 UTC (permalink / raw)
To: Ajye Huang
Cc: linux-kernel, Marcel Holtmann, Johan Hedberg, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-bluetooth,
netdev
Hi Ajye,
On Fri, Sep 30, 2022 at 7:07 AM Ajye Huang
<ajye_huang@compal.corp-partner.google.com> wrote:
>
> When "hciconfig hci0 up" command is used to bluetooth ON, but
> the bluetooth UI icon in settings still not be turned ON.
>
> Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
> Add back mgmt_power_on(hdev, ret) into function hci_dev_do_open(struct hci_dev *hdev)
> in hci_core.c
>
> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> ---
> net/bluetooth/hci_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 0540555b3704..5061845c8fc2 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -481,6 +481,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
> hci_req_sync_lock(hdev);
>
> ret = hci_dev_open_sync(hdev);
> + mgmt_power_on(hdev, ret);
>
> hci_req_sync_unlock(hdev);
> return ret;
> --
> 2.25.1
I believe the culprit is actually the following change:
git show cf75ad8b41d2a:
@@ -1489,8 +1488,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
hci_dev_test_flag(hdev, HCI_MGMT) &&
hdev->dev_type == HCI_PRIMARY) {
- ret = __hci_req_hci_power_on(hdev);
- mgmt_power_on(hdev, ret);
+ ret = hci_powered_update_sync(hdev);
So we should probably restore mgmt_power_on above.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
2022-09-30 19:57 ` [PATCH v1] " Luiz Augusto von Dentz
@ 2022-09-30 22:30 ` Ajye Huang
2022-09-30 22:58 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 5+ messages in thread
From: Ajye Huang @ 2022-09-30 22:30 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: linux-kernel, Marcel Holtmann, Johan Hedberg, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-bluetooth,
netdev
On Sat, Oct 1, 2022 at 3:57 AM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Ajye,
>
> On Fri, Sep 30, 2022 at 7:07 AM Ajye Huang
> <ajye_huang@compal.corp-partner.google.com> wrote:
> >
> > When "hciconfig hci0 up" command is used to bluetooth ON, but
> > the bluetooth UI icon in settings still not be turned ON.
> >
> > Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
> > Add back mgmt_power_on(hdev, ret) into function hci_dev_do_open(struct hci_dev *hdev)
> > in hci_core.c
> >
> > Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> > ---
> > net/bluetooth/hci_core.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> > index 0540555b3704..5061845c8fc2 100644
> > --- a/net/bluetooth/hci_core.c
> > +++ b/net/bluetooth/hci_core.c
> > @@ -481,6 +481,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
> > hci_req_sync_lock(hdev);
> >
> > ret = hci_dev_open_sync(hdev);
> > + mgmt_power_on(hdev, ret);
> >
> > hci_req_sync_unlock(hdev);
> > return ret;
> > --
> > 2.25.1
>
>
> I believe the culprit is actually the following change:
>
> git show cf75ad8b41d2a:
>
> @@ -1489,8 +1488,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
> !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
> hci_dev_test_flag(hdev, HCI_MGMT) &&
> hdev->dev_type == HCI_PRIMARY) {
> - ret = __hci_req_hci_power_on(hdev);
> - mgmt_power_on(hdev, ret);
> + ret = hci_powered_update_sync(hdev);
>
> So we should probably restore mgmt_power_on above.
>
> --
> Luiz Augusto von Dentz
Hi Luiz
Now, this code you mentioned in hci_dev_open_sync() was moved from
hci_core.c to hci_sync.c
The below modification is workable.
Do you agree?
If so, I will send you the v2 version. Thanks
index 15c75ef4c271..76c3107c9f91 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev)
hci_dev_test_flag(hdev, HCI_MGMT) &&
hdev->dev_type == HCI_PRIMARY) {
ret = hci_powered_update_sync(hdev);
+ mgmt_power_on(hdev, ret);
}
} else {
/* Init failed, cleanup */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up
2022-09-30 22:30 ` Ajye Huang
@ 2022-09-30 22:58 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2022-09-30 22:58 UTC (permalink / raw)
To: Ajye Huang
Cc: linux-kernel, Marcel Holtmann, Johan Hedberg, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-bluetooth,
netdev
Hi Ajye,
On Fri, Sep 30, 2022 at 3:30 PM Ajye Huang
<ajye_huang@compal.corp-partner.google.com> wrote:
>
> On Sat, Oct 1, 2022 at 3:57 AM Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi Ajye,
> >
> > On Fri, Sep 30, 2022 at 7:07 AM Ajye Huang
> > <ajye_huang@compal.corp-partner.google.com> wrote:
> > >
> > > When "hciconfig hci0 up" command is used to bluetooth ON, but
> > > the bluetooth UI icon in settings still not be turned ON.
> > >
> > > Refer to commit 2ff13894cfb8 ("Bluetooth: Perform HCI update for power on synchronously")
> > > Add back mgmt_power_on(hdev, ret) into function hci_dev_do_open(struct hci_dev *hdev)
> > > in hci_core.c
> > >
> > > Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
> > > ---
> > > net/bluetooth/hci_core.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> > > index 0540555b3704..5061845c8fc2 100644
> > > --- a/net/bluetooth/hci_core.c
> > > +++ b/net/bluetooth/hci_core.c
> > > @@ -481,6 +481,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
> > > hci_req_sync_lock(hdev);
> > >
> > > ret = hci_dev_open_sync(hdev);
> > > + mgmt_power_on(hdev, ret);
> > >
> > > hci_req_sync_unlock(hdev);
> > > return ret;
> > > --
> > > 2.25.1
> >
> >
> > I believe the culprit is actually the following change:
> >
> > git show cf75ad8b41d2a:
> >
> > @@ -1489,8 +1488,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
> > !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
> > hci_dev_test_flag(hdev, HCI_MGMT) &&
> > hdev->dev_type == HCI_PRIMARY) {
> > - ret = __hci_req_hci_power_on(hdev);
> > - mgmt_power_on(hdev, ret);
> > + ret = hci_powered_update_sync(hdev);
> >
> > So we should probably restore mgmt_power_on above.
> >
> > --
> > Luiz Augusto von Dentz
>
> Hi Luiz
>
> Now, this code you mentioned in hci_dev_open_sync() was moved from
> hci_core.c to hci_sync.c
> The below modification is workable.
> Do you agree?
> If so, I will send you the v2 version. Thanks
>
> index 15c75ef4c271..76c3107c9f91 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev)
> hci_dev_test_flag(hdev, HCI_MGMT) &&
> hdev->dev_type == HCI_PRIMARY) {
> ret = hci_powered_update_sync(hdev);
> + mgmt_power_on(hdev, ret);
> }
> } else {
> /* Init failed, cleanup */
Ive submitted a change like that already:
https://patchwork.kernel.org/project/bluetooth/patch/20220930201920.225767-1-luiz.dentz@gmail.com/
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-30 22:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-30 14:06 [PATCH v1] bluetooth: Fix the bluetooth icon status after running hciconfig hci0 up Ajye Huang
2022-09-30 14:44 ` [v1] " bluez.test.bot
2022-09-30 19:57 ` [PATCH v1] " Luiz Augusto von Dentz
2022-09-30 22:30 ` Ajye Huang
2022-09-30 22:58 ` Luiz Augusto von Dentz
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.