From c52d43aece7ad32a91e46d9803eebd710e731058 Mon Sep 17 00:00:00 2001 From: Skylar Chang Date: Thu, 6 Jul 2017 15:36:47 -0700 Subject: [PATCH] msm: ipa: remove delay in out of buffer recovery procedure When a RX pipe runs out of buffers, a delayed work is scheduled to re-attempt the replenish process but the single threaded workqueue will not process that work till the existing work is retired. The existing work will be retired after sufficient inacvitivty is detected but in this corner-case, we can do this immediately since no further packets will be received. Change-Id: Ia12a35aaadcb95c94471ae0ffea8c61a9a3d26f7 CRs-Fixed: 854938 Acked-by: Ady Abraham Signed-off-by: Skylar Chang --- drivers/platform/msm/ipa/ipa_v3/ipa_dp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index 6a3a89e2cf8d..5fe425ea7655 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -1188,6 +1188,15 @@ static void ipa3_handle_rx(struct ipa3_sys_context *sys) } else { inactive_cycles = 0; } + + /* + * if pipe is out of buffers there is no point polling for + * completed descs; release the worker so delayed work can + * run in a timely manner + */ + if (sys->len == 0) + break; + } while (inactive_cycles <= POLLING_INACTIVITY_RX); trace_poll_to_intr3(sys->ep->client);