net: phy: Fix phy_mac_interrupt()
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 19 Jan 2016 03:33:07 +0000 (19:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jan 2016 18:48:51 +0000 (10:48 -0800)
commitdeccd16f91f930af8e91ffbbfc839d0ad8da999d
treef793a4184418299911841e06d48d544744cdeaff
parentd5c3d84657db57bd23ecd58b97f1c99dd42a7b80
net: phy: Fix phy_mac_interrupt()

Commit 5ea94e7686a3 ("phy: add phy_mac_interrupt()") to use with
PHY_IGNORE_INTERRUPT added a cancel_work_sync() into phy_mac_interrupt()
which is allowed to sleep, whereas phy_mac_interrupt() is expected to be
callable from interrupt context.

Now that we have fixed how the PHY state machine treats
PHY_IGNORE_INTERRUPT with respect to state changes, we can just set the
new link state, and queue the PHY state machine for execution so it is
going to read the new link state.

For that to work properly, we need to update phy_change() not to try to
invoke any interrupt callbacks if we have configured the PHY device for
PHY_IGNORE_INTERRUPT, because that PHY device and its driver are not
required to implement those.

Fixes: 5ea94e7686a3 ("phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
This page took 0.024309 seconds and 5 git commands to generate.