“8f156b5e2e222167172f1f2dae32ead2adcf9001”上不存在“develop/doc_cn/design/csp.html”
提交 56bcd591 编写于 作者: J Jose Abreu 提交者: David S. Miller

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: NJose Abreu <joabreu@synopsys.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c2b69474
...@@ -4542,10 +4542,10 @@ int stmmac_dvr_probe(struct device *device, ...@@ -4542,10 +4542,10 @@ int stmmac_dvr_probe(struct device *device,
/* MTU range: 46 - hw-specific max */ /* MTU range: 46 - hw-specific max */
ndev->min_mtu = ETH_ZLEN - ETH_HLEN; ndev->min_mtu = ETH_ZLEN - ETH_HLEN;
if ((priv->plat->enh_desc) || (priv->synopsys_id >= DWMAC_CORE_4_00)) if (priv->plat->has_xgmac)
ndev->max_mtu = JUMBO_LEN;
else if (priv->plat->has_xgmac)
ndev->max_mtu = XGMAC_JUMBO_LEN; 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 else
ndev->max_mtu = SKB_MAX_HEAD(NET_SKB_PAD + NET_IP_ALIGN); ndev->max_mtu = SKB_MAX_HEAD(NET_SKB_PAD + NET_IP_ALIGN);
/* Will not overwrite ndev->max_mtu if plat->maxmtu > ndev->max_mtu /* Will not overwrite ndev->max_mtu if plat->maxmtu > ndev->max_mtu
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册