Skip to content

Commit c3efed5

Browse files
wvoondavem330
authored andcommitted
net: stmmac: Enable dwmac4 jumbo frame more than 8KiB
Enable GMAC v4.xx and beyond to support 16KiB buffer. Signed-off-by: Weifeng Voon <[email protected]> Signed-off-by: Ong Boon Leong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 07a4dde commit c3efed5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,15 @@ static void dwmac4_clear(struct dma_desc *p)
443443
p->des3 = 0;
444444
}
445445

446+
static int set_16kib_bfsize(int mtu)
447+
{
448+
int ret = 0;
449+
450+
if (unlikely(mtu >= BUF_SIZE_8KiB))
451+
ret = BUF_SIZE_16KiB;
452+
return ret;
453+
}
454+
446455
const struct stmmac_desc_ops dwmac4_desc_ops = {
447456
.tx_status = dwmac4_wrback_get_tx_status,
448457
.rx_status = dwmac4_wrback_get_rx_status,
@@ -469,4 +478,6 @@ const struct stmmac_desc_ops dwmac4_desc_ops = {
469478
.clear = dwmac4_clear,
470479
};
471480

472-
const struct stmmac_mode_ops dwmac4_ring_mode_ops = { };
481+
const struct stmmac_mode_ops dwmac4_ring_mode_ops = {
482+
.set_16kib_bfsize = set_16kib_bfsize,
483+
};

0 commit comments

Comments
 (0)