2a11ba8d09fb45c54fe171d6352dc1d5f6d44f1a
[openwrt/svn-archive/archive.git] / target / linux / ixp4xx / patches-3.10 / 600-skb_avoid_dmabounce.patch
1 --- a/net/core/skbuff.c
2 +++ b/net/core/skbuff.c
3 @@ -238,6 +238,9 @@ struct sk_buff *__alloc_skb(unsigned int
4
5 if (sk_memalloc_socks() && (flags & SKB_ALLOC_RX))
6 gfp_mask |= __GFP_MEMALLOC;
7 +#ifdef CONFIG_ARCH_IXP4XX
8 + gfp_mask |= GFP_DMA;
9 +#endif
10
11 /* Get the HEAD */
12 skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
13 @@ -1082,6 +1085,10 @@ int pskb_expand_head(struct sk_buff *skb
14 if (skb_shared(skb))
15 BUG();
16
17 +#ifdef CONFIG_ARCH_IXP4XX
18 + gfp_mask |= GFP_DMA;
19 +#endif
20 +
21 size = SKB_DATA_ALIGN(size);
22
23 if (skb_pfmemalloc(skb))