[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190206181040.29539-1-mdf@kernel.org>
Date: Wed, 6 Feb 2019 10:10:40 -0800
From: Moritz Fischer <mdf@...nel.org>
To: netdev@...r.kernel.org
Cc: andrew@...n.ch, f.fainelli@...il.com, hkallweit1@...il.com,
davem@...emloft.net, Moritz Fischer <mdf@...nel.org>
Subject: [PATCH net-next] net: phy: fixed_phy: Fix fixed_phy not checking GPIO
Fix fixed_phy not checking GPIO if no link_update callback
is registered.
Signed-off-by: Moritz Fischer <mdf@...nel.org>
---
Hi all,
I've been trying to figure out where exactly this broke,
it must've been somewhere when the file was refactored
in connection with phylink?
Unfortunately I couldn't tell exactly so I don't have a
'Fixes' tag.
Should this also go be queued up for stable/5.0 if it is indeed
a bug?
Thanks,
Moritz
---
drivers/net/phy/fixed_phy.c | 6 +++---
1 file 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)
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));
--
2.20.1
Powered by blists - more mailing lists