]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: aquantia: do not return an error on clearing pending IRQs
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 9 Nov 2020 15:46:01 +0000 (17:46 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Nov 2020 22:09:54 +0000 (14:09 -0800)
commitd5842f3d5866d87cb43e5d89a4adfe1e28ec0493
tree6849e6f90fef13d449ba99d93290793676339d68
parentc2cdbc83ad8c6ec9524934c0cced960d13ae2bbd
net: phy: aquantia: do not return an error on clearing pending IRQs

The referenced commit added in .config_intr() the part of code which upon
configuration of the IRQ state it also clears up any pending IRQ. If
there were actually pending IRQs, a read on the IRQ status register will
return something non zero. This should not result in the callback
returning an error.

Fix this by returning an error only when the result of the
phy_read_mmd() is negative.

Fixes: 294fe0b7f9f1 ("net: phy: aquantia: remove the use of .ack_interrupt()")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Camelia Groza <camelia.groza@nxp.com>
Link: https://lore.kernel.org/r/20201109154601.3812574-1-ciorneiioana@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/aquantia_main.c