[PATCH] drivers: net: ldpaa_eth: lx2160a: fix bug in checking if a DPMAC is enabled

Priyanka Jain priyanka.jain at nxp.com
Fri Sep 11 10:57:43 CEST 2020


>-----Original Message-----
>From: Ioana Ciornei <ioana.ciornei at nxp.com>
>Sent: Thursday, September 10, 2020 3:29 PM
>To: Priyanka Jain <priyanka.jain at nxp.com>; joe.hershberger at ni.com; u-
>boot at lists.denx.de
>Cc: Grigore Popescu <grigore.popescu at nxp.com>; Ioana Ciornei
><ioana.ciornei at nxp.com>
>Subject: [PATCH] drivers: net: ldpaa_eth: lx2160a: fix bug in checking if a
>DPMAC is enabled
>
>From: Grigore Popescu <grigore.popescu at nxp.com>
>
>The next DPMAC was always verified if it is enabled.  In case of DPMAC at 6, the
>DPMAC at 7 is verified.  As DPMAC at 7 is disabled, DPMAC at 6 will be considered
>disabled and not detected by uboot.
>
>Signed-off-by: Grigore Popescu <grigore.popescu at nxp.com>
>Signed-off-by: Ioana Ciornei <ioana.ciornei at nxp.com>
>---
> drivers/net/ldpaa_eth/lx2160a.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
>index 9432b6eb85c7..1e62c642039e 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)
>--
>2.17.1
Reviewed-by: Priyanka Jain <priyanka.jain at nxp.com>


More information about the U-Boot mailing list