lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 26 Jun 2022 10:58:24 +0200 From: Andrew Lunn <andrew@...n.ch> To: Lukas Wunner <lukas@...ner.de> Cc: Oleksij Rempel <o.rempel@...gutronix.de>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, kernel@...gutronix.de, linux-kernel@...r.kernel.org, netdev@...r.kernel.org Subject: Re: [PATCH net-next v1 1/1] net: phy: ax88772a: fix lost pause advertisement configuration On Sat, Jun 25, 2022 at 09:17:31AM +0200, Lukas Wunner wrote: > On Fri, Jun 24, 2022 at 09:55:58AM +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 to save and restore all needed configuration registers. > [...] > > 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) > > + if (phydev->state == PHY_NOLINK && phydev->drv->soft_reset) { > > + struct asix_context context; > > + > > + asix_context_save(phydev, &context); > > + > > phydev->drv->soft_reset(phydev); > > + > > + asix_context_restore(phydev, &context); > > + } > > } > > Hm, how about just calling phy_init_hw()? That will perform a > ->soft_reset() and also restore the configuration, including > interrupts (which the above does not, but I guess that's > irrelevant as long as the driver uses polling). > > Does phy_init_hw() do too much or too little compared to the above > and is hence not a viable solution? at803x.c has: /* After changing the smart speed settings, we need to perform a * software reset, use phy_init_hw() to make sure we set the * reapply any values which might got lost during software reset. */ if (ret == 1) ret = phy_init_hw(phydev); Andrew
Powered by blists - more mailing lists