From 848015854a37aa42fb512da31d624c8786ceedad Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Thu, 26 Sep 2019 16:57:13 +0530 Subject: [PATCH] Bluetooth: controller: split: Fix flash driver co-operation When flash driver requests abort of radio event in unreserved time space, resume radio events in the pipeline were not flushed. These resumed events caused flash driver to assert on the check whether radio was in use. Fixed by flushing the pipeline of all radio events, resume and also those events in pipeline with pre-empt timeout being setup. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c index 90d7a6a5bb1..45df34c0055 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c @@ -218,7 +218,8 @@ void lll_resume(void *param) void lll_disable(void *param) { - if (!param || param == event.curr.param) { + /* LLL disable of current event, done is generated */ + if (!param || (param == event.curr.param)) { if (event.curr.abort_cb && event.curr.param) { event.curr.abort_cb(NULL, event.curr.param); } else { @@ -232,7 +233,7 @@ void lll_disable(void *param) next = ull_prepare_dequeue_iter(&idx); while (next) { if (!next->is_aborted && - param == next->prepare_param.param) { + (!param || (param == next->prepare_param.param))) { next->is_aborted = 1; next->abort_cb(&next->prepare_param, next->prepare_param.param);