On Thu, 23 May 2019 at 05:17, Florian Fainelli <f.faine...@gmail.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