ethernet: stmmac: Split TX and RX DMA size

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia576efd1d413c44bb789b67151156ac0f2cf59d1
This commit is contained in:
David Wu
2022-04-15 17:54:58 +08:00
committed by Tao Huang
parent b7cf21f1e0
commit 905e1ec794
3 changed files with 6 additions and 4 deletions

View File

@@ -2836,11 +2836,11 @@ static int stmmac_open(struct net_device *dev)
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
if (!priv->dma_tx_size)
priv->dma_tx_size = priv->plat->dma_size ? priv->plat->dma_size :
priv->dma_tx_size = priv->plat->dma_tx_size ? priv->plat->dma_tx_size :
DMA_DEFAULT_TX_SIZE;
if (!priv->dma_rx_size)
priv->dma_rx_size = priv->plat->dma_size ? priv->plat->dma_size :
priv->dma_rx_size = priv->plat->dma_rx_size ? priv->plat->dma_rx_size :
DMA_DEFAULT_RX_SIZE;
/* Earlier check for TBS */

View File

@@ -462,7 +462,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size);
of_property_read_u32(np, "dma-size", &plat->dma_size);
of_property_read_u32(np, "tx-dma-size", &plat->dma_tx_size);
of_property_read_u32(np, "rx-dma-size", &plat->dma_rx_size);
plat->force_sf_dma_mode =
of_property_read_bool(np, "snps,force_sf_dma_mode");

View File

@@ -172,7 +172,8 @@ struct plat_stmmacenet_data {
int unicast_filter_entries;
int tx_fifo_size;
int rx_fifo_size;
int dma_size;
int dma_tx_size;
int dma_rx_size;
u32 addr64;
u32 rx_queues_to_use;
u32 tx_queues_to_use;