]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylib: fix interrupts re-enablement in phy_start
authorShaohui Xie <Shaohui.Xie@nxp.com>
Tue, 10 May 2016 09:42:26 +0000 (17:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 May 2016 19:59:49 +0000 (15:59 -0400)
commitee81a1c12ee7cb0def4ff1e2b83efe012148c742
tree5ef4c6cf2bbb382b10276f8344453a03b2ebfaa7
parentf9254095c4e33f73950e50d036eb505c8387b1df
net: phylib: fix interrupts re-enablement in phy_start

If phy was suspended and is starting, current driver always enable
phy's interrupts, if phy works in polling, phy can raise unexpected
interrupt which will not be handled, the interrupt will block system
enter suspend again. So interrupts should only be re-enabled if phy
works in interrupt.

Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c