msm: ipa3: immediately return after rx_len is cached.

This is to avoid race condition.

Change-Id: I5d86081025508a25f669eca82c8750306e2c6fc3
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
Michael Adisumarta 2021-01-12 21:16:10 -08:00
commit 56e4ab58b7

View file

@ -2484,9 +2484,11 @@ fail_dma_mapping:
fail_skb_alloc:
kmem_cache_free(ipa3_ctx->rx_pkt_wrapper_cache, rx_pkt);
fail_kmem_cache_alloc:
if (rx_len_cached == 0)
if (rx_len_cached == 0) {
queue_delayed_work(sys->wq, &sys->replenish_rx_work,
msecs_to_jiffies(1));
return;
}
done:
/* only ring doorbell once here */
ret = gsi_queue_xfer(sys->ep->gsi_chan_hdl, idx,
@ -2591,9 +2593,12 @@ fail_dma_mapping:
INIT_LIST_HEAD(&rx_pkt->link);
spin_unlock_bh(&sys->spinlock);
fail_kmem_cache_alloc:
if (rx_len_cached == 0)
if (rx_len_cached == 0) {
queue_delayed_work(sys->wq, &sys->replenish_rx_work,
msecs_to_jiffies(1));
return;
}
done:
/* only ring doorbell once here */
ret = gsi_queue_xfer(sys->ep->gsi_chan_hdl, idx,