]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: stmmac: platform: Fix MDIO init for platforms without PHY
authorPadmanabhan Rajanbabu <p.rajanbabu@samsung.com>
Thu, 19 Dec 2019 10:17:01 +0000 (15:47 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:27:51 +0000 (21:27 -0800)
The current implementation of "stmmac_dt_phy" function initializes
the MDIO platform bus data, even in the absence of PHY. This fix
will skip MDIO initialization if there is no PHY present.

Fixes: 7437127 ("net: stmmac: Convert to phylink and remove phylib logic")
Acked-by: Jayati Sahu <jayati.sahu@samsung.com>
Signed-off-by: Sriram Dash <sriram.dash@samsung.com>
Signed-off-by: Padmanabhan Rajanbabu <p.rajanbabu@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index bedaff0c13bded337997b21b87d076104f16de49..cc8d7e7bf9acc88d6b9c53dfe2c9b750b639a1bf 100644 (file)
@@ -320,7 +320,7 @@ out:
 static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
                         struct device_node *np, struct device *dev)
 {
-       bool mdio = true;
+       bool mdio = false;
        static const struct of_device_id need_mdio_ids[] = {
                { .compatible = "snps,dwc-qos-ethernet-4.10" },
                {},