Home
last modified time | relevance | path

Searched hist:"98101 ca23a35e97cba8b6706730b58fe644afdf4" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/phy/
H A Dmicrel.cdiff 98101ca23a35e97cba8b6706730b58fe644afdf4 Fri May 24 03:53:50 CDT 2024 Horatiu Vultur <horatiu.vultur@microchip.com> net: micrel: Fix lan8841_config_intr after getting out of sleep mode

[ Upstream commit 4fb679040d9f758eeb3b4d01bbde6405bf20e64e ]

When the interrupt is enabled, the function lan8841_config_intr tries to
clear any pending interrupts by reading the interrupt status, then
checks the return value for errors and then continue to enable the
interrupt. It has been seen that once the system gets out of sleep mode,
the interrupt status has the value 0x400 meaning that the PHY detected
that the link was in low power. That is correct value but the problem is
that the check is wrong. We try to check for errors but we return an
error also in this case which is not an error. Therefore fix this by
returning only when there is an error.

Fixes: a8f1a19d27ef ("net: micrel: Add support for lan8841 PHY")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20240524085350.359812-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>