]> 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)
commitc6a297156c4c5253be50162cb01e97839d7a5e5d
tree5ef4c6cf2bbb382b10276f8344453a03b2ebfaa7
parentdd20995ae596e8dc6f3d5e4ddc38fb21ce121aac
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