diff options
author | Niklas Cassel <niklas.cassel@axis.com> | 2018-02-19 18:11:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-20 14:13:17 -0500 |
commit | 8d212a9ea65af7082adc577ec46b6d1372d0a8f3 (patch) | |
tree | 1db793f4021d35aae7ccaed39625608304ac7867 /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | 3fef2b6290e85de93a7096381e77f9a1b7544278 (diff) | |
download | linux-8d212a9ea65af7082adc577ec46b6d1372d0a8f3.tar.gz linux-8d212a9ea65af7082adc577ec46b6d1372d0a8f3.tar.bz2 linux-8d212a9ea65af7082adc577ec46b6d1372d0a8f3.zip |
net: stmmac: set MSS for each tx DMA channel
The DMA engine in dwmac4 can segment a large TSO packet to several
smaller packets of (max) size Maximum Segment Size (MSS).
The DMA engine fetches and saves the MSS via a context descriptor.
This context decriptor has to be provided to each tx DMA channel.
To ensure that this is done, move struct member mss from stmmac_priv
to stmmac_tx_queue.
stmmac_reset_queues_param() now also resets mss, together with other
queue parameters, so reset of mss value can be removed from
stmmac_resume().
init_dma_tx_desc_rings() now also resets mss, together with other
queue parameters, so reset of mss value can be removed from
stmmac_open().
This fixes tx queue timeouts for dwmac4, with DT property
snps,tx-queues-to-use > 1, when running iperf3 with multiple threads.
Fixes: ce736788e8a9 ("net: stmmac: adding multiple buffers for TX")
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index a916e13624eb..75161e1b7e55 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -58,6 +58,7 @@ struct stmmac_tx_queue { unsigned int dirty_tx; dma_addr_t dma_tx_phy; u32 tx_tail_addr; + u32 mss; }; struct stmmac_rx_queue { @@ -138,7 +139,6 @@ struct stmmac_priv { spinlock_t ptp_lock; void __iomem *mmcaddr; void __iomem *ptpaddr; - u32 mss; #ifdef CONFIG_DEBUG_FS struct dentry *dbgfs_dir; |