]> git.hungrycats.org Git - linux/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:38:45 +0000 (14:38 +0000)
commit8d4d26f51ef0d8d23f99b880e0cd897bb86acbab
tree84635d0babf442211094a655925d7ce908bb38a6
parent8a54834c03c30e549c33d5da0975f3e1454ec906
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