net: mediatek: fix usability with wget command
The wget command currently cannot work correctly with mtk_eth driver. This patch fixed this by increase DMA ring size and invalidate ring data after use. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
This commit is contained in:
@@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
#include "mtk_eth.h"
|
#include "mtk_eth.h"
|
||||||
|
|
||||||
#define NUM_TX_DESC 24
|
#define NUM_TX_DESC 32
|
||||||
#define NUM_RX_DESC 24
|
#define NUM_RX_DESC 32
|
||||||
#define TX_TOTAL_BUF_SIZE (NUM_TX_DESC * PKTSIZE_ALIGN)
|
#define TX_TOTAL_BUF_SIZE (NUM_TX_DESC * PKTSIZE_ALIGN)
|
||||||
#define RX_TOTAL_BUF_SIZE (NUM_RX_DESC * PKTSIZE_ALIGN)
|
#define RX_TOTAL_BUF_SIZE (NUM_RX_DESC * PKTSIZE_ALIGN)
|
||||||
#define TOTAL_PKT_BUF_SIZE (TX_TOTAL_BUF_SIZE + RX_TOTAL_BUF_SIZE)
|
#define TOTAL_PKT_BUF_SIZE (TX_TOTAL_BUF_SIZE + RX_TOTAL_BUF_SIZE)
|
||||||
@@ -1897,6 +1897,9 @@ static int mtk_eth_free_pkt(struct udevice *dev, uchar *packet, int length)
|
|||||||
|
|
||||||
rxd = priv->rx_ring_noc + idx * priv->soc->rxd_size;
|
rxd = priv->rx_ring_noc + idx * priv->soc->rxd_size;
|
||||||
|
|
||||||
|
invalidate_dcache_range((ulong)rxd->rxd1,
|
||||||
|
(ulong)rxd->rxd1 + PKTSIZE_ALIGN);
|
||||||
|
|
||||||
if (MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V2) ||
|
if (MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V2) ||
|
||||||
MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V3))
|
MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V3))
|
||||||
rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN);
|
rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN);
|
||||||
|
Reference in New Issue
Block a user