mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net: phy: fixed_phy: Fix fixed_phy not checking GPIO
[ Upstream commit8f28980561] 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:a5597008db("phy: fixed_phy: Add gpio to determine link up/down.") Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0cef474e23
commit
57738dd270
@@ -67,11 +67,11 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
|
||||
do {
|
||||
s = read_seqcount_begin(&fp->seqcount);
|
||||
/* 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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user