]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: net: ldpaa_eth: lx2160a: fix bug in checking if a DPMAC is enabled
authorGrigore Popescu <grigore.popescu@nxp.com>
Thu, 10 Sep 2020 09:59:03 +0000 (12:59 +0300)
committerPriyanka Jain <priyanka.jain@nxp.com>
Thu, 24 Sep 2020 15:27:32 +0000 (20:57 +0530)
The next DPMAC was always verified if it is enabled.  In case of
DPMAC@6, the DPMAC@7 is verified.  As DPMAC@7 is disabled, DPMAC@6 will
be considered disabled and not detected by uboot.

Signed-off-by: Grigore Popescu <grigore.popescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/ldpaa_eth/lx2160a.c

index 9432b6eb85c74987055233c1ec4933f3c7904ba8..1e62c642039ea0f0e02cf64f46ec61bee3045c8c 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2018 NXP
+ * Copyright 2018, 2020 NXP
  */
 #include <common.h>
 #include <phy.h>
@@ -57,7 +57,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
 {
        enum srds_prtcl;
 
-       if (is_device_disabled(dpmac_id + 1))
+       if (is_device_disabled(dpmac_id))
                return PHY_INTERFACE_MODE_NONE;
 
        if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII18)