summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Fischer <mdf@kernel.org>2019-02-07 00:45:29 -0500
committerDavid S. Miller <davem@davemloft.net>2019-02-07 12:49:49 -0500
commit8f289805616e81f7c1690931aa8a586c76f4fa88 (patch)
tree54c3ccccc095440563cb34e9b87c2b02251e574c
parent22087d659212d2401f4caa602fd57160ff1e6222 (diff)
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 <andrew@lunn.ch> Signed-off-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/phy/fixed_phy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index f136a23c1a35..d810f914aaa4 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -85,11 +85,11 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
85 s = read_seqcount_begin(&fp->seqcount); 85 s = read_seqcount_begin(&fp->seqcount);
86 fp->status.link = !fp->no_carrier; 86 fp->status.link = !fp->no_carrier;
87 /* Issue callback if user registered it. */ 87 /* Issue callback if user registered it. */
88 if (fp->link_update) { 88 if (fp->link_update)
89 fp->link_update(fp->phydev->attached_dev, 89 fp->link_update(fp->phydev->attached_dev,
90 &fp->status); 90 &fp->status);
91 fixed_phy_update(fp); 91 /* Check the GPIO for change in status */
92 } 92 fixed_phy_update(fp);
93 state = fp->status; 93 state = fp->status;
94 } while (read_seqcount_retry(&fp->seqcount, s)); 94 } while (read_seqcount_retry(&fp->seqcount, s));
95 95