[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06035fce-c1e5-434b-9448-77b7f6abd110@lunn.ch>
Date: Thu, 13 Jul 2023 01:17:23 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Tobias Waldekranz <tobias@...dekranz.com>
Subject: Re: [PATCH net v2] dsa: mv88e6xxx: Do a final check before timing out
On Thu, Jul 13, 2023 at 12:34:05AM +0200, Linus Walleij wrote:
> I get sporadic timeouts from the driver when using the
> MV88E6352. Reading the status again after the loop fixes the
> problem: the operation is successful but goes undetected.
>
> Some added prints show things like this:
>
> [ 58.356209] mv88e6085 mdio_mux-0.1:00: Timeout while waiting
> for switch, addr 1b reg 0b, mask 8000, val 0000, data c000
> [ 58.367487] mv88e6085 mdio_mux-0.1:00: Timeout waiting for
> ATU op 4000, fid 0001
> (...)
> [ 61.826293] mv88e6085 mdio_mux-0.1:00: Timeout while waiting
> for switch, addr 1c reg 18, mask 8000, val 0000, data 9860
> [ 61.837560] mv88e6085 mdio_mux-0.1:00: Timeout waiting
> for PHY command 1860 to complete
>
> The reason is probably not the commands: I think those are
> mostly fine with the 50+50ms timeout, but the problem
> appears when OpenWrt brings up several interfaces in
> parallel on a system with 7 populated ports: if one of
> them take more than 50 ms and waits one or more of the
> others can get stuck on the mutex for the switch and then
> this can easily multiply.
>
> As we sleep and wait, the function loop needs a final
> check after exiting the loop if we were successful.
>
> Suggested-by: Andrew Lunn <andrew@...n.ch>
> Cc: Tobias Waldekranz <tobias@...dekranz.com>
> Fixes: 35da1dfd9484 ("net: dsa: mv88e6xxx: Improve performance of busy bit polling")
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
Hi Linus
Thanks for the new version.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists