diff options
| author | Oleksij Rempel <[email protected]> | 2022-08-26 10:56:21 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-08-31 08:41:19 +0000 |
| commit | 8f420456792308639fcbc15462050c521fbd127d (patch) | |
| tree | f824bb507b55f8856bf91891749c642188250c5b /drivers/net/dsa/microchip/lan937x_main.c | |
| parent | net: dsa: microchip: don't announce extended register support on non Gbit chips (diff) | |
| download | kernel-8f420456792308639fcbc15462050c521fbd127d.tar.gz kernel-8f420456792308639fcbc15462050c521fbd127d.zip | |
net: dsa: microchip: allow to pass return values for PHY read/write accesses
PHY access may end with errors on different levels. So, allow to forward
return values where possible.
Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/lan937x_main.c')
| -rw-r--r-- | drivers/net/dsa/microchip/lan937x_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c index daedd2bf20c1..7b464f1fb5d8 100644 --- a/drivers/net/dsa/microchip/lan937x_main.c +++ b/drivers/net/dsa/microchip/lan937x_main.c @@ -128,14 +128,14 @@ static int lan937x_internal_phy_read(struct ksz_device *dev, int addr, int reg, return ksz_read16(dev, REG_VPHY_IND_DATA__2, val); } -void lan937x_r_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 *data) +int lan937x_r_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 *data) { - lan937x_internal_phy_read(dev, addr, reg, data); + return lan937x_internal_phy_read(dev, addr, reg, data); } -void lan937x_w_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 val) +int lan937x_w_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 val) { - lan937x_internal_phy_write(dev, addr, reg, val); + return lan937x_internal_phy_write(dev, addr, reg, val); } static int lan937x_sw_mdio_read(struct mii_bus *bus, int addr, int regnum) |
