2a6ccab470398e3402986242d43bed556e60a386
[openwrt/staging/pepe2k.git] /
1 From bd9aa7c077105fda307bbc685949d5bb01ed1bd8 Mon Sep 17 00:00:00 2001
2 From: Dong Aisheng <aisheng.dong@nxp.com>
3 Date: Sun, 29 Sep 2019 22:38:34 +0800
4 Subject: [PATCH] net: dpaa: fix build failure due to skb_frag_t struct change
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 We met below build break due to new kernel change:
10 8842d285bafa ("net: Convert skb_frag_t to bio_vec")
11
12 ../drivers/net/ethernet/freescale/dpaa/dpaa_eth.c: In function ‘dpaa_errata_a010022_has_dma_issue’:
13 ../drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2137:37: error: ‘skb_frag_t’ has no member named ‘page_offset’
14 if (CROSS_4K_BOUND((uintptr_t)frag->page_offset, frag->bv_len))
15 ^
16 ../drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2105:5: note: in definition of macro ‘CROSS_4K_BOUND’
17 (((start) + (size)) > (((start) + 0x1000) & ~0xFFF))
18 ^
19 ../drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2137:37: error: ‘skb_frag_t’ has no member named ‘page_offset’
20 if (CROSS_4K_BOUND((uintptr_t)frag->page_offset, frag->bv_len))
21 ^
22 ../drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2105:27: note: in definition of macro ‘CROSS_4K_BOUND’
23 (((start) + (size)) > (((start) + 0x1000) & ~0xFFF))
24
25 Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
26 ---
27 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
31 +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
32 @@ -2141,7 +2141,7 @@ static bool dpaa_errata_a010022_has_dma_
33 /* Check if a paged fragment crosses a boundary from its
34 * offset to its end.
35 */
36 - if (CROSS_4K_BOUND((uintptr_t)frag->page_offset, frag->bv_len))
37 + if (CROSS_4K_BOUND(skb_frag_off(frag), skb_frag_size(frag)))
38 return true;
39
40 i++;