summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorDongpo Li <lidongpo@hisilicon.com>2016-12-12 07:03:42 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-16 13:29:35 -0500
commit2087d421a5a1af4883e3cf0afb93823b7e12132a (patch)
treef6dee8159b92677b3092e376e9008d7e4ab77644 /drivers/net/ethernet
parent66e2809dd324f0ab5e1f9d997b40d4d31a2e42b1 (diff)
net: ethernet: hisi_femac: Call SET_NETDEV_DEV()
The hisi_femac driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/hisilicon/hisi_femac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c
index 49863068c59e..979852d56f31 100644
--- a/drivers/net/ethernet/hisilicon/hisi_femac.c
+++ b/drivers/net/ethernet/hisilicon/hisi_femac.c
@@ -805,6 +805,7 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
805 return -ENOMEM; 805 return -ENOMEM;
806 806
807 platform_set_drvdata(pdev, ndev); 807 platform_set_drvdata(pdev, ndev);
808 SET_NETDEV_DEV(ndev, &pdev->dev);
808 809
809 priv = netdev_priv(ndev); 810 priv = netdev_priv(ndev);
810 priv->dev = dev; 811 priv->dev = dev;
@@ -882,7 +883,6 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
882 ndev->netdev_ops = &hisi_femac_netdev_ops; 883 ndev->netdev_ops = &hisi_femac_netdev_ops;
883 ndev->ethtool_ops = &hisi_femac_ethtools_ops; 884 ndev->ethtool_ops = &hisi_femac_ethtools_ops;
884 netif_napi_add(ndev, &priv->napi, hisi_femac_poll, FEMAC_POLL_WEIGHT); 885 netif_napi_add(ndev, &priv->napi, hisi_femac_poll, FEMAC_POLL_WEIGHT);
885 SET_NETDEV_DEV(ndev, &pdev->dev);
886 886
887 hisi_femac_port_init(priv); 887 hisi_femac_port_init(priv);
888 888