[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240424151841.GC26307@linux-l9pv.suse>
Date: Wed, 24 Apr 2024 23:18:41 +0800
From: joeyli <jlee@...e.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: "Lee, Chun-Yi" <joeyli.kernel@...il.com>,
Luiz Augusto von Dentz <luiz.von.dentz@...el.com>,
Manish Mandlik <mmandlik@...gle.com>,
Archie Pusaka <apusaka@...omium.org>,
Miao-chen Chou <mcchou@...omium.org>, linux-kernel@...r.kernel.org,
linux-bluetooth@...r.kernel.org
Subject: Re: [PATCH] Bluetooth: hci_sync: Using hci_cmd_sync_submit when
removing Adv Monitor
Hi Takashi,
Thanks for your reviewing and comment!
On Wed, Apr 24, 2024 at 04:02:37PM +0200, Takashi Iwai wrote:
> On Wed, 24 Apr 2024 15:59:03 +0200,
> Lee, Chun-Yi wrote:
> >
> > From: Chun-Yi Lee <jlee@...e.com>
> >
> > Since the d883a4669a1de be introduced in v6.4, bluetooth daemon
> > got the following failed message of MGMT_OP_REMOVE_ADV_MONITOR
> > command when controller is power-off:
> >
> > bluetoothd[20976]:
> > src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv
> > Monitors: Failed>
> >
> > Normally this situation is happened when the bluetoothd deamon
> > be started manually after system booting. Which means that
> > bluetoothd received MGMT_EV_INDEX_ADDED event after kernel
> > runs hci_power_off().
> >
> > Base on doc/mgmt-api.txt, the MGMT_OP_REMOVE_ADV_MONITOR command
> > can be used when the controller is not powered. This patch changes
> > the code in remove_adv_monitor() to use hci_cmd_sync_submit()
> > instead of hci_cmd_sync_queue().
> >
> > Fixes: d883a4669a1de ("Bluetooth: hci_sync: Only allow hci_cmd_sync_queue if running")
> > Cc: Luiz Augusto von Dentz <luiz.von.dentz@...el.com>
> > Cc: Manish Mandlik <mmandlik@...gle.com>
> > Cc: Archie Pusaka <apusaka@...omium.org>
> > Cc: Miao-chen Chou <mcchou@...omium.org>
> > Signed-off-by: Chun-Yi Lee <jlee@...e.com>
>
> Is it a same issue tracked in
> https://github.com/bluez/bluez/issues/809
> ??
It's similar problem but for different MGMT command.
The above issue and patch are against MGMT_OP_ADD_UUID/
MGMT_OP_REMOVE_UUID. My patch is against
MGMT_OP_REMOVE_ADV_MONITOR command.
Thanks
Joey Lee
>
>
> thanks,
>
> Takashi
>
> > ---
> > net/bluetooth/mgmt.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index 32ed6e9245a3..21962969411d 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -5475,7 +5475,7 @@ static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
> > goto unlock;
> > }
> >
> > - err = hci_cmd_sync_queue(hdev, mgmt_remove_adv_monitor_sync, cmd,
> > + err = hci_cmd_sync_submit(hdev, mgmt_remove_adv_monitor_sync, cmd,
> > mgmt_remove_adv_monitor_complete);
> >
> > if (err) {
> > --
> > 2.35.3
> >
> >
Powered by blists - more mailing lists