Re: [PATCH 2/2] net: phy: Provide Module 4 KSZ9477 errata (DS80000754C)
From: Oleksij Rempel
Date: Wed Aug 30 2023 - 15:30:51 EST
On Wed, Aug 30, 2023 at 01:51:51PM +0200, Lukasz Majewski wrote:
> Hi Oleksij,
> It looks like the most optimal solution would be the one proposed by
> Tristam:
> https://www.spinics.net/lists/netdev/msg932044.html
In this case, please add the reason why it would work on this HW and
will not break by any changes in PHYlib or micrel.c driver.
If I remember it correctly, in KSZ9477 variants, if you write to EEE
advertisement register, it will affect the state of a EEE capability
register. Which break IEEE 802.3 specification and the reason why
ksz9477_get_features() actually exist. But can be used as workaround if
it is written early enough before PHYlib tried to read EEE capability
register.
Please confirm my assumption by applying your workaround and testing it
with ethtool --show-eee lanX.
It should be commented in the code with all kind of warnings:
Don't move!!! We use one bug to workaround another bug!!! If PHYlib
start scanning PHYs before this code is executed, then thing may break!!
... it is broken as hell....
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |