mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
net: mvneta: fix use of state->speed
When support for short preambles was added, it incorrectly keyed its
decision off state->speed instead of state->interface. state->speed
is not guaranteed to be correct for in-band modes, which can lead to
short preambles being unexpectedly disabled.
Fix this by keying off the interface mode, which is the only way that
mvneta can operate at 2.5Gbps.
Fixes: da58a931f2
("net: mvneta: Add support for 2500Mbps SGMII")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b9fcf0a0d8
commit
f2ca673d2c
@ -3959,7 +3959,7 @@ static void mvneta_mac_config(struct phylink_config *config, unsigned int mode,
|
||||
/* When at 2.5G, the link partner can send frames with shortened
|
||||
* preambles.
|
||||
*/
|
||||
if (state->speed == SPEED_2500)
|
||||
if (state->interface == PHY_INTERFACE_MODE_2500BASEX)
|
||||
new_ctrl4 |= MVNETA_GMAC4_SHORT_PREAMBLE_ENABLE;
|
||||
|
||||
if (pp->phy_interface != state->interface) {
|
||||
|
Loading…
Reference in New Issue
Block a user