]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: avoid clearing PHY interrupts twice in irq handler
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 1 Mar 2020 20:36:09 +0000 (21:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2020 03:04:19 +0000 (19:04 -0800)
commit2990ea29ced152776de4c819e9ef2932db7e6dba
treea26daf322f9ba04fe8052c00fca022b1cdf1a650
parent6ffa4ff4fad0a66e826dea72ddeca6340de3b0fd
net: phy: avoid clearing PHY interrupts twice in irq handler

On all PHY drivers that implement did_interrupt() reading the interrupt
status bits clears them. This means we may loose an interrupt that
is triggered between calling did_interrupt() and phy_clear_interrupt().
As part of the fix make it a requirement that did_interrupt() clears
the interrupt.

The Fixes tag refers to the first commit where the patch applies
cleanly.

Fixes: f818b3d02fc5 ("net: phy: add callback for custom interrupt handler to struct phy_driver")
Reported-by: Michael Walle <michael@walle.cc>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
include/linux/phy.h