1 diff -urN b/drivers/net/ethernet/mediatek/mtk_eth_soc.c c/drivers/net/ethernet/mediatek/mtk_eth_soc.c
2 --- b/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2020-03-31 16:05:39.142008780 +0800
3 +++ c/drivers/net/ethernet/mediatek/mtk_eth_soc.c 2020-03-31 16:08:12.422190657 +0800
8 -static void mtk_stop_queue(struct mtk_eth *eth)
12 - for (i = 0; i < MTK_MAC_COUNT; i++) {
13 - if (!eth->netdev[i])
15 - netif_stop_queue(eth->netdev[i]);
19 static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
21 struct mtk_mac *mac = netdev_priv(dev);
24 tx_num = mtk_cal_txd_req(skb);
25 if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
26 - mtk_stop_queue(eth);
27 + netif_stop_queue(dev);
28 netif_err(eth, tx_queued, dev,
29 "Tx Ring full when queue awake!\n");
30 spin_unlock(ð->page_lock);
34 if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
35 - mtk_stop_queue(eth);
36 + netif_stop_queue(dev);
38 spin_unlock(ð->page_lock);