a0d05917709b6267e7cf34677f61b31ef68e8414
[oweals/openwrt.git] / target / linux / mediatek / patches-5.4 / 0401-eth-fix-eth1-tx-timeout.patch
1 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
2 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
3 @@ -1090,17 +1090,6 @@ static void mtk_wake_queue(struct mtk_et
4         }
5  }
6  
7 -static void mtk_stop_queue(struct mtk_eth *eth)
8 -{
9 -       int i;
10 -
11 -       for (i = 0; i < MTK_MAC_COUNT; i++) {
12 -               if (!eth->netdev[i])
13 -                       continue;
14 -               netif_stop_queue(eth->netdev[i]);
15 -       }
16 -}
17 -
18  static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
19  {
20         struct mtk_mac *mac = netdev_priv(dev);
21 @@ -1121,7 +1110,7 @@ static int mtk_start_xmit(struct sk_buff
22  
23         tx_num = mtk_cal_txd_req(skb);
24         if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
25 -               mtk_stop_queue(eth);
26 +               netif_stop_queue(dev);
27                 netif_err(eth, tx_queued, dev,
28                           "Tx Ring full when queue awake!\n");
29                 spin_unlock(&eth->page_lock);
30 @@ -1147,7 +1136,7 @@ static int mtk_start_xmit(struct sk_buff
31                 goto drop;
32  
33         if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
34 -               mtk_stop_queue(eth);
35 +               netif_stop_queue(dev);
36  
37         spin_unlock(&eth->page_lock);
38