ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0359-sdk_dpaa-ls1043a-errata-re-enable-SG-support-and-rec.patch
1 From fc7824df7022869a403c8a5122a55fe73a193466 Mon Sep 17 00:00:00 2001
2 From: Camelia Groza <camelia.groza@nxp.com>
3 Date: Tue, 29 Oct 2019 16:50:34 +0200
4 Subject: [PATCH] sdk_dpaa: ls1043a errata: re-enable SG support and recycling
5
6 With certain limitation, SG frames can be used safely without triggering
7 the errata.
8
9 Buffers can be recycled, even after realigning the data.
10
11 Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
12 ---
13  drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c    | 10 ----------
14  drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h    |  1 -
15  drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c |  9 ---------
16  3 files changed, 20 deletions(-)
17
18 --- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c
19 +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c
20 @@ -778,16 +778,6 @@ static int dpa_private_netdev_init(struc
21         /* Advertise NETIF_F_HW_ACCEL_MQ to avoid Tx timeout warnings */
22         net_dev->features |= NETIF_F_HW_ACCEL_MQ;
23  
24 -#ifndef CONFIG_PPC
25 -       /* Due to the A010022 FMan errata, we can not use S/G frames. We need
26 -        * to stop advertising S/G and GSO support.
27 -        */
28 -       if (unlikely(dpaa_errata_a010022)) {
29 -               net_dev->hw_features &= ~NETIF_F_SG;
30 -               net_dev->features &= ~NETIF_F_GSO;
31 -       }
32 -#endif
33 -
34         return dpa_netdev_init(net_dev, mac_addr, tx_timeout);
35  }
36  
37 --- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h
38 +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h
39 @@ -661,7 +661,6 @@ static inline void _dpa_bp_free_pf(void
40  
41  #ifndef CONFIG_PPC
42  extern bool dpaa_errata_a010022; /* SoC affected by A010022 errata */
43 -#define NONREC_MARK    0x01
44  #define CROSS_4K(start, size) \
45         (((uintptr_t)(start) + (size)) > \
46          (((uintptr_t)(start) + 0x1000) & ~0xFFF))
47 --- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c
48 +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c
49 @@ -327,12 +327,6 @@ EXPORT_SYMBOL(_dpa_cleanup_tx_fd);
50  #ifndef CONFIG_FSL_DPAA_TS
51  bool dpa_skb_is_recyclable(struct sk_buff *skb)
52  {
53 -#ifndef CONFIG_PPC
54 -       /* Do no recycle skbs realigned by the errata workaround */
55 -       if (unlikely(dpaa_errata_a010022) && skb->mark == NONREC_MARK)
56 -               return false;
57 -#endif
58 -
59         /* No recycling possible if skb buffer is kmalloc'ed  */
60         if (skb->head_frag == 0)
61                 return false;
62 @@ -906,9 +900,6 @@ static struct sk_buff *a010022_realign_s
63         skb_set_network_header(nskb, net_offset);
64         skb_set_transport_header(nskb, trans_offset);
65  
66 -       /* We don't want the buffer to be recycled so we mark it accordingly */
67 -       nskb->mark = NONREC_MARK;
68 -
69         return nskb;
70  
71  err: