Skip to contentSkip to conversation

lan743x: Use correct MAC_CR configuration for 1 GBit speed

PATCH Applied Roelof Berg 3 participants 3 messages Jun 3, 2020 – Jun 4, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lan743x: Use correct MAC_CR configuration for 1 GBit speed

Corrected the MAC_CR configuration bits for 1 GBit operation. The data sheet allows MAC_CR(2:1) to be 10 and also 11 for 1 GBit/s speed, but only 10 works correctly.

Devices tested:
Microchip Lan7431, fixed-phy mode
Microchip Lan7430, normal phy mode

---
 drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/microchip/lan743x_main.c +1 -1
index 36624e3c633b..c5c5c688b7e2 100644
@@ -985,7 +985,7 @@ static void lan743x_phy_link_status_change(struct net_device *netdev)
 		break;
 		case SPEED_1000:
 			data |= MAC_CR_CFG_H_;
-			data |= MAC_CR_CFG_L_;
+			data &= ~MAC_CR_CFG_L_;
 		break;
 		}
 		lan743x_csr_write(adapter, MAC_CR, data);
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Roelof Berg

Corrected the MAC_CR configuration bits for 1 GBit operation. The data sheet allows MAC_CR(2:1) to be 10 and also 11 for 1 GBit/s speed, but only 10 works correctly.

Devices tested:
Microchip Lan7431, fixed-phy mode
Microchip Lan7430, normal phy mode

Fixes 6f197fb63850 ("lan743x: Added fixed link and RGMII support")

This was probably in the pull request for the merge window.

Andrew

maintainer Applied
#2 lore raw
In reply to Roelof Berg

From: Roelof Berg <[email protected]>
Date: Wed, 3 Jun 2020 23:54:14 +0200

Quoted 9 lines

Corrected the MAC_CR configuration bits for 1 GBit operation. The data sheet allows MAC_CR(2:1) to be 10 and also 11 for 1 GBit/s speed, but only 10 works correctly.

Devices tested:
Microchip Lan7431, fixed-phy mode
Microchip Lan7430, normal phy mode

Applied, thank you.