summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrigore Popescu <grigore.popescu@nxp.com>2020-09-10 12:59:03 +0300
committerPriyanka Jain <priyanka.jain@nxp.com>2020-09-24 18:27:32 +0300
commit479cfd1fa6559b6b4e260b05657a0c09bb76c837 (patch)
tree6bb78ae2c4c57f18a4645c0720dda35c30ab37d8
parent4e0dc38da007548702684bcd0b87700385f235a6 (diff)
downloadu-boot-479cfd1fa6559b6b4e260b05657a0c09bb76c837.tar.xz
drivers: net: ldpaa_eth: lx2160a: fix bug in checking if a DPMAC is enabled
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>
-rw-r--r--drivers/net/ldpaa_eth/lx2160a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
index 9432b6eb85..1e62c64203 100644
--- a/drivers/net/ldpaa_eth/lx2160a.c
+++ b/drivers/net/ldpaa_eth/lx2160a.c
@@ -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)