]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 22 Feb 2024 12:38:38 +0000 (13:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:48:35 +0000 (14:48 +0000)
commit288218b1dd265fed5beaf1bc809c0f72c2e02a25
tree706d7b160250d5e056d18f1b101827a398ae6aec
parent44112bc5c74e64f28f5a9127dc34066c7a09bd0f
lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected

[ Upstream commit 0e67899abfbfdea0c3c0ed3fd263ffc601c5c157 ]

Same as LAN7800, LAN7850 can be used without EEPROM. If EEPROM is not
present or not flashed, LAN7850 will fail to sync the speed detected by the PHY
with the MAC. In case link speed is 100Mbit, it will accidentally work,
otherwise no data can be transferred.

Better way would be to implement link_up callback, or set auto speed
configuration unconditionally. But this changes would be more intrusive.
So, for now, set it only if no EEPROM is found.

Fixes: e69647a19c87 ("lan78xx: Set ASD in MAC_CR when EEE is enabled.")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20240222123839.2816561-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/lan78xx.c