net: stmmac: Limit max speeds of XGMAC if asked to
We may have some SoCs that can't achieve XGMAC max speed. Limit it if asked to. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5f8475daa2
commit
d9da2c8717
|
@ -831,8 +831,14 @@ static void stmmac_validate(struct phylink_config *config,
|
|||
phylink_set(mask, 1000baseT_Full);
|
||||
phylink_set(mask, 1000baseX_Full);
|
||||
} else if (priv->plat->has_xgmac) {
|
||||
if (!max_speed || (max_speed >= 2500)) {
|
||||
phylink_set(mac_supported, 2500baseT_Full);
|
||||
phylink_set(mac_supported, 2500baseX_Full);
|
||||
}
|
||||
if (!max_speed || (max_speed >= 5000)) {
|
||||
phylink_set(mac_supported, 5000baseT_Full);
|
||||
}
|
||||
if (!max_speed || (max_speed >= 10000)) {
|
||||
phylink_set(mac_supported, 10000baseSR_Full);
|
||||
phylink_set(mac_supported, 10000baseLR_Full);
|
||||
phylink_set(mac_supported, 10000baseER_Full);
|
||||
|
@ -841,6 +847,7 @@ static void stmmac_validate(struct phylink_config *config,
|
|||
phylink_set(mac_supported, 10000baseKX4_Full);
|
||||
phylink_set(mac_supported, 10000baseKR_Full);
|
||||
}
|
||||
}
|
||||
|
||||
/* Half-Duplex can only work with single queue */
|
||||
if (tx_cnt > 1) {
|
||||
|
|
Loading…
Reference in New Issue