mediatek: sync and patches add support for several boards
[openwrt.git] / target / linux / mediatek / patches-4.4 / 0082-net-next-mediatek-add-RX-delay-support.patch
1 From 3f7e90b7acf147dbbe6bb140c510fc1eb97279ef Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Fri, 22 Apr 2016 11:08:43 +0200
4 Subject: [PATCH 82/90] net-next: mediatek: add RX delay support
5
6 If an external Gigabit PHY is connected to either of the MACs we need to
7 tell the to use a RX delay. Not doing so will result in heavy packet loss
8 and/or data corruption of RX traffic.
9
10 Signed-off-by: John Crispin <blogic@openwrt.org>
11 ---
12  drivers/net/ethernet/mediatek/mtk_eth_soc.c |    1 +
13  1 file changed, 1 insertion(+)
14
15 diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
16 index f4d8519..aa25788 100644
17 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
18 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
19 @@ -226,6 +226,7 @@ static int mtk_phy_connect(struct mtk_mac *mac)
20                 return -ENODEV;
21  
22         switch (of_get_phy_mode(np)) {
23 +       case PHY_INTERFACE_MODE_RGMII_RXID:
24         case PHY_INTERFACE_MODE_RGMII:
25                 ge_mode = 0;
26                 break;
27 -- 
28 1.7.10.4
29