提交 197b5212 编写于 作者: F Florian Fainelli 提交者: Xie XiuQi

net: bcmgenet: Set phydev->dev_flags only for internal PHYs

[ Upstream commit 92696286f3bb37ba50e4bd8d1beb24afb759a799 ]

phydev->dev_flags is entirely dependent on the PHY device driver which
is going to be used, setting the internal GENET PHY revision in those
bits only makes sense when drivers/net/phy/bcm7xxx.c is the PHY driver
being used.

Fixes: 487320c5 ("net: bcmgenet: communicate integrated PHY revision to PHY driver")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: NDoug Berger <opendmb@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d0d2e8bd
...@@ -280,11 +280,12 @@ int bcmgenet_mii_probe(struct net_device *dev) ...@@ -280,11 +280,12 @@ int bcmgenet_mii_probe(struct net_device *dev)
struct bcmgenet_priv *priv = netdev_priv(dev); struct bcmgenet_priv *priv = netdev_priv(dev);
struct device_node *dn = priv->pdev->dev.of_node; struct device_node *dn = priv->pdev->dev.of_node;
struct phy_device *phydev; struct phy_device *phydev;
u32 phy_flags; u32 phy_flags = 0;
int ret; int ret;
/* Communicate the integrated PHY revision */ /* Communicate the integrated PHY revision */
phy_flags = priv->gphy_rev; if (priv->internal_phy)
phy_flags = priv->gphy_rev;
/* Initialize link state variables that bcmgenet_mii_setup() uses */ /* Initialize link state variables that bcmgenet_mii_setup() uses */
priv->old_link = -1; priv->old_link = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册