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]
Message-ID: <Y+7Y7Ei7PXYXipLP@colin-ia-desktop>
Date:   Thu, 16 Feb 2023 17:31:24 -0800
From:   Colin Foster <colin.foster@...advantage.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     linux-phy@...ts.infradead.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Kishon Vijay Abraham I <kishon@...nel.org>,
        Vinod Koul <vkoul@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>, UNGLinuxDriver@...rochip.com,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Lee Jones <lee@...nel.org>
Subject: Re: [RFC v1 net-next 7/7] net: dsa: ocelot_ext: add support for
 external phys

On Thu, Feb 16, 2023 at 11:17:48AM +0000, Russell King (Oracle) wrote:
> Hi Colin,
> 
> On Wed, Feb 15, 2023 at 11:53:21PM -0800, Colin Foster wrote:
> > +static const struct phylink_mac_ops ocelot_ext_phylink_ops = {
> > +	.validate		= phylink_generic_validate,
> 
> There is no need to set this anymore.

I'll remove. Thanks.

> > +static int ocelot_ext_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
> > +				 phy_interface_t interface,
> > +				 const unsigned long *advertising,
> > +				 bool permit_pause_to_mac)
> > +{
> > +	struct ocelot_ext_port_priv *port_priv =
> > +		phylink_pcs_to_ocelot_port(pcs);
> > +
> > +	switch (interface) {
> > +	case PHY_INTERFACE_MODE_QSGMII:
> > +		ocelot_ext_phylink_mac_config(&port_priv->phylink_config, mode,
> > +					      NULL);
> 
> Why are you calling a "mac" operation from a "pcs" operation? If this
> PCS is attached to the same phylink instance as the MAC, you'll get
> the .mac_config method called along with the .pcs_config, so calling
> one from the other really isn't necessary.

Per the other email, it was my misunderstanding - probably from the
unnecessary phylink_create(). V2 will be cleaned up.

...

> > +
> > +	phylink = phylink_create(&ocelot_ext_port_priv->phylink_config,
> > +				 of_fwnode_handle(portnp),
> > +				 phy_mode, &ocelot_ext_phylink_ops);
> 
> I'm confused. DSA already sets up a phylink instance per port, so why
> do you need another one?

Also in the other email, it is definitely my confusion. I'll get things
straighened out for V2, as these patches seem more complicated than they
need to be.


Thanks again!

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ