Johnny Hughes
2019-02-04 c1f36c28393a7bb126cbf436cd6a4077a5b5c313
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 5eae17c1e83b13aaa843f45eca112221eb634c78 Mon Sep 17 00:00:00 2001
From: Yan Markman <ymarkman@marvell.com>
Date: Tue, 28 Nov 2017 14:19:50 +0100
Subject: [PATCH 12/46] net: mvpp2: do not disable GMAC padding
 
Short fragmented packets may never be sent by the hardware when padding
is disabled. This patch stop modifying the GMAC padding bits, to leave
them to their reset value (disabled).
 
Fixes: 3919357fb0bb ("net: mvpp2: initialize the GMAC when using a port")
Signed-off-by: Yan Markman <ymarkman@marvell.com>
[Antoine: commit message]
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
 
(cherry picked from commit e749aca84b10f3987b2ee1f76e0c7d8aacc5653c)
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 9 ---------
 1 file changed, 9 deletions(-)
 
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index afae4fe..5be58b0 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -4629,11 +4629,6 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port)
                MVPP22_CTRL4_QSGMII_BYPASS_ACTIVE;
         val &= ~MVPP22_CTRL4_EXT_PIN_GMII_SEL;
         writel(val, port->base + MVPP22_GMAC_CTRL_4_REG);
-
-        val = readl(port->base + MVPP2_GMAC_CTRL_2_REG);
-        val |= MVPP2_GMAC_DISABLE_PADDING;
-        val &= ~MVPP2_GMAC_FLOW_CTRL_MASK;
-        writel(val, port->base + MVPP2_GMAC_CTRL_2_REG);
     } else if (phy_interface_mode_is_rgmii(port->phy_interface)) {
         val = readl(port->base + MVPP22_GMAC_CTRL_4_REG);
         val |= MVPP22_CTRL4_EXT_PIN_GMII_SEL |
@@ -4641,10 +4636,6 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port)
                MVPP22_CTRL4_QSGMII_BYPASS_ACTIVE;
         val &= ~MVPP22_CTRL4_DP_CLK_SEL;
         writel(val, port->base + MVPP22_GMAC_CTRL_4_REG);
-
-        val = readl(port->base + MVPP2_GMAC_CTRL_2_REG);
-        val &= ~MVPP2_GMAC_DISABLE_PADDING;
-        writel(val, port->base + MVPP2_GMAC_CTRL_2_REG);
     }
 
     /* The port is connected to a copper PHY */
-- 
2.7.4