net: renesas: rswitch: align mdio C45 operations with datasheet
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Mon, 16 Dec 2024 07:19:55 +0000 (12:19 +0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Dec 2024 03:32:05 +0000 (19:32 -0800)
commit1ced1b8cacf396d6ff979f594ba40ace42087797
treee330839e79a8161d544e7fa9520fd12a243cd98e
parentda75ba93e3383fc10af71e5029b5a57378a57576
net: renesas: rswitch: align mdio C45 operations with datasheet

Per rswitch datasheet, software can know that mdio operation completed
either by polling MPSM.PSME bit, or via interrupt.

Instead, the driver currently polls for interrupt status bit. Although
this still provides correct result, it requires additional register
operations to clean the interrupt status bits, and generally looks wrong.

Fix it to poll MPSM.PSME bit, as the datasheet suggests.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://patch.msgid.link/20241216071957.2587354-4-nikita.yoush@cogentembedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h