]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: lan743x: Restore SGMII CTRL register on resume
authorThangaraj Samynathan <thangaraj.s@microchip.com>
Fri, 16 May 2025 03:57:19 +0000 (09:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:19 +0000 (14:40 +0200)
commit8620be38cf577d4cd6f1ca1102bc4115a8dd4b2f
tree41b81a80ab984af0e4acc86991ca6e8c24d49c5b
parente8138b81d38d906717c9252db43d78f552068eea
net: lan743x: Restore SGMII CTRL register on resume

[ Upstream commit 293e38ff4e4c2ba53f3fd47d8a4a9f0f0414a7a6 ]

SGMII_CTRL register, which specifies the active interface, was not
properly restored when resuming from suspend. This led to incorrect
interface selection after resume particularly in scenarios involving
the FPGA.

To fix this:
- Move the SGMII_CTRL setup out of the probe function.
- Initialize the register in the hardware initialization helper function,
which is called during both device initialization and resume.

This ensures the interface configuration is consistently restored after
suspend/resume cycles.

Fixes: a46d9d37c4f4f ("net: lan743x: Add support for SGMII interface")
Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Link: https://patch.msgid.link/20250516035719.117960-1-thangaraj.s@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/microchip/lan743x_main.c