diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-05-19 18:53:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-20 17:13:08 -0400 |
commit | 5ea94e7686a3aa04cc0d01a2d8bd3d0292b3f592 (patch) | |
tree | c698dd2f66fc211a06deab14696ed7d998616b0f /include/linux/phy.h | |
parent | 2c7b49212a86f13697281a4dace2cb96aec71d6b (diff) |
phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT
There is currently no way for an Ethernet MAC driver servicing PHY link
interrupts to notify this to the PHY state machine without defining its
own state machine. Since most drivers are not so special, introduce a
helper: phy_mac_interrupt() which can be called from a link up/down
interrupt routine to update the PHY state machine. To avoid code
duplication some refactoring has been done to expose the workqueue and
its corresponding callback internally.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 8e4bc8ab692d..fdfa11542974 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -557,6 +557,8 @@ void phy_drivers_unregister(struct phy_driver *drv, int n); | |||
557 | int phy_driver_register(struct phy_driver *new_driver); | 557 | int phy_driver_register(struct phy_driver *new_driver); |
558 | int phy_drivers_register(struct phy_driver *new_driver, int n); | 558 | int phy_drivers_register(struct phy_driver *new_driver, int n); |
559 | void phy_state_machine(struct work_struct *work); | 559 | void phy_state_machine(struct work_struct *work); |
560 | void phy_change(struct work_struct *work); | ||
561 | void phy_mac_interrupt(struct phy_device *phydev, int new_link); | ||
560 | void phy_start_machine(struct phy_device *phydev, | 562 | void phy_start_machine(struct phy_device *phydev, |
561 | void (*handler)(struct net_device *)); | 563 | void (*handler)(struct net_device *)); |
562 | void phy_stop_machine(struct phy_device *phydev); | 564 | void phy_stop_machine(struct phy_device *phydev); |