aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2012-04-04 19:10:46 -0400
committerDan Williams <dan.j.williams@intel.com>2012-04-05 18:27:12 -0400
commita2bd1140a264b561e38d99e656cd843c2d840e86 (patch)
tree9c9f19dde5c0213a52de0e77c16059062cc6c8a1 /net
parentf26df1a1a9452573af7b6cea9a4723593e838568 (diff)
netdma: adding alignment check for NETDMA ops
This is the fallout from adding memcpy alignment workaround for certain IOATDMA hardware. NetDMA will only use DMA engine that can handle byte align ops. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv6/tcp_ipv6.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 22ef5f9fd2ff..8712c5d4f91d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1450,7 +1450,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1450 if ((available < target) && 1450 if ((available < target) &&
1451 (len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) && 1451 (len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) &&
1452 !sysctl_tcp_low_latency && 1452 !sysctl_tcp_low_latency &&
1453 dma_find_channel(DMA_MEMCPY)) { 1453 net_dma_find_channel()) {
1454 preempt_enable_no_resched(); 1454 preempt_enable_no_resched();
1455 tp->ucopy.pinned_list = 1455 tp->ucopy.pinned_list =
1456 dma_pin_iovec_pages(msg->msg_iov, len); 1456 dma_pin_iovec_pages(msg->msg_iov, len);
@@ -1665,7 +1665,7 @@ do_prequeue:
1665 if (!(flags & MSG_TRUNC)) { 1665 if (!(flags & MSG_TRUNC)) {
1666#ifdef CONFIG_NET_DMA 1666#ifdef CONFIG_NET_DMA
1667 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) 1667 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
1668 tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY); 1668 tp->ucopy.dma_chan = net_dma_find_channel();
1669 1669
1670 if (tp->ucopy.dma_chan) { 1670 if (tp->ucopy.dma_chan) {
1671 tp->ucopy.dma_cookie = dma_skb_copy_datagram_iovec( 1671 tp->ucopy.dma_cookie = dma_skb_copy_datagram_iovec(
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b5e315f13641..27c676dfea33 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5190,7 +5190,7 @@ static int tcp_dma_try_early_copy(struct sock *sk, struct sk_buff *skb,
5190 return 0; 5190 return 0;
5191 5191
5192 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) 5192 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
5193 tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY); 5193 tp->ucopy.dma_chan = net_dma_find_channel();
5194 5194
5195 if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) { 5195 if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) {
5196 5196
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index fd54c5f8a255..3810b6fe0a1e 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1727,7 +1727,7 @@ process:
1727#ifdef CONFIG_NET_DMA 1727#ifdef CONFIG_NET_DMA
1728 struct tcp_sock *tp = tcp_sk(sk); 1728 struct tcp_sock *tp = tcp_sk(sk);
1729 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) 1729 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
1730 tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY); 1730 tp->ucopy.dma_chan = net_dma_find_channel();
1731 if (tp->ucopy.dma_chan) 1731 if (tp->ucopy.dma_chan)
1732 ret = tcp_v4_do_rcv(sk, skb); 1732 ret = tcp_v4_do_rcv(sk, skb);
1733 else 1733 else
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3edd05ae4388..fcb3e4f0010e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1755,7 +1755,7 @@ process:
1755#ifdef CONFIG_NET_DMA 1755#ifdef CONFIG_NET_DMA
1756 struct tcp_sock *tp = tcp_sk(sk); 1756 struct tcp_sock *tp = tcp_sk(sk);
1757 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) 1757 if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
1758 tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY); 1758 tp->ucopy.dma_chan = net_dma_find_channel();
1759 if (tp->ucopy.dma_chan) 1759 if (tp->ucopy.dma_chan)
1760 ret = tcp_v6_do_rcv(sk, skb); 1760 ret = tcp_v6_do_rcv(sk, skb);
1761 else 1761 else