diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2022-11-17 02:58:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-18 15:00:17 +0300 |
commit | ec8cd134eeeecef9cccb5431b1a3f140ff2a413a (patch) | |
tree | cc9b374e0df0145574477d73e1677819a77147fd | |
parent | b677d6c7a695dad1b02d2e0e428c39b3b344f270 (diff) | |
download | linux-ec8cd134eeeecef9cccb5431b1a3f140ff2a413a.tar.xz |
net: ethernet: mtk_eth_soc: remove cpu_relax in mtk_pending_work
Get rid of cpu_relax in mtk_pending_work routine since MTK_RESETTING is
set only in mtk_pending_work() and it runs holding rtnl lock
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index f3a03d6f1a92..cdc0ff596196 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3546,11 +3546,8 @@ static void mtk_pending_work(struct work_struct *work) rtnl_lock(); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); + set_bit(MTK_RESETTING, ð->state); - while (test_and_set_bit_lock(MTK_RESETTING, ð->state)) - cpu_relax(); - - dev_dbg(eth->dev, "[%s][%d] mtk_stop starts\n", __func__, __LINE__); /* stop all devices to make sure that dma is properly shut down */ for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) @@ -3584,7 +3581,7 @@ static void mtk_pending_work(struct work_struct *work) dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__); - clear_bit_unlock(MTK_RESETTING, ð->state); + clear_bit(MTK_RESETTING, ð->state); rtnl_unlock(); } |