Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f289805 authored by Moritz Fischer's avatar Moritz Fischer Committed by David S. Miller
Browse files

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: a5597008 ("phy: fixed_phy: Add gpio to determine link up/down.")
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22087d65
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);
				/* Check the GPIO for change in status */
				fixed_phy_update(fp);
				}
				state = fp->status;
			} while (read_seqcount_retry(&fp->seqcount, s));