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)
commit84a527a41f38a80353f185d05e41b021e1ff672b
tree5ef4c6cf2bbb382b10276f8344453a03b2ebfaa7
parent10a81980fc47e64ffac26a073139813d3f697b64
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