[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZecEuIgttoeXkr7T@pengutronix.de>
Date: Tue, 5 Mar 2024 12:40:40 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: tobias.jakobi.compleo@...il.com
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: microchip: fix register write order in
ksz8_ind_write8()
On Mon, Mar 04, 2024 at 04:41:35PM +0100, tobias.jakobi.compleo@...il.com wrote:
> From: "Tobias Jakobi (Compleo)" <tobias.jakobi.compleo@...il.com>
>
> This bug was noticed while re-implementing parts of the kernel
> driver in userspace using spidev. The goal was to enable some
> of the errata workarounds that Microchip describes in their
> errata sheet [1].
>
> Both the errata sheet and the regular datasheet of e.g. the KSZ8795
> imply that you need to do this for indirect register accesses:
> - write a 16-bit value to a control register pair (this value
> consists of the indirect register table, and the offset inside
> the table)
> - either read or write an 8-bit value from the data storage
> register (indicated by REG_IND_BYTE in the kernel)
>
> The current implementation has the order swapped. It can be
> proven, by reading back some indirect register with known content
> (the EEE register modified in ksz8_handle_global_errata() is one of
> these), that this implementation does not work.
>
> Private discussion with Oleksij Rempel of Pengutronix has revealed
> that the workaround was apparantly never tested on actual hardware.
>
> [1] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/Errata/KSZ87xx-Errata-DS80000687C.pdf
>
> Signed-off-by: Tobias Jakobi (Compleo) <tobias.jakobi.compleo@...il.com>
The subject should have [PATCH net] for stable and Fixes tag:
Fixes: 7b6e6235b664 ("net: dsa: microchip: ksz8795: handle eee specif erratum")
Reviewed-by: Oleksij Rempel <o.rempel@...gutronix.de>
Thank you!
Regards,
Oleksij
--
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 |
Powered by blists - more mailing lists