]> git.baikalelectronics.ru Git - kernel.git/commit
lan743x: fix deadlock in lan743x_phy_link_status_change()
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 24 Nov 2021 07:16:25 +0000 (08:16 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Nov 2021 02:19:58 +0000 (18:19 -0800)
commitde1c8c2e9ab27ba892ed72e6bb031be5a5b3d4a1
treefdd33d30e829ef339d29cfef2f619d1901ed302d
parent39a505e87b6b469ceec9475c82b529c1a1e55bba
lan743x: fix deadlock in lan743x_phy_link_status_change()

Usage of phy_ethtool_get_link_ksettings() in the link status change
handler isn't needed, and in combination with the referenced change
it results in a deadlock. Simply remove the call and replace it with
direct access to phydev->speed. The duplex argument of
lan743x_phy_update_flowcontrol() isn't used and can be removed.

Fixes: 19a30a78bd81 ("phy: phy_ethtool_ksettings_get: Lock the phy for consistency")
Reported-by: Alessandro B Maurici <abmaurici@gmail.com>
Tested-by: Alessandro B Maurici <abmaurici@gmail.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/40e27f76-0ba3-dcef-ee32-a78b9df38b0f@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan743x_main.c