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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 14:12:37 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Realtek linux nic maintainers <nic_swsd@...ltek.com>,
	Jakub Kicinski <kuba@...nel.org>,
	David Miller <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH RESUBMIT net-next] r8169: simplify EEE handling

On Fri, Feb 02, 2024 at 07:55:38AM +0100, Heiner Kallweit wrote:
> On 02.02.2024 01:16, Andrew Lunn wrote:
> >> @@ -5058,7 +5033,9 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
> >>  	}
> >>  
> >>  	tp->phydev->mac_managed_pm = true;
> >> -
> >> +	if (rtl_supports_eee(tp))
> >> +		linkmode_copy(tp->phydev->advertising_eee,
> >> +			      tp->phydev->supported_eee);
> > 
> > This looks odd. Does it mean something is missing on phylib?
> > 
> Reason is that we treat "normal" advertising and EEE advertising differently
> in phylib. See this code snippet from phy_probe().
> 
>         phy_advertise_supported(phydev);
>         /* Get PHY default EEE advertising modes and handle them as potentially
>          * safe initial configuration.
>          */
>         err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
> 
> For EEE we don't change the initial advertising to what's supported,
> but preserve the EEE advertising at the time of phy probing.
> So if I want to mimic the behavior of phy_advertise_supported() for EEE,
> I have to populate advertising_eee in the driver.

So the device you are using is advertising less than what it supports?

> Alternative would be to change phy_advertise_supported(), but this may
> impact systems with PHY's with EEE flaws.

If i remember correctly, there was some worry enabling EEE by default
could upset some low latency use cases, PTP accuracy etc. So lets
leave it as it is. Maybe a helper would be useful
phy_advertise_eee_all() with a comment about why it could be used.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ