Skip to content

Commit 4e7a801

Browse files
claudiubezneanoglitch
authored andcommitted
net: macb: do not initialize mac_managed_pm on fixed link
In case of KSZ switch available on SAMA5D2 ICP some of SPI transfers fails. This leaves the phy state machine in error state leading to switch being unused after resume. By removing mac_managed_pm for fixed links we rely on mdio_bus_phy_resume() being called later which seems to work. This is only a temporary fix. Proper fix will need to be done either on SPI or KSZ driver. This behavior was also present in previous releases. A fixes tag hasn't been added as there no source identified at the moment to blame. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 5e9df83 commit 4e7a801

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,8 @@ static int macb_mii_probe(struct net_device *dev)
868868

869869
bp->phylink_config.dev = &dev->dev;
870870
bp->phylink_config.type = PHYLINK_NETDEV;
871-
bp->phylink_config.mac_managed_pm = true;
871+
if (!of_phy_is_fixed_link(bp->pdev->dev.of_node))
872+
bp->phylink_config.mac_managed_pm = true;
872873

873874
if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
874875
bp->phylink_config.poll_fixed_state = true;

0 commit comments

Comments
 (0)