• Anatolij Gustschin's avatar
    phylib: Allow early-out in phy_change · a8729eb3
    Anatolij Gustschin authored
    Marvell 88E1121R Dual PHY device can be hardware-configured
    to use shared interrupt pin for both PHY ports. For such
    PHY configurations using shared PHY interrupt phy_interrupt()
    handler will also schedule a work for PHY port which didn't
    cause an interrupt.
    
    This patch adds a possibility for PHY drivers to provide
    did_interrupt() function which reports if the PHY (or a PHY
    port in a multi-PHY device) generated an interrupt. This
    function is called in phy_change() as phy_change() shouldn't
    proceed if it is invoked for a PHY which didn't cause an
    interrupt. So check for interrupt originator in phy_change()
    to allow early-out.
    Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a8729eb3
phy.c 22.4 KB