net: stmmac: dwmac4: Enable RX Jumbo frame support
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 6 Sep 2019 07:41:15 +0000 (09:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Sep 2019 15:57:41 +0000 (17:57 +0200)
We are already doing it by default in the TX path so we can also enable
Jumbo Frame support in the RX path independently of MTU value.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac4.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

index 2ed11a581d800159363212721bf240ad483ef06f..03301ffc0391dc400651ba36b615439318df49d2 100644 (file)
@@ -352,7 +352,8 @@ enum power_event {
 
 /* Default operating mode of the MAC */
 #define GMAC_CORE_INIT (GMAC_CONFIG_JD | GMAC_CONFIG_PS | \
-                       GMAC_CONFIG_BE | GMAC_CONFIG_DCRS)
+                       GMAC_CONFIG_BE | GMAC_CONFIG_DCRS | \
+                       GMAC_CONFIG_JE)
 
 /* To dump the core regs excluding  the Address Registers */
 #define        GMAC_REG_NUM    132
index fc9954e4a7729e79b86313af8d916290006ba9c2..596311a80d1c8a4a489c227739f0a87ef6094ce3 100644 (file)
@@ -25,15 +25,9 @@ static void dwmac4_core_init(struct mac_device_info *hw,
 {
        void __iomem *ioaddr = hw->pcsr;
        u32 value = readl(ioaddr + GMAC_CONFIG);
-       int mtu = dev->mtu;
 
        value |= GMAC_CORE_INIT;
 
-       if (mtu > 1500)
-               value |= GMAC_CONFIG_2K;
-       if (mtu > 2000)
-               value |= GMAC_CONFIG_JE;
-
        if (hw->ps) {
                value |= GMAC_CONFIG_TE;