]> git.baikalelectronics.ru Git - kernel.git/commit
phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 19 May 2013 22:53:43 +0000 (22:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 21:13:08 +0000 (14:13 -0700)
commitca5e17501821e8a449e71db07d5f701b90d58dba
treec698dd2f66fc211a06deab14696ed7d998616b0f
parent8ca3a4812ae87752bde46b0d77712a5afd0eae1f
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>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h