net: phy: fixed_phy: Fix fixed_phy not checking GPIO
Subsystems (3)
PATCH v2 1/1 net: phy: fixed_phy: Fix fixed_phy not checking GPIO
Fix fixed_phy not checking GPIO if no link_update callback is registered.
In the original version all users registered a link_update callback so the issue was masked.
Fixes a5597008dbc2 ("phy: fixed_phy: Add gpio to determine link up/down.")
Reviewed-by Andrew Lunn <[email protected]>
Signed-off-by Moritz Fischer <[email protected]>
---
Changes from v1:
- Added Andrew's Reviewed-by: tag
- Added Fixes: tag (Thanks for digging, Andrew!)
--- drivers/net/phy/fixed_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/fixed_phy.c +3 -3
@@ -85,11 +85,11 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) s =read_seqcount_begin (&fp->seqcount); fp->status.link = !fp->no_carrier;/* Issue callback if user registered it. */ -if (fp->link_update) { +if (fp->link_update) fp->link_update (fp->phydev->attached_dev, &fp->status); -fixed_phy_update (fp); - } +/* Check the GPIO for change in status */ +fixed_phy_update (fp); state = fp->status; }while (read_seqcount_retry (&fp->seqcount, s));
Signature · 1 line
2.20.1
From: Moritz Fischer <[email protected]>
Date: Wed, 6 Feb 2019 21:45:29 -0800
Quoted 9 lines
Fix
fixed_phynot checking GPIO if nolink_updatecallback is registered.In the original version all users registered a
link_updatecallback so the issue was masked.Fixes a5597008dbc2 ("phy: fixed_phy: Add gpio to determine link up/down.")Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Moritz Fischer <[email protected]>
Applied, thank you.