[PATCH] net: memac_phy: add a timeout to MDIO operations

Madalin Bucur (OSS) madalin.bucur at oss.nxp.com
Wed Dec 9 14:04:17 CET 2020


> -----Original Message-----
> From: Ioana Ciornei <ioana.ciornei at nxp.com>
> Sent: 09 December 2020 13:32
> To: joe.hershberger at ni.com; Tom Rini <trini at konsulko.com>; u-
> boot at lists.denx.de
> Cc: Madalin Bucur <madalin.bucur at nxp.com>; Florin Laurentiu Chiculita
> <florinlaurentiu.chiculita at nxp.com>; Ioana Ciornei <ioana.ciornei at nxp.com>
> Subject: [PATCH] net: memac_phy: add a timeout to MDIO operations
> 
> We have encountered circumstances when a board design does not include
> pull-up resistors on the external MDIO buses which are not used. This
> leads to the MDIO data line not being pulled-up, thus the MDIO controller
> will always see the line as busy.
> 
> Without a timeout in the MDIO bus driver, the execution is stuck in an
> infinite loop when any access is initiated on that external bus.
> 
> Add a timeout in the driver so that we are protected in this
> circumstance. This is similar to what is being done in the Linux
> xgmac_mdio driver.
> 
> Signed-off-by: Ioana Ciornei <ioana.ciornei at nxp.com>
> ---
>  drivers/net/fm/memac_phy.c | 76 +++++++++++++++++++++++++++++---------
>  1 file changed, 58 insertions(+), 18 deletions(-)

Reviewed-by: Madalin Bucur <madalin.bucur at oss.nxp.com>



More information about the U-Boot mailing list