• Ioana Ciornei's avatar
    net: dsa: Use PHYLINK for the CPU/DSA ports · 0e279218
    Ioana Ciornei authored
    For DSA switches that do not have an .adjust_link callback, aka those
    who transitioned totally to the PHYLINK-compliant API, use PHYLINK to
    drive the CPU/DSA ports.
    
    The PHYLIB usage and .adjust_link are kept but deprecated, and users are
    asked to transition from it.  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.
    
    For these ports, the newly introduced PHYLINK_DEV operation type is
    used and the dsa_switch device structure is passed to PHYLINK for
    printing purposes.  The handling of the PHYLINK_NETDEV and PHYLINK_DEV
    PHYLINK instances is common from the perspective of the driver.
    Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
    Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0e279218
port.c 16.9 KB