layerscape: fix adjust_link for 10G & 2.5G
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-4.4 / 7226-dpaa_eth-fix-adjust_link-for-10G-2.5G.patch
1 From 09a3bd3bb7e59703bfa5fa580436b4a85b15cfb0 Mon Sep 17 00:00:00 2001
2 From: Shaohui Xie <Shaohui.Xie@nxp.com>
3 Date: Fri, 22 Apr 2016 11:26:14 +0800
4 Subject: [PATCH] dpaa_eth: fix adjust_link for 10G & 2.5G
5
6 We don't support adjust link for 10G & 2.5G.
7
8 Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
9 ---
10 drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c | 8 ++++++--
11 1 file changed, 6 insertions(+), 2 deletions(-)
12
13 diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
14 index aaedaae..c092afb 100644
15 --- a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
16 +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
17 @@ -409,6 +409,10 @@ void get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause)
18 }
19 EXPORT_SYMBOL(get_pause_cfg);
20
21 +static void adjust_link_void(struct net_device *net_dev)
22 +{
23 +}
24 +
25 static void adjust_link(struct net_device *net_dev)
26 {
27 struct dpa_priv_s *priv = netdev_priv(net_dev);
28 @@ -473,7 +477,7 @@ static int xgmac_init_phy(struct net_device *net_dev,
29 mac_dev->phy_if);
30 else
31 phy_dev = of_phy_connect(net_dev, mac_dev->phy_node,
32 - &adjust_link, 0, mac_dev->phy_if);
33 + &adjust_link_void, 0, mac_dev->phy_if);
34 if (unlikely(phy_dev == NULL) || IS_ERR(phy_dev)) {
35 netdev_err(net_dev, "Could not attach to PHY %s\n",
36 mac_dev->phy_node ?
37 @@ -506,7 +510,7 @@ static int memac_init_phy(struct net_device *net_dev,
38 return 0;
39 } else
40 phy_dev = of_phy_connect(net_dev, mac_dev->phy_node,
41 - &adjust_link, 0,
42 + &adjust_link_void, 0,
43 mac_dev->phy_if);
44 } else {
45 if (!mac_dev->phy_node)
46 --
47 2.1.0.27.g96db324
48