net: stmmac: selftests: Always use max DMA size in Jumbo Test
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 30 Sep 2019 08:19:07 +0000 (10:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Oct 2019 17:12:37 +0000 (10:12 -0700)
Although some XGMAC setups support frames larger than DMA size, some of
them may not. As we can't know before-hand which ones support let's use
the maximum DMA buffer size in the Jumbo Tests.

User can always reconfigure the MTU to achieve larger frames.

Fixes: 427849e8c37f ("net: stmmac: selftests: Add Jumbo Frame tests")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

index 5f66f6161629a3d0e4bb89e42f011f4db4f39931..cc76a42c7466c27cc7d025bc94a03014d6bcfda3 100644 (file)
@@ -1564,10 +1564,6 @@ static int __stmmac_test_jumbo(struct stmmac_priv *priv, u16 queue)
        struct stmmac_packet_attrs attr = { };
        int size = priv->dma_buf_sz;
 
-       /* Only XGMAC has SW support for multiple RX descs in same packet */
-       if (priv->plat->has_xgmac)
-               size = priv->dev->max_mtu;
-
        attr.dst = priv->dev->dev_addr;
        attr.max_size = size - ETH_FCS_LEN;
        attr.queue_mapping = queue;