diff options
author | Weijie Gao <weijie.gao@mediatek.com> | 2024-12-17 16:40:03 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-31 10:58:52 -0600 |
commit | c949686e558e00cbb8c38f7c060701006d70cea8 (patch) | |
tree | 447b2ef5f93d226eb204ba8454ff3c64fa1dc199 | |
parent | b9dfb5636bc5eb9b783b88b8388dc7d1f41d6498 (diff) | |
download | u-boot-c949686e558e00cbb8c38f7c060701006d70cea8.tar.gz |
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>
-rw-r--r-- | drivers/net/mtk_eth.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index 888e8c1e855..454caa3cd3a 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -29,8 +29,8 @@ #include "mtk_eth.h" -#define NUM_TX_DESC 24 -#define NUM_RX_DESC 24 +#define NUM_TX_DESC 32 +#define NUM_RX_DESC 32 #define TX_TOTAL_BUF_SIZE (NUM_TX_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) @@ -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; + invalidate_dcache_range((ulong)rxd->rxd1, + (ulong)rxd->rxd1 + PKTSIZE_ALIGN); + if (MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V2) || MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V3)) rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN); |