Skip to content

Commit 2a974c3

Browse files
committed
net: mtk: make sfp switch work (but switch back causes deadlock)
1 parent 9994598 commit 2a974c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4973,7 +4973,6 @@ static void mux_poll(struct work_struct *work)
49734973

49744974
rtnl_lock();
49754975
mtk_stop(dev);
4976-
rtnl_unlock();
49774976

49784977
/* Destroy old phylink if it exists */
49794978
if (mux->data[mux->channel] && mux->data[mux->channel]->phylink) {
@@ -4984,6 +4983,7 @@ static void mux_poll(struct work_struct *work)
49844983
phylink_destroy(mux->data[mux->channel]->phylink);
49854984
mux->data[mux->channel]->phylink = NULL;
49864985
}
4986+
rtnl_unlock();
49874987

49884988
dev_info(eth->dev, "ethernet mux: switch to channel%d\n", new_channel);
49894989

@@ -5004,7 +5004,7 @@ static void mux_poll(struct work_struct *work)
50045004
mac->of_node = mux->data[new_channel]->of_node;
50055005
mac->phylink = mux->data[new_channel]->phylink;
50065006

5007-
rtnl_lock();//only for mtk_open/phylink_start
5007+
rtnl_lock();
50085008
mtk_open(dev);
50095009

50105010
rtnl_unlock();

0 commit comments

Comments
 (0)