5d6809d5e49c3107e3122b179a955b559b112533
[openwrt/openwrt.git] / target / linux / ixp4xx / patches-4.1 / 600-skb_avoid_dmabounce.patch
1 --- a/net/core/skbuff.c
2 +++ b/net/core/skbuff.c
3 @@ -212,6 +212,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 @@ -1192,6 +1195,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))