mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-21 06:12:56 +00:00
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>
This commit is contained in:
parent
2c7b49212a
commit
5ea94e7686
3 changed files with 12 additions and 5 deletions
|
@ -557,6 +557,8 @@ void phy_drivers_unregister(struct phy_driver *drv, int n);
|
|||
int phy_driver_register(struct phy_driver *new_driver);
|
||||
int phy_drivers_register(struct phy_driver *new_driver, int n);
|
||||
void phy_state_machine(struct work_struct *work);
|
||||
void phy_change(struct work_struct *work);
|
||||
void phy_mac_interrupt(struct phy_device *phydev, int new_link);
|
||||
void phy_start_machine(struct phy_device *phydev,
|
||||
void (*handler)(struct net_device *));
|
||||
void phy_stop_machine(struct phy_device *phydev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue