Skip to content

Commit

Permalink
net: phy: ax88772a: fix lost pause advertisement configuration
Browse files Browse the repository at this point in the history
commit fa152f6 upstream.

In case of asix_ax88772a_link_change_notify() workaround, we run soft
reset which will automatically clear MII_ADVERTISE configuration. The
PHYlib framework do not know about changed configuration state of the
PHY, so we need use phy_init_hw() to reinit PHY configuration.

Fixes: dde2584 ("net: usb/phy: asix: add support for ax88772A/C PHYs")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220628114349.3929928-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
olerem authored and Sasha Levin committed Jul 4, 2022
1 parent 60c1da8 commit 997b991
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/phy/ax88796b.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ static void asix_ax88772a_link_change_notify(struct phy_device *phydev)
/* Reset PHY, otherwise MII_LPA will provide outdated information.
* This issue is reproducible only with some link partner PHYs
*/
if (phydev->state == PHY_NOLINK && phydev->drv->soft_reset)
phydev->drv->soft_reset(phydev);
if (phydev->state == PHY_NOLINK) {
phy_init_hw(phydev);
phy_start_aneg(phydev);
}
}

static struct phy_driver asix_driver[] = {
Expand Down

0 comments on commit 997b991

Please sign in to comment.