Skip to content

Commit 0799c82

Browse files
esbenSasha Levin
authored and
Sasha Levin
committed
net: stmmac: do not clear TBS enable bit on link up/down
commit 4896bb7 upstream. With the dma conf being reallocated on each call to stmmac_open(), any information in there is lost, unless we specifically handle it. The STMMAC_TBS_EN bit is set when adding an etf qdisc, and the etf qdisc therefore would stop working when link was set down and then back up. Fixes: ba39b34 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open") Cc: [email protected] Signed-off-by: Esben Haabendal <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dfb558c commit 0799c82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,6 +3853,9 @@ static int __stmmac_open(struct net_device *dev,
38533853
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
38543854

38553855
buf_sz = dma_conf->dma_buf_sz;
3856+
for (int i = 0; i < MTL_MAX_TX_QUEUES; i++)
3857+
if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN)
3858+
dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs;
38563859
memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));
38573860

38583861
stmmac_reset_queues_param(priv);

0 commit comments

Comments
 (0)