提交 cd40cb1f 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

net: lan78xx: Ack pending PHY ints when resetting

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ
status. In doing so it potentially leaves the PHY with a pending
interrupt that will never be acknowledged, at which point no further
interrupts will be generated.

Avoid the problem by acknowledging any pending PHY interrupt after
clearing the MAC's status bit.

See: https://github.com/raspberrypi/linux/issues/2937Signed-off-by: NPhil Elwell <phil@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 83368599
......@@ -1181,6 +1181,9 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
if (unlikely(ret < 0))
return -EIO;
/* Acknowledge any pending PHY interrupt, lest it be the last */
phy_read(phydev, LAN88XX_INT_STS);
phy_read_status(phydev);
if (!phydev->link && dev->link_on) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册