layerscape: add patches-5.4
[openwrt/staging/mkresin.git] / target / linux / layerscape / patches-5.4 / 701-net-0302-staging-fsl_ppfe-eth-remove-jumbo-frame-enable-from-.patch
1 From 162c09cee1b5b00e09fd99273fd2f8c460c0d989 Mon Sep 17 00:00:00 2001
2 From: Calvin Johnson <calvin.johnson@nxp.com>
3 Date: Wed, 20 Jun 2018 10:23:16 +0530
4 Subject: [PATCH] staging: fsl_ppfe/eth: remove jumbo frame enable from gemac
5 init
6
7 MAC Receive Control Register was configured to allow jumbo frames.
8 This is removed as jumbo frames can be supported anytime by changing
9 mtu which will in turn modify MAX_FL field of MAC RCR.
10 Jumbo frames caused pfe to hang on LS1012A rev 1.0 Silicon due to
11 erratum A-010897.
12
13 Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
14 ---
15 drivers/staging/fsl_ppfe/pfe_eth.c | 1 -
16 drivers/staging/fsl_ppfe/pfe_hal.c | 9 ---------
17 2 files changed, 10 deletions(-)
18
19 --- a/drivers/staging/fsl_ppfe/pfe_eth.c
20 +++ b/drivers/staging/fsl_ppfe/pfe_eth.c
21 @@ -1272,7 +1272,6 @@ static int pfe_gemac_init(struct pfe_eth
22 gemac_set_config(priv->EMAC_baseaddr, &cfg);
23 gemac_allow_broadcast(priv->EMAC_baseaddr);
24 gemac_enable_1536_rx(priv->EMAC_baseaddr);
25 - gemac_enable_rx_jmb(priv->EMAC_baseaddr);
26 gemac_enable_stacked_vlan(priv->EMAC_baseaddr);
27 gemac_enable_pause_rx(priv->EMAC_baseaddr);
28 gemac_set_bus_width(priv->EMAC_baseaddr, 64);
29 --- a/drivers/staging/fsl_ppfe/pfe_hal.c
30 +++ b/drivers/staging/fsl_ppfe/pfe_hal.c
31 @@ -1028,15 +1028,6 @@ void gemac_set_rx_max_fl(void *base, int
32 | (mtu << 16), base + EMAC_RCNTRL_REG);
33 }
34
35 -/* GEMAC enable jumbo function.
36 - * @param[in] base GEMAC base address
37 - */
38 -void gemac_enable_rx_jmb(void *base)
39 -{
40 - writel((readl(base + EMAC_RCNTRL_REG) & PFE_RCR_MAX_FL_MASK)
41 - | (JUMBO_FRAME_SIZE << 16), base + EMAC_RCNTRL_REG);
42 -}
43 -
44 /* GEMAC enable stacked vlan function.
45 * @param[in] base GEMAC base address
46 */