net: phy: meson-gxl: fix interrupt support
authorJerome Brunet <jbrunet@baylibre.com>
Thu, 14 Mar 2019 13:49:45 +0000 (14:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:26:17 +0000 (06:26 +0200)
commita6f0168e668169768cb076ed6ecc4891855aaebd
tree28c01c5561e843627cfbf62c731b7ccd944d7596
parent85ef72d829eb85c58c92c902c9821f26639b254f
net: phy: meson-gxl: fix interrupt support

[ Upstream commit daa5c4d0167a308306525fd5ab9a5e18e21f4f74 ]

If an interrupt is already pending when the interrupt is enabled on the
GXL phy, no IRQ will ever be triggered.

The fix is simply to make sure pending IRQs are cleared before setting
up the irq mask.

Fixes: cf127ff20af1 ("net: phy: meson-gxl: add interrupt support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/meson-gxl.c