net: phy: marvell: Fix invalid comparison in the resume and suspend functions
authorKurt Cancemi <kurt@x64architecture.com>
Sat, 12 Mar 2022 20:15:13 +0000 (15:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Mar 2022 08:16:41 +0000 (09:16 +0100)
commita296f3ae8009fe1ee7384279d621d3bbca43580b
tree6311016cfb2ce8c5491f19af533388fe3f69135c
parentb9820bf09f599c907e32af09674e4bb1296711eb
net: phy: marvell: Fix invalid comparison in the resume and suspend functions

[ Upstream commit 837d9e49402eaf030db55a49f96fc51d73b4b441 ]

This bug resulted in only the current mode being resumed and suspended when
the PHY supported both fiber and copper modes and when the PHY only supported
copper mode the fiber mode would incorrectly be attempted to be resumed and
suspended.

Fixes: 3758be3dc162 ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")
Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220312201512.326047-1-kurt@x64architecture.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/marvell.c