|
@@ -1762,8 +1762,14 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_NET_DMA
|
|
|
- if (tp->ucopy.dma_chan)
|
|
|
- dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
|
|
|
+ if (tp->ucopy.dma_chan) {
|
|
|
+ if (tp->rcv_wnd == 0 &&
|
|
|
+ !skb_queue_empty(&sk->sk_async_wait_queue)) {
|
|
|
+ tcp_service_net_dma(sk, true);
|
|
|
+ tcp_cleanup_rbuf(sk, copied);
|
|
|
+ } else
|
|
|
+ dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
|
|
|
+ }
|
|
|
#endif
|
|
|
if (copied >= target) {
|
|
|
/* Do not sleep, just process backlog. */
|