net: phy: simplify phy_mac_interrupt and related functions

When using phy_mac_interrupt() the irq number is set to
PHY_IGNORE_INTERRUPT, therefore phy_interrupt_is_valid() returns false.
As a result phy_change() effectively just calls phy_trigger_machine()
when called from phy_mac_interrupt() via phy_change_work(). So we can
call phy_trigger_machine() from phy_mac_interrupt() directly and
remove some now unneeded code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Heiner Kallweit
2018-11-09 18:56:52 +01:00
کامیت شده توسط David S. Miller
والد 8deeb6309c
کامیت d73a2156bd
3فایلهای تغییر یافته به همراه1 افزوده شده و 17 حذف شده

مشاهده پرونده

@@ -750,18 +750,6 @@ phy_err:
return IRQ_NONE;
}
/**
* phy_change_work - Scheduled by the phy_mac_interrupt to handle PHY changes
* @work: work_struct that describes the work to be done
*/
void phy_change_work(struct work_struct *work)
{
struct phy_device *phydev =
container_of(work, struct phy_device, phy_queue);
phy_change(phydev);
}
/**
* phy_interrupt - PHY interrupt handler
* @irq: interrupt line
@@ -1005,7 +993,7 @@ void phy_state_machine(struct work_struct *work)
void phy_mac_interrupt(struct phy_device *phydev)
{
/* Trigger a state machine change */
queue_work(system_power_efficient_wq, &phydev->phy_queue);
phy_trigger_machine(phydev);
}
EXPORT_SYMBOL(phy_mac_interrupt);

مشاهده پرونده

@@ -587,7 +587,6 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
mutex_init(&dev->lock);
INIT_DELAYED_WORK(&dev->state_queue, phy_state_machine);
INIT_WORK(&dev->phy_queue, phy_change_work);
/* Request the appropriate module unconditionally; don't
* bother trying to do so only if it isn't already loaded,