All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
@ 2022-06-26 15:27 Oleksij Rempel
  2022-06-26 16:54 ` Andrew Lunn
  2022-06-28  5:17 ` Jakub Kicinski
  0 siblings, 2 replies; 5+ messages in thread
From: Oleksij Rempel @ 2022-06-26 15:27 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Oleksij Rempel, kernel, linux-kernel, netdev, Lukas Wunner

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: dde258469257 ("net: usb/phy: asix: add support for ax88772A/C PHYs")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/phy/ax88796b.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/ax88796b.c b/drivers/net/phy/ax88796b.c
index 457896337505..0f1e617a26c9 100644
--- a/drivers/net/phy/ax88796b.c
+++ b/drivers/net/phy/ax88796b.c
@@ -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[] = {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
  2022-06-26 15:27 [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration Oleksij Rempel
@ 2022-06-26 16:54 ` Andrew Lunn
  2022-06-28  5:17 ` Jakub Kicinski
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2022-06-26 16:54 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Heiner Kallweit, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, kernel, linux-kernel, netdev, Lukas Wunner

On Sun, Jun 26, 2022 at 05:27:03PM +0200, Oleksij Rempel wrote:
> 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: dde258469257 ("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>

    Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
  2022-06-26 15:27 [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration Oleksij Rempel
  2022-06-26 16:54 ` Andrew Lunn
@ 2022-06-28  5:17 ` Jakub Kicinski
  2022-06-28  6:43   ` Oleksij Rempel
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2022-06-28  5:17 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
	Paolo Abeni, kernel, linux-kernel, netdev, Lukas Wunner

On Sun, 26 Jun 2022 17:27:03 +0200 Oleksij Rempel wrote:
> Subject: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
> 
> 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: dde258469257 ("net: usb/phy: asix: add support for ax88772A/C PHYs")

Why net-next?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
  2022-06-28  5:17 ` Jakub Kicinski
@ 2022-06-28  6:43   ` Oleksij Rempel
  2022-06-28 11:22     ` Paolo Abeni
  0 siblings, 1 reply; 5+ messages in thread
From: Oleksij Rempel @ 2022-06-28  6:43 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
	Paolo Abeni, kernel, linux-kernel, netdev, Lukas Wunner

On Mon, Jun 27, 2022 at 10:17:05PM -0700, Jakub Kicinski wrote:
> On Sun, 26 Jun 2022 17:27:03 +0200 Oleksij Rempel wrote:
> > Subject: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
> > 
> > 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: dde258469257 ("net: usb/phy: asix: add support for ax88772A/C PHYs")
> 
> Why net-next?

It is old bug but it will be notable only after this patch:
https://lore.kernel.org/all/20220624080208.3143093-1-o.rempel@pengutronix.de/

Should I resend it to net?

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
  2022-06-28  6:43   ` Oleksij Rempel
@ 2022-06-28 11:22     ` Paolo Abeni
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2022-06-28 11:22 UTC (permalink / raw)
  To: Oleksij Rempel, Jakub Kicinski
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
	kernel, linux-kernel, netdev, Lukas Wunner

On Tue, 2022-06-28 at 08:43 +0200, Oleksij Rempel wrote:
> On Mon, Jun 27, 2022 at 10:17:05PM -0700, Jakub Kicinski wrote:
> > On Sun, 26 Jun 2022 17:27:03 +0200 Oleksij Rempel wrote:
> > > Subject: [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration
> > > 
> > > 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: dde258469257 ("net: usb/phy: asix: add support for ax88772A/C PHYs")
> > 
> > Why net-next?
> 
> It is old bug but it will be notable only after this patch:
> https://lore.kernel.org/all/20220624080208.3143093-1-o.rempel@pengutronix.de/
> 
> Should I resend it to net?

It depends ;) is the fix functionally depending on the above patch? If
yes, please update the commit message including such info (and the fix
will go via net-next).

If instead this patch is correct even regarless of
89183b6ea8dd39771d92e99723f6cf60b5670dad, I *think* it should go via -
net.

Thanks!

Paolo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-28 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26 15:27 [PATCH net-next v2 1/1] net: phy: ax88772a: fix lost pause advertisement configuration Oleksij Rempel
2022-06-26 16:54 ` Andrew Lunn
2022-06-28  5:17 ` Jakub Kicinski
2022-06-28  6:43   ` Oleksij Rempel
2022-06-28 11:22     ` Paolo Abeni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.