ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0295-staging-fsl_ppfe-eth-calculate-PFE_PKT_SIZE-with-SKB.patch
1 From 2f59069dbb48ee86bee42bf36a4dfafe64028344 Mon Sep 17 00:00:00 2001
2 From: Calvin Johnson <calvin.johnson@nxp.com>
3 Date: Thu, 8 Mar 2018 13:58:38 +0530
4 Subject: [PATCH] staging: fsl_ppfe/eth: calculate PFE_PKT_SIZE with
5  SKB_DATA_ALIGN
6
7 pfe packet size was calculated without considering skb data alignment
8 and this resulted in jumbo frames crashing kernel when the
9 cacheline size increased from 64 to 128 bytes with
10 commit 97303480753e ("arm64: Increase the max granular size").
11
12 Modify pfe packet size caclulation to include skb data alignment of
13 sizeof(struct skb_shared_info).
14
15 Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
16 ---
17  drivers/staging/fsl_ppfe/pfe_hif_lib.h | 2 +-
18  1 file changed, 1 insertion(+), 1 deletion(-)
19
20 --- a/drivers/staging/fsl_ppfe/pfe_hif_lib.h
21 +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.h
22 @@ -146,7 +146,7 @@ struct tx_queue_desc {
23  #define PFE_BUF_SIZE           2048
24  #define PFE_PKT_HEADROOM       128
25  
26 -#define SKB_SHARED_INFO_SIZE   (sizeof(struct skb_shared_info))
27 +#define SKB_SHARED_INFO_SIZE   SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
28  #define PFE_PKT_SIZE           (PFE_BUF_SIZE - PFE_PKT_HEADROOM \
29                                  - SKB_SHARED_INFO_SIZE)
30  #define MAX_L2_HDR_SIZE                14      /* Not correct for VLAN/PPPoE */