net: stmmac: fix TSO and TBS feature enabling during driver open
authorOng Boon Leong <boon.leong.ong@intel.com>
Wed, 21 Apr 2021 09:11:49 +0000 (17:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:41 +0000 (09:50 +0200)
commit01dab91200dc6edda96d9694a4ff7afb025f9590
tree50811d8a4124f525ea41a270ae62927b79b22eb3
parent64753ac1e43e3a1d1e0a467b2d51f18956f71be7
net: stmmac: fix TSO and TBS feature enabling during driver open

[ Upstream commit 5e6038b88a5718910dd74b949946d9d9cee9a041 ]

TSO and TBS cannot co-exist and current implementation requires two
fixes:

 1) stmmac_open() does not need to call stmmac_enable_tbs() because
    the MAC is reset in stmmac_init_dma_engine() anyway.
 2) Inside stmmac_hw_setup(), we should call stmmac_enable_tso() for
    TX Q that is _not_ configured for TBS.

Fixes: 579a25a854d4 ("net: stmmac: Initial support for TBS")
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c