]> 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>
Thu, 29 May 2025 09:13:59 +0000 (11:13 +0200)
commitafe9d6c208efdfdf63f8220845b2e60201ca5749
tree5990fbbcc585e5e9626d5c887c7c1f5d6457541c
parent850ed6b0fcbc2c7d7d35b52bf1db48e9a00c6b0d
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