mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Merge "msm: ipa: Add graceful handling to skip partial packets"
This commit is contained in:
commit
abe6d961ff
2 changed files with 21 additions and 7 deletions
|
|
@ -3288,6 +3288,25 @@ static struct sk_buff *handle_skb_completion(struct gsi_chan_xfer_notify
|
|||
if (notify->bytes_xfered)
|
||||
rx_pkt->len = notify->bytes_xfered;
|
||||
|
||||
/*Drop packets when WAN consumer channel receive EOB event*/
|
||||
if ((notify->evt_id == GSI_CHAN_EVT_EOB ||
|
||||
sys->skip_eot) &&
|
||||
sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) {
|
||||
dma_unmap_single(ipa3_ctx->pdev, rx_pkt->data.dma_addr,
|
||||
sys->rx_buff_sz, DMA_FROM_DEVICE);
|
||||
sys->free_skb(rx_pkt->data.skb);
|
||||
sys->free_rx_wrapper(rx_pkt);
|
||||
sys->eob_drop_cnt++;
|
||||
if (notify->evt_id == GSI_CHAN_EVT_EOB) {
|
||||
IPADBG("EOB event on WAN consumer channel, drop\n");
|
||||
sys->skip_eot = true;
|
||||
} else {
|
||||
IPADBG("Reset skip eot flag.\n");
|
||||
sys->skip_eot = false;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rx_skb = rx_pkt->data.skb;
|
||||
skb_set_tail_pointer(rx_skb, rx_pkt->len);
|
||||
rx_skb->len = rx_pkt->len;
|
||||
|
|
@ -3302,13 +3321,6 @@ static struct sk_buff *handle_skb_completion(struct gsi_chan_xfer_notify
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*Assesrt when WAN consumer channel receive EOB event*/
|
||||
if (notify->evt_id == GSI_CHAN_EVT_EOB &&
|
||||
sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) {
|
||||
IPAERR("EOB event received on WAN consumer channel\n");
|
||||
ipa_assert();
|
||||
}
|
||||
|
||||
head = &rx_pkt->sys->pending_pkts[notify->veid];
|
||||
|
||||
INIT_LIST_HEAD(&rx_pkt->link);
|
||||
|
|
|
|||
|
|
@ -1053,6 +1053,8 @@ struct ipa3_sys_context {
|
|||
struct list_head pending_pkts[GSI_VEID_MAX];
|
||||
atomic_t xmit_eot_cnt;
|
||||
struct tasklet_struct tasklet;
|
||||
bool skip_eot;
|
||||
u32 eob_drop_cnt;
|
||||
|
||||
/* ordering is important - mutable fields go above */
|
||||
struct ipa3_ep_context *ep;
|
||||
|
|
|
|||
Loading…
Reference in a new issue