Undefined burst shall only be set if pdata asks to.

Signed-off-by: Jose Abreu <joab...@synopsys.com>
Cc: Joao Pinto <jpi...@synopsys.com>
Cc: David S. Miller <da...@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavall...@st.com>
Cc: Alexandre Torgue <alexandre.tor...@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 
b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
index a1ad49680c07..3f84271da836 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
@@ -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;
-- 
2.7.4

Reply via email to