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>
This commit is contained in:

committed by
David S. Miller

parent
ea13d71887
commit
7d7e7bce76
@@ -27,6 +27,8 @@
|
||||
#define AFE_HPF_TRIM_OTHERS MISC_ADDR(0x3a, 0)
|
||||
|
||||
|
||||
int __bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
|
||||
int __bcm_phy_read_exp(struct phy_device *phydev, u16 reg);
|
||||
int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
|
||||
int bcm_phy_read_exp(struct phy_device *phydev, u16 reg);
|
||||
|
||||
|
Reference in New Issue
Block a user