net: phy: meson-gxl: fix interrupt handling in forced mode
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 3 Mar 2022 07:54:15 +0000 (08:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:23:36 +0000 (14:23 +0100)
commit20145e05e49721df544c0e71f67bedef4bb458aa
tree0ecbb4f88bb6868489ee7c2ca8c1b6a2ee3ce11a
parent90a2f4fc5b23b06720554850be7e47845cdcb60f
net: phy: meson-gxl: fix interrupt handling in forced mode

[ Upstream commit a502a8f04097e038c3daa16c5202a9538116d563 ]

This PHY doesn't support a link-up interrupt source. If aneg is enabled
we use the "aneg complete" interrupt for this purpose, but if aneg is
disabled link-up isn't signaled currently.
According to a vendor driver there's an additional "energy detect"
interrupt source that can be used to signal link-up if aneg is disabled.
We can safely ignore this interrupt source if aneg is enabled.

This patch was tested on a TX3 Mini TV box with S905W (even though
boot message says it's a S905D).

This issue has been existing longer, but due to changes in phylib and
the driver the patch applies only from the commit marked as fixed.

Fixes: 84c8f773d2dc ("net: phy: meson-gxl: remove the use of .ack_callback()")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/04cac530-ea1b-850e-6cfa-144a55c4d75d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/meson-gxl.c