* [PATCH V2] shared/mgmt: Fix not processing request queue
@ 2021-06-05 0:02 Luiz Augusto von Dentz
2021-06-05 0:40 ` [V2] " bluez.test.bot
0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-05 0:02 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the kernel returns an invalid opcode like below the request won't
be processed making it unusable:
@ MGMT Command: Read Advertising Features (0x003d) plen 0
{0x0001} [hci0] 14:25:11.096370
@ MGMT Event: Command Status (0x0002) plen 3
{0x0001} [hci0] 14:25:11.096373
Set Advertising (0x0029)
Status: Not Supported (0x0c)
In order to fix this attempts to remove the first request pending on the
given index:
= bluetoothd: src/advertising.c:read_adv_features_callback() Failed to
read advertising features: Not Supported (0x0c)
---
src/shared/mgmt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c
index 3e9b9ee26..b869fa6ef 100644
--- a/src/shared/mgmt.c
+++ b/src/shared/mgmt.c
@@ -248,6 +248,17 @@ static void request_complete(struct mgmt *mgmt, uint8_t status,
request = queue_remove_if(mgmt->pending_list,
match_request_opcode_index, &match);
+ if (!request) {
+ util_debug(mgmt->debug_callback, mgmt->debug_data,
+ "Unable to find request for opcode 0x%04x",
+ opcode);
+
+ /* Attempt to remove with no opcode */
+ request = queue_remove_if(mgmt->pending_list,
+ match_request_index,
+ UINT_TO_PTR(index));
+ }
+
if (request) {
if (request->callback)
request->callback(status, length, param,
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [V2] shared/mgmt: Fix not processing request queue
2021-06-05 0:02 [PATCH V2] shared/mgmt: Fix not processing request queue Luiz Augusto von Dentz
@ 2021-06-05 0:40 ` bluez.test.bot
2021-06-05 0:52 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2021-06-05 0:40 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1953 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=494447
---Test result---
Test Summary:
CheckPatch PASS 0.49 seconds
GitLint PASS 0.13 seconds
Prep - Setup ELL PASS 45.76 seconds
Build - Prep PASS 0.10 seconds
Build - Configure PASS 7.90 seconds
Build - Make PASS 193.49 seconds
Make Check PASS 9.03 seconds
Make Distcheck PASS 229.13 seconds
Build w/ext ELL - Configure PASS 8.06 seconds
Build w/ext ELL - Make PASS 185.19 seconds
Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint
##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL
##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build
##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree
##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree
##############################
Test: Make Check - PASS
Desc: Run 'make check'
##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution
##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration
##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [V2] shared/mgmt: Fix not processing request queue
2021-06-05 0:40 ` [V2] " bluez.test.bot
@ 2021-06-05 0:52 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-05 0:52 UTC (permalink / raw)
To: linux-bluetooth
Hi,
On Fri, Jun 4, 2021 at 5:40 PM <bluez.test.bot@gmail.com> wrote:
>
> 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=494447
>
> ---Test result---
>
> Test Summary:
> CheckPatch PASS 0.49 seconds
> GitLint PASS 0.13 seconds
> Prep - Setup ELL PASS 45.76 seconds
> Build - Prep PASS 0.10 seconds
> Build - Configure PASS 7.90 seconds
> Build - Make PASS 193.49 seconds
> Make Check PASS 9.03 seconds
> Make Distcheck PASS 229.13 seconds
> Build w/ext ELL - Configure PASS 8.06 seconds
> Build w/ext ELL - Make PASS 185.19 seconds
>
> Details
> ##############################
> Test: CheckPatch - PASS
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Distcheck - PASS
> Desc: Run distcheck to check the distribution
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration
>
>
>
> ---
> Regards,
> Linux Bluetooth
Pushed.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-05 0:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 0:02 [PATCH V2] shared/mgmt: Fix not processing request queue Luiz Augusto von Dentz
2021-06-05 0:40 ` [V2] " bluez.test.bot
2021-06-05 0:52 ` 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.