lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Aug 2023 23:11:20 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Heiner Kallweit <hkallweit1@...il.com>, 
	Russell King <linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Geert Uytterhoeven <geert+renesas@...der.be>, 
	Michael Walle <michael@...le.cc>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: mdio: mdio-bitbang: Fix C45 read/write protocol

On Wed, Aug 16, 2023 at 09:39:37PM +0200, Andrew Lunn wrote:
> On Wed, Aug 16, 2023 at 09:06:52PM +0300, Serge Semin wrote:
> > Based on the original code semantic in case of Clause 45 MDIO, the address
> > command is supposed to be followed by the command sending the MMD address,
> > not the CSR address. The commit 002dd3de097c ("net: mdio: mdio-bitbang:
> > Separate C22 and C45 transactions") has erroneously broken that. So most
> > likely due to an unfortunate variable name it switched the code to sending
> > the CSR address. In our case it caused the protocol malfunction so the
> > read operation always failed with the turnaround bit always been driven to
> > one by PHY instead of zero. Fix that by getting back the correct
> > behaviour: sending MMD address command right after the regular address
> > command.
> 

> I'm actually surprised we have not got more reports of me breaking
> MDIO with this patchset. I did test bit-banging, but only for C22.

Yeah, I was also surprised not to find any fixes or reports for more
than a half of year in the mailing list or in the commits log. I was
sitting on 6.4-rc1 when the problem was discovered. Seeing the problem
was easily reproducible I decided to get to the latest kernel before
get to debugging it. It didn't help. The problem remained in 6.5-rc4
too.

> 
> > Fixes: 002dd3de097c ("net: mdio: mdio-bitbang: Separate C22 and C45 transactions")
> > Signed-off-by: Serge Semin <fancer.lancer@...il.com>
> 
> Reviewed-by: Andrew Lunn <andrew@...n.ch>

Thanks.

-Serge(y)

> 
>     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ