|
@@ -419,8 +419,6 @@ out_unlock:
|
|
|
EXPORT_SYMBOL(phy_start_aneg);
|
|
|
|
|
|
|
|
|
-static void phy_change(struct work_struct *work);
|
|
|
-
|
|
|
/**
|
|
|
* phy_start_machine - start PHY state machine tracking
|
|
|
* @phydev: the phy_device struct
|
|
@@ -565,8 +563,6 @@ int phy_start_interrupts(struct phy_device *phydev)
|
|
|
{
|
|
|
int err = 0;
|
|
|
|
|
|
- INIT_WORK(&phydev->phy_queue, phy_change);
|
|
|
-
|
|
|
atomic_set(&phydev->irq_disable, 0);
|
|
|
if (request_irq(phydev->irq, phy_interrupt,
|
|
|
IRQF_SHARED,
|
|
@@ -623,7 +619,7 @@ EXPORT_SYMBOL(phy_stop_interrupts);
|
|
|
* phy_change - Scheduled by the phy_interrupt/timer to handle PHY changes
|
|
|
* @work: work_struct that describes the work to be done
|
|
|
*/
|
|
|
-static void phy_change(struct work_struct *work)
|
|
|
+void phy_change(struct work_struct *work)
|
|
|
{
|
|
|
int err;
|
|
|
struct phy_device *phydev =
|
|
@@ -922,6 +918,14 @@ void phy_state_machine(struct work_struct *work)
|
|
|
schedule_delayed_work(&phydev->state_queue, PHY_STATE_TIME * HZ);
|
|
|
}
|
|
|
|
|
|
+void phy_mac_interrupt(struct phy_device *phydev, int new_link)
|
|
|
+{
|
|
|
+ cancel_work_sync(&phydev->phy_queue);
|
|
|
+ phydev->link = new_link;
|
|
|
+ schedule_work(&phydev->phy_queue);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(phy_mac_interrupt);
|
|
|
+
|
|
|
static inline void mmd_phy_indirect(struct mii_bus *bus, int prtad, int devad,
|
|
|
int addr)
|
|
|
{
|