mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
net: stmmac: Correctly assing MAX MTU in XGMAC cores case
Maximum MTU for XGMAC cores is 16k thus the check for presence of XGMAC shall be done first in order to assign correct value. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c2b69474d6
commit
56bcd59122
@ -4542,10 +4542,10 @@ int stmmac_dvr_probe(struct device *device,
|
||||
|
||||
/* MTU range: 46 - hw-specific max */
|
||||
ndev->min_mtu = ETH_ZLEN - ETH_HLEN;
|
||||
if ((priv->plat->enh_desc) || (priv->synopsys_id >= DWMAC_CORE_4_00))
|
||||
ndev->max_mtu = JUMBO_LEN;
|
||||
else if (priv->plat->has_xgmac)
|
||||
if (priv->plat->has_xgmac)
|
||||
ndev->max_mtu = XGMAC_JUMBO_LEN;
|
||||
else if ((priv->plat->enh_desc) || (priv->synopsys_id >= DWMAC_CORE_4_00))
|
||||
ndev->max_mtu = JUMBO_LEN;
|
||||
else
|
||||
ndev->max_mtu = SKB_MAX_HEAD(NET_SKB_PAD + NET_IP_ALIGN);
|
||||
/* Will not overwrite ndev->max_mtu if plat->maxmtu > ndev->max_mtu
|
||||
|
Loading…
Reference in New Issue
Block a user