]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: lan743x: fix SGMII detection on PCI1xxxx B0+ during warm reset
authorThangaraj Samynathan <thangaraj.s@microchip.com>
Wed, 18 Mar 2026 06:32:28 +0000 (12:02 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Mar 2026 01:50:23 +0000 (18:50 -0700)
commite783e40fb689381caca31e03d28c39e10c82e722
tree9d633fe7a1b62683f07f6e3cd8b303acc5016892
parent64cf4b95de0741e25a5c1f3140de50149fa68937
net: lan743x: fix SGMII detection on PCI1xxxx B0+ during warm reset

A warm reset on boards using an EEPROM-only strap configuration (where
no MAC address is set in the image) can cause the driver to incorrectly
revert to RGMII mode. This occurs because the ENET_CONFIG_LOAD_STARTED
bit may not persist or behave as expected.

Update pci11x1x_strap_get_status() to use revision-specific validation:

- For PCI11x1x A0: Continue using the legacy check (config load started
  or reset protection) to validate the SGMII strap.
- For PCI11x1x B0 and later: Use the newly available
  STRAP_READ_USE_SGMII_EN_ bit in the upper strap register to validate
  the lower SGMII_EN bit.

This ensures the SGMII interface is correctly identified even after a
warm reboot.

Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Link: https://patch.msgid.link/20260318063228.17110-1-thangaraj.s@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/microchip/lan743x_main.h