• Robert Hancock's avatar
    net: axienet: Fix MDIO bus parent node detection · 3b09a3fb
    Robert Hancock authored
    This driver was previously using the parent node of the specified PHY
    node as the device node to register the MDIO bus on. Andrew Lunn
    pointed out this is wrong as the PHY node is potentially not even
    underneath the MDIO bus for the current device instance. Find the MDIO
    node explicitly by looking it up by name under the controller's device
    node instead.
    
    This could potentially break existing device trees if they don't use
    "mdio" as the name for the MDIO bus, but I did not find any with various
    searches and Xilinx's examples all use mdio as the name so it seems like
    this should be relatively safe.
    Signed-off-by: default avatarRobert Hancock <hancock@sedsystems.ca>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3b09a3fb
xilinx_axienet_mdio.c 6.91 KB