Skip to content

Commit 0e67899

Browse files
oleremkuba-moo
authored andcommitted
lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected
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: e69647a ("lan78xx: Set ASD in MAC_CR when EEE is enabled.") Signed-off-by: Oleksij Rempel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 10bfd45 commit 0e67899

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,8 @@ static int lan78xx_reset(struct lan78xx_net *dev)
30333033
if (dev->chipid == ID_REV_CHIP_ID_7801_)
30343034
buf &= ~MAC_CR_GMII_EN_;
30353035

3036-
if (dev->chipid == ID_REV_CHIP_ID_7800_) {
3036+
if (dev->chipid == ID_REV_CHIP_ID_7800_ ||
3037+
dev->chipid == ID_REV_CHIP_ID_7850_) {
30373038
ret = lan78xx_read_raw_eeprom(dev, 0, 1, &sig);
30383039
if (!ret && sig != EEPROM_INDICATOR) {
30393040
/* Implies there is no external eeprom. Set mac speed */

0 commit comments

Comments
 (0)