aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-03-17 20:58:22 -0700
committerDavid S. Miller <davem@davemloft.net>2020-03-17 20:58:22 -0700
commit362d3d88809bbadc20856cf38d6a574099c8bc67 (patch)
treef644db3d63eed30670b1a79b2a25a6bcb63f5ded /include
parentMerge branch 'ethtool-consolidate-irq-coalescing-last-part' (diff)
parentnet: phy: mscc: consider interrupt source in interrupt handler (diff)
downloadwireguard-linux-362d3d88809bbadc20856cf38d6a574099c8bc67.tar.xz
wireguard-linux-362d3d88809bbadc20856cf38d6a574099c8bc67.zip
Merge branch 'net-phy-improve-phy_driver-callback-handle_interrupt'
Heiner Kallweit says: ==================== net: phy: improve phy_driver callback handle_interrupt did_interrupt() clears the interrupt, therefore handle_interrupt() can not check which event triggered the interrupt. To overcome this constraint and allow more flexibility for customer interrupt handlers, let's decouple handle_interrupt() from parts of the phylib interrupt handling. Custom interrupt handlers now have to implement the did_interrupt() functionality in handle_interrupt() if needed. Fortunately we have just one custom interrupt handler so far (in the mscc PHY driver), convert it to the changed API and make use of the benefits. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 6b872aed8ba6..cb5a2182ba6d 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -23,6 +23,7 @@
#include <linux/workqueue.h>
#include <linux/mod_devicetable.h>
#include <linux/u64_stats_sync.h>
+#include <linux/irqreturn.h>
#include <linux/atomic.h>
@@ -568,7 +569,7 @@ struct phy_driver {
int (*did_interrupt)(struct phy_device *phydev);
/* Override default interrupt handling */
- int (*handle_interrupt)(struct phy_device *phydev);
+ irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);