mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net_dma: convert to dma_find_channel
Use the general-purpose channel allocation provided by dmaengine. Reviewed-by: Andrew Morton <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
2ba05622b8
commit
f67b459992
7 changed files with 5 additions and 59 deletions
|
|
@ -1317,7 +1317,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|||
if ((available < target) &&
|
||||
(len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) &&
|
||||
!sysctl_tcp_low_latency &&
|
||||
__get_cpu_var(softnet_data).net_dma) {
|
||||
dma_find_channel(DMA_MEMCPY)) {
|
||||
preempt_enable_no_resched();
|
||||
tp->ucopy.pinned_list =
|
||||
dma_pin_iovec_pages(msg->msg_iov, len);
|
||||
|
|
@ -1527,7 +1527,7 @@ do_prequeue:
|
|||
if (!(flags & MSG_TRUNC)) {
|
||||
#ifdef CONFIG_NET_DMA
|
||||
if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
|
||||
tp->ucopy.dma_chan = get_softnet_dma();
|
||||
tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY);
|
||||
|
||||
if (tp->ucopy.dma_chan) {
|
||||
tp->ucopy.dma_cookie = dma_skb_copy_datagram_iovec(
|
||||
|
|
|
|||
|
|
@ -5005,7 +5005,7 @@ static int tcp_dma_try_early_copy(struct sock *sk, struct sk_buff *skb,
|
|||
return 0;
|
||||
|
||||
if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
|
||||
tp->ucopy.dma_chan = get_softnet_dma();
|
||||
tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY);
|
||||
|
||||
if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1594,7 +1594,7 @@ process:
|
|||
#ifdef CONFIG_NET_DMA
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
|
||||
tp->ucopy.dma_chan = get_softnet_dma();
|
||||
tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY);
|
||||
if (tp->ucopy.dma_chan)
|
||||
ret = tcp_v4_do_rcv(sk, skb);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue