diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-05-28 20:38:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-29 21:48:54 -0700 |
commit | af7cd0366ee994e8b35985d407261dc0ed9dfb4d (patch) | |
tree | b6b573939331f9c4bba2a181a3df63a7713f6e73 /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | 0e27921816ad99f78140e0c61ddf2bc515cc7e22 (diff) | |
download | linux-af7cd0366ee994e8b35985d407261dc0ed9dfb4d.tar.bz2 |
net: dsa: sja1105: Fix broken fixed-link interfaces on user ports
PHYLIB and PHYLINK handle fixed-link interfaces differently. PHYLIB
wraps them in a software PHY ("pseudo fixed link") phydev construct such
that .adjust_link driver callbacks see an unified API. Whereas PHYLINK
simply creates a phylink_link_state structure and passes it to
.mac_config.
At the time the driver was introduced, DSA was using PHYLIB for the
CPU/cascade ports (the ones with no net devices) and PHYLINK for
everything else.
As explained below:
commit aab9c4067d2389d0adfc9c53806437df7b0fe3d5
Author: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu May 10 13:17:36 2018 -0700
net: dsa: Plug in PHYLINK support
Drivers that utilize fixed links for user-facing ports (e.g: bcm_sf2)
will need to implement phylink_mac_ops from now on to preserve
functionality, since PHYLINK *does not* create a phy_device instance
for fixed links.
In the above patch, DSA guards the .phylink_mac_config callback against
a NULL phydev pointer. Therefore, .adjust_link is not called in case of
a fixed-link user port.
This patch fixes the situation by converting the driver from using
.adjust_link to .phylink_mac_config. This can be done now in a unified
fashion for both slave and CPU/cascade ports because DSA now uses
PHYLINK for all ports.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
0 files changed, 0 insertions, 0 deletions