Commit 479cfd1f authored by Grigore Popescu's avatar Grigore Popescu Committed by Priyanka Jain
Browse files

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: default avatarGrigore Popescu <grigore.popescu@nxp.com>
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: default avatarPriyanka Jain <priyanka.jain@nxp.com>
parent 4e0dc38d
// SPDX-License-Identifier: GPL-2.0+ // SPDX-License-Identifier: GPL-2.0+
/* /*
* Copyright 2018 NXP * Copyright 2018, 2020 NXP
*/ */
#include <common.h> #include <common.h>
#include <phy.h> #include <phy.h>
...@@ -57,7 +57,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl) ...@@ -57,7 +57,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
{ {
enum srds_prtcl; enum srds_prtcl;
if (is_device_disabled(dpmac_id + 1)) if (is_device_disabled(dpmac_id))
return PHY_INTERFACE_MODE_NONE; return PHY_INTERFACE_MODE_NONE;
if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII18) if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII18)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment