summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorJoao Pinto2017-03-15 12:04:54 +0100
committerDavid S. Miller2017-03-15 22:44:33 +0100
commit146617b88b86c3d1f1309604d5d4cb38d5b24f1a (patch)
tree1c4778b16066cb66d90ef148d2b94d72c4378d77 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parentnet: stmmac: dma channel init prepared for multiple queues (diff)
downloadkernel-qcow2-linux-146617b88b86c3d1f1309604d5d4cb38d5b24f1a.tar.gz
kernel-qcow2-linux-146617b88b86c3d1f1309604d5d4cb38d5b24f1a.tar.xz
kernel-qcow2-linux-146617b88b86c3d1f1309604d5d4cb38d5b24f1a.zip
net: stmmac: tso init prepared for multiple queues
This patch configures TSO for all available tx queues. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2868391de0fb..c802286380dc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1966,6 +1966,8 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
{
struct stmmac_priv *priv = netdev_priv(dev);
u32 rx_cnt = priv->plat->rx_queues_to_use;
+ u32 tx_cnt = priv->plat->tx_queues_to_use;
+ u32 chan;
int ret;
/* DMA initialization and SW reset */
@@ -2049,8 +2051,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
stmmac_set_rings_length(priv);
/* Enable TSO */
- if (priv->tso)
- priv->hw->dma->enable_tso(priv->ioaddr, 1, STMMAC_CHAN0);
+ if (priv->tso) {
+ for (chan = 0; chan < tx_cnt; chan++)
+ priv->hw->dma->enable_tso(priv->ioaddr, 1, chan);
+ }
return 0;
}