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: Thu, 21 Sep 2023 14:39:56 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
Cc: Andrew Lunn <andrew@...n.ch>,
	Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
	David E Box <david.e.box@...ux.intel.com>,
	Hans de Goede <hdegoede@...hat.com>,
	Mark Gross <markgross@...nel.org>,
	Jose Abreu <Jose.Abreu@...opsys.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Marek BehĂșn <kabel@...nel.org>,
	Jean Delvare <jdelvare@...e.com>,
	Guenter Roeck <linux@...ck-us.net>,
	Giuseppe Cavallaro <peppe.cavallaro@...com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Richard Cochran <richardcochran@...il.com>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Jesper Dangaard Brouer <hawk@...nel.org>,
	John Fastabend <john.fastabend@...il.com>,
	Wong Vee Khee <veekhee@...le.com>,
	Jon Hunter <jonathanh@...dia.com>,
	Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Revanth Kumar Uppala <ruppala@...dia.com>,
	Shenwei Wang <shenwei.wang@....com>,
	Andrey Konovalov <andrey.konovalov@...aro.org>,
	Jochen Henneberg <jh@...neberg-systemdesign.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org,
	platform-driver-x86@...r.kernel.org, linux-hwmon@...r.kernel.org,
	bpf@...r.kernel.org, Voon Wei Feng <weifeng.voon@...el.com>,
	Tan Tee Min <tee.min.tan@...ux.intel.com>,
	Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
	Lai Peter Jun Ann <jun.ann.lai@...el.com>
Subject: Re: [PATCH net-next v2 0/5] TSN auto negotiation between 1G and 2.5G

On Thu, Sep 21, 2023 at 08:25:05PM +0800, Choong Yong Liang wrote:
> 
> 
> On 4/8/2023 8:04 pm, Andrew Lunn wrote:
> > On Fri, Aug 04, 2023 at 04:45:22PM +0800, Choong Yong Liang wrote:
> > > Intel platforms’ integrated Gigabit Ethernet controllers support
> > > 2.5Gbps mode statically using BIOS programming. In the current
> > > implementation, the BIOS menu provides an option to select between
> > > 10/100/1000Mbps and 2.5Gbps modes. Based on the selection, the BIOS
> > > programs the Phase Lock Loop (PLL) registers. The BIOS also read the
> > > TSN lane registers from Flexible I/O Adapter (FIA) block and provided
> > > 10/100/1000Mbps/2.5Gbps information to the stmmac driver. But
> > > auto-negotiation between 10/100/1000Mbps and 2.5Gbps is not allowed.
> > > The new proposal is to support auto-negotiation between 10/100/1000Mbps
> > > and 2.5Gbps . Auto-negotiation between 10, 100, 1000Mbps will use
> > > in-band auto negotiation. Auto-negotiation between 10/100/1000Mbps and
> > > 2.5Gbps will work as the following proposed flow, the stmmac driver reads
> > > the PHY link status registers then identifies the negotiated speed.
> > > Based on the speed stmmac driver will identify TSN lane registers from
> > > FIA then send IPC command to the Power Management controller (PMC)
> > > through PMC driver/API. PMC will act as a proxy to programs the
> > > PLL registers.
> > 
> > Have you considered using out of band for all link modes? You might
> > end up with a cleaner architecture, and not need any phylink/phylib
> > hacks.
> > 
> > 	Andrew
> Hi Andrew,
> 
> After conducting a comprehensive study, it seems that implementing
> out-of-band for all link modes might not be feasible. I may have missed some
> key aspects during my analysis.

You need to provide details of why you think it's not feasible, because
you're making those reading your message have to guess.

We _do_ have cases where this is already supported. The DM7052 SFP
module for example has a BCM84881 PHY on board that has no in-band
support, so always has to use out-of-band. This module supports 10G,
5G, 2.5G, 1G, 100M and 10M speeds. It switches its interface between
10G, 2500base-X and SGMII mode. It's been supported in Linux for a
while with MAC/PCS that implement phylink _correctly_.

I wouldn't call stmmac a proper phylink implementation, especially
when it comes to switching between different interfaces.

My attempt at starting to clean up the stmmac code was thwarted by
niggly review comments (over whether %u or %d should be used to print
a _signed integer_ that stmmac stupidly implicitly casts to an unsigned
integer. That lead me to decide that stmmac was beyond being cleaned
up, so I junked the large patch set of improvements that I had - along
with multiple issues that I had found in the driver.

Someone else needs to sort stmmac out, and I suspect that may be a
pre-requisit for your changes so that stmmac operates _correctly_ with
phylink.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ