Commit c3efed5a authored by Weifeng Voon's avatar Weifeng Voon Committed by David S. Miller

net: stmmac: Enable dwmac4 jumbo frame more than 8KiB

Enable GMAC v4.xx and beyond to support 16KiB buffer.
Signed-off-by: default avatarWeifeng Voon <weifeng.voon@intel.com>
Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 07a4ddec
...@@ -443,6 +443,15 @@ static void dwmac4_clear(struct dma_desc *p) ...@@ -443,6 +443,15 @@ static void dwmac4_clear(struct dma_desc *p)
p->des3 = 0; p->des3 = 0;
} }
static int set_16kib_bfsize(int mtu)
{
int ret = 0;
if (unlikely(mtu >= BUF_SIZE_8KiB))
ret = BUF_SIZE_16KiB;
return ret;
}
const struct stmmac_desc_ops dwmac4_desc_ops = { const struct stmmac_desc_ops dwmac4_desc_ops = {
.tx_status = dwmac4_wrback_get_tx_status, .tx_status = dwmac4_wrback_get_tx_status,
.rx_status = dwmac4_wrback_get_rx_status, .rx_status = dwmac4_wrback_get_rx_status,
...@@ -469,4 +478,6 @@ const struct stmmac_desc_ops dwmac4_desc_ops = { ...@@ -469,4 +478,6 @@ const struct stmmac_desc_ops dwmac4_desc_ops = {
.clear = dwmac4_clear, .clear = dwmac4_clear,
}; };
const struct stmmac_mode_ops dwmac4_ring_mode_ops = { }; const struct stmmac_mode_ops dwmac4_ring_mode_ops = {
.set_16kib_bfsize = set_16kib_bfsize,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment