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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Aug 2015 07:29:47 +0000
From:	Shaohui Xie <Shaohui.Xie@...escale.com>
To:	Florian Fainelli <f.fainelli@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [PATCH] net: phy: fix PHY_RUNNING in phy_state_machine

> -----Original Message-----
> From: Florian Fainelli [mailto:f.fainelli@...il.com]
> Sent: Saturday, August 15, 2015 1:02 AM
> To: shh.xie@...il.com; netdev@...r.kernel.org; davem@...emloft.net
> Cc: Xie Shaohui-B21989
> Subject: Re: [PATCH] net: phy: fix PHY_RUNNING in phy_state_machine
> 
> Le 08/13/15 21:23, shh.xie@...il.com a écrit :
> > From: Shaohui Xie <Shaohui.Xie@...escale.com>
> >
> > Currently, if phy state is PHY_RUNNING, we always register a CHANGE
> > when phy works in polling or interrupt ignored, this will make the
> > adjust_link being called even the phy link did Not changed.
> 
> Right, which is why most drivers do implement a caching scheme.
> 
> >
> > checking the phy link to make sure the link did changed before we
> > register a CHANGE, if link did not changed, we do nothing.
> 
> With your change we will end-up with virtually polling a PHY twice as fast as we
> used to with the RUNNING -> CHANGELINK -> RUNNING transition (current state
> transitions), 
[S.H] Yes. If the link did changed, we'll polling the PHY status twice with my change, 
but if the link did not changed, we'll only need polling the PHY status without 
calling adjust_link, for phy_state_machine works in polling mode at frequency of HZ,
many adjust_link can be saved.

> which is probably fine, but puts a bit more pressure on the (slow)
> MDIO bus since we end-up with two additional reads to latch the link status
> register.
[S.H] Yes, but adjust_link in most driver is more complex than reading PHY status.
And the link won't be changed very frequently.

> 
> PS: I would appreciate if you could CC me on future libphy submissions.
[S.H] OK. 
Thanks for reviewing!

Shaohui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ