ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0158-staging-fsl-dpaa2-mac-Remove-link-type-from-phy-sel-.patch
1 From 01fc2236f7fe0c094c26635e738331abec0ac103 Mon Sep 17 00:00:00 2001
2 From: costi <constantin.tudor@freescale.com>
3 Date: Tue, 7 Mar 2017 16:13:07 +0200
4 Subject: [PATCH] staging: fsl-dpaa2/mac: Remove link type from phy sel logic
5
6 Signed-off-by: Constantin Tudor <constantin.tudor@nxp.com>
7 ---
8  drivers/staging/fsl-dpaa2/mac/mac.c | 13 ++++---------
9  1 file changed, 4 insertions(+), 9 deletions(-)
10
11 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
12 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
13 @@ -545,8 +545,11 @@ static int dpaa2_mac_probe(struct fsl_mc
14         /* probe the PHY as a fixed-link if the link type declared in DPC
15          * explicitly mandates this
16          */
17 -       if (priv->attr.link_type == DPMAC_LINK_TYPE_FIXED)
18 +
19 +       phy_node = of_parse_phandle(dpmac_node, "phy-handle", 0);
20 +       if (!phy_node) {
21                 goto probe_fixed_link;
22 +       }
23  
24         if (priv->attr.eth_if < ARRAY_SIZE(dpaa2_mac_iface_mode)) {
25                 if_mode = dpaa2_mac_iface_mode[priv->attr.eth_if];
26 @@ -559,14 +562,6 @@ static int dpaa2_mac_probe(struct fsl_mc
27         }
28  
29         /* try to connect to the PHY */
30 -       phy_node = of_parse_phandle(dpmac_node, "phy-handle", 0);
31 -       if (!phy_node) {
32 -               if (!phy_node) {
33 -                       dev_err(dev, "dpmac node has no phy-handle property\n");
34 -                       err = -ENODEV;
35 -                       goto err_no_phy;
36 -               }
37 -       }
38         netdev->phydev = of_phy_connect(netdev, phy_node,
39                                         &dpaa2_mac_link_changed, 0, if_mode);
40         if (!netdev->phydev) {