summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller2016-12-16 19:29:42 +0100
committerDavid S. Miller2016-12-16 19:29:42 +0100
commitea7a2b9ac853d8c3afd929952ad4b3cb65ba329c (patch)
tree4be808deee2e6c332c049996ba73b8e1225cd484
parentnet: dsa: mv88e6xxx: Fix opps when adding vlan bridge (diff)
parentnet: ethernet: hip04: Call SET_NETDEV_DEV() (diff)
downloadkernel-qcow2-linux-ea7a2b9ac853d8c3afd929952ad4b3cb65ba329c.tar.gz
kernel-qcow2-linux-ea7a2b9ac853d8c3afd929952ad4b3cb65ba329c.tar.xz
kernel-qcow2-linux-ea7a2b9ac853d8c3afd929952ad4b3cb65ba329c.zip
Merge branch 'hisilicon-netdev-dev'
Dongpo Li says: ==================== net: ethernet: hisilicon: set dev->dev.parent before PHY connect This patch series builds atop: ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461 ("phy: Don't increment MDIO bus refcount unless it's a different owner") I have checked all the hisilicon ethernet driver and found only two drivers need to be fixed to make sure set dev->dev.parent before PHY connect. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/hisilicon/hip04_eth.c2
-rw-r--r--drivers/net/ethernet/hisilicon/hisi_femac.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index 854befde0a08..97b184774784 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -828,6 +828,7 @@ static int hip04_mac_probe(struct platform_device *pdev)
priv = netdev_priv(ndev);
priv->ndev = ndev;
platform_set_drvdata(pdev, ndev);
+ SET_NETDEV_DEV(ndev, &pdev->dev);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap_resource(d, res);
@@ -903,7 +904,6 @@ static int hip04_mac_probe(struct platform_device *pdev)
ndev->priv_flags |= IFF_UNICAST_FLT;
ndev->irq = irq;
netif_napi_add(ndev, &priv->napi, hip04_rx_poll, NAPI_POLL_WEIGHT);
- SET_NETDEV_DEV(ndev, &pdev->dev);
hip04_reset_ppe(priv);
if (priv->phy_mode == PHY_INTERFACE_MODE_MII)
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)
return -ENOMEM;
platform_set_drvdata(pdev, ndev);
+ SET_NETDEV_DEV(ndev, &pdev->dev);
priv = netdev_priv(ndev);
priv->dev = dev;
@@ -882,7 +883,6 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
ndev->netdev_ops = &hisi_femac_netdev_ops;
ndev->ethtool_ops = &hisi_femac_ethtools_ops;
netif_napi_add(ndev, &priv->napi, hisi_femac_poll, FEMAC_POLL_WEIGHT);
- SET_NETDEV_DEV(ndev, &pdev->dev);
hisi_femac_port_init(priv);