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: <CA+h21hpPyk=BYxBXDH5-SGfJdS-E+X9PfZHAMLYNwhL-1stumA@mail.gmail.com>
Date:   Thu, 23 May 2019 23:01:26 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Ioana Ciornei <ioana.ciornei@....com>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "maxime.chevallier@...tlin.com" <maxime.chevallier@...tlin.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [RFC PATCH net-next 8/9] net: dsa: Use PHYLINK for the CPU/DSA ports

On Thu, 23 May 2019 at 05:17, Florian Fainelli <f.fainelli@...il.com> wrote:
>
> On 5/22/2019 6:20 PM, Ioana Ciornei wrote:
> > This completely removes the usage of PHYLIB from DSA, namely for the
> > aforementioned switch ports which used to drive a software PHY manually
> > using genphy operations.
> >
> > For these ports, the newly introduced phylink_create_raw API must be
> > used, and the callbacks are received through a notifier block registered
> > per dsa_port, but otherwise the implementation is fairly
> > straightforward, and the handling of the regular vs raw PHYLINK
> > instances is common from the perspective of the driver.
> >
> > What changes for drivers:
> >
> > The .adjust_link callback is no longer called for the fixed-link CPU/DSA
> > ports and drivers must migrate to standard PHYLINK operations (e.g.
> > .phylink_mac_config).  The reason why we can't do anything for them is
> > because PHYLINK does not wrap the fixed link state behind a phydev
> > object, so we cannot wrap .phylink_mac_config into .adjust_link unless
> > we fabricate a phy_device structure.
>
> Can't we offer a slightly nicer transition period for DSA switch drivers:
>
> - if adjust_link and phylink_mac_ops are both supported, prefer
> phylink_mac_ops
> - if phylink_mac_ops is defined alone use it, we're good
> - if adjust_link alone is defined, keep using it with the existing code
> but print a warning inviting to migrate?
>
> The changes look fine but the transition path needs to be a little more
> gentle IMHO.
> --
> Florian

Hi Florian,

Yes we could, but since most of the adjust_link -> phylink_mac_ops
changes appear trivial, and we have the knowledge behind b53 right
here, can't we just migrate everything in the next patchset and remove
adjust_link altogether from DSA?
...So why does b53 configure the SGMII SerDes in phylink_mac_config,
and RGMII delays for the CPU port in adjust_link? Why are pause frames
only configured for the CPU port?
A migration from my side would be rather mechanical, so could you
please share some suggestions?

-Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ