net: dsa: microchip: improving error handling for 8-bit register RMW operations
authorOleksij Rempel <o.rempel@pengutronix.de>
Fri, 26 May 2023 07:34:41 +0000 (09:34 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 May 2023 07:48:17 +0000 (09:48 +0200)
commit2f0d579956e87a67c43e225c85488ff7a13bc3b8
tree1222c4c7651ff519160f6d40af3c666fdbb11b3b
parenteee2e03c8ffe3a4e27cc49762931c5d31cd481af
net: dsa: microchip: improving error handling for 8-bit register RMW operations

This patch refines the error handling mechanism for 8-bit register
read-modify-write operations. In case of a failure, it now logs an error
message detailing the problematic offset. This enhancement aids in
debugging by providing more precise information when these operations
encounter issues.

Furthermore, the ksz_prmw8() function has been updated to return error
values rather than void, enabling calling functions to appropriately
respond to errors.

Additionally, in case of an error that affects both the current and
future accesses, the PHY driver will log the errors consistently, akin
to the existing behavior in all ksz_read*/ksz_write* helpers.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/microchip/ksz_common.h