]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: broadcom: add exp register access methods without buslock
authorMichael Walle <michael@walle.cc>
Wed, 13 May 2020 16:35:21 +0000 (18:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 19:52:38 +0000 (12:52 -0700)
commit3104799b03e562a0f720152cbadb2745fa2265cf
treeef950302dcf999699e9814aef661dd771b648df3
parent8b5d94d8a1ff558b934fdf061c9dfb79204fbcb8
net: phy: broadcom: add exp register access methods without buslock

Add helper to read and write expansion registers without taking the mdio
lock.

Please note, that this changes the semantics of the read and write.
Before there was no lock between selecting the expansion register and
the actual read/write. This may lead to access failures if there are
parallel accesses. Instead take the bus lock during the whole access
cycle.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/bcm-phy-lib.c
drivers/net/phy/bcm-phy-lib.h