提交 cf18b778 编写于 作者: J Jérôme Pouiller 提交者: David S. Miller

net: phy: reset only targeted phy

It is possible to address another chip on same MDIO bus. The case is
correctly handled for media advertising. It is taken into account
only if mii_data->phy_id == phydev->addr. However, this condition
was missing for reset case.
Signed-off-by: NJérôme Pouiller <jezz@sysmic.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c5ba5c8a
无相关合并请求
......@@ -448,7 +448,8 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
mdiobus_write(phydev->bus, mii_data->phy_id,
mii_data->reg_num, val);
if (mii_data->reg_num == MII_BMCR &&
if (mii_data->phy_id == phydev->addr &&
mii_data->reg_num == MII_BMCR &&
val & BMCR_RESET)
return phy_init_hw(phydev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部