mediatek: more v5.4 fixes
[openwrt/staging/wigyori.git] / target / linux / mediatek / patches-5.4 / 0401-eth-fix-eth1-tx-timeout.patch
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
4 @@ -1090,17 +1090,6 @@
5 }
6 }
7
8 -static void mtk_stop_queue(struct mtk_eth *eth)
9 -{
10 - int i;
11 -
12 - for (i = 0; i < MTK_MAC_COUNT; i++) {
13 - if (!eth->netdev[i])
14 - continue;
15 - netif_stop_queue(eth->netdev[i]);
16 - }
17 -}
18 -
19 static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
20 {
21 struct mtk_mac *mac = netdev_priv(dev);
22 @@ -1121,7 +1110,7 @@
23
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(&eth->page_lock);
31 @@ -1147,7 +1136,7 @@
32 goto drop;
33
34 if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
35 - mtk_stop_queue(eth);
36 + netif_stop_queue(dev);
37
38 spin_unlock(&eth->page_lock);
39