[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1e50ca36-fc68-6ba8-b041-09336060a409@gmail.com>
Date: Thu, 24 Mar 2022 15:31:47 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: opendmb@...il.com, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Paolo Abeni <pabeni@...hat.com>,
"open list:BROADCOM ETHERNET PHY DRIVERS"
<bcm-kernel-feedback-list@...adcom.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: phy: broadcom: Fix brcm_fet_config_init()
On 3/24/22 14:54, Florian Fainelli wrote:
> A Broadcom AC201 PHY (same entry as 5241) would be flagged by the
> Broadcom UniMAC MDIO controller as not completing the turn around
> properly since the PHY expects 65 MDC clock cycles to complete a write
> cycle, and the MDIO controller was only sending 64 MDC clock cycles as
> determined by looking at a scope shot.
>
> This would make the subsequent read fail with the UniMAC MDIO controller
> command field having MDIO_READ_FAIL set and we would abort the
> brcm_fet_config_init() function and thus not probe the PHY at all.
>
> After issuing a software reset, wait for at least 1ms which is well
> above the 1us reset delay advertised by the datasheet and issue a dummy
> read to let the PHY turn around the line properly. This read
> specifically ignores -EIO which would be returned by MDIO controllers
> checking for the line being turned around.
>
> If we have a genuine read failure, the next read of the interrupt
> status register would pick it up anyway.
>
> Fixes: d7a2ed9248a3 ("broadcom: Add AC131 phy support")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
I will make this a v2 which explicitly includes delay.h to have a
definition for usleep_range9) so this commit would apply cleanly to
earlier kernels as well. Please do not apply just yet. Thanks!
--
Florian
Powered by blists - more mailing lists