net: stmmac: dwxgmac: Fix the undefined burst setting
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 28 Jun 2019 07:29:15 +0000 (09:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:23:39 +0000 (09:23 -0700)
Undefined burst shall only be set if pdata asks to.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c

index 4244897..b739673 100644 (file)
@@ -91,11 +91,11 @@ static void dwxgmac2_dma_axi(void __iomem *ioaddr, struct stmmac_axi *axi)
        value |= (axi->axi_rd_osr_lmt << XGMAC_RD_OSR_LMT_SHIFT) &
                XGMAC_RD_OSR_LMT;
 
+       if (!axi->axi_fb)
+               value |= XGMAC_UNDEF;
+
        value &= ~XGMAC_BLEN;
        for (i = 0; i < AXI_BLEN; i++) {
-               if (axi->axi_blen[i])
-                       value &= ~XGMAC_UNDEF;
-
                switch (axi->axi_blen[i]) {
                case 256:
                        value |= XGMAC_BLEN256;