Skip to content

Commit

Permalink
net: stmmac: Enable 16KB buffer size
Browse files Browse the repository at this point in the history
XGMAC supports maximum MTU that can go to 16KB. Lets add this check in
the calculation of RX buffer size.

Fixes: 7ac6653 ("stmmac: Move the STMicroelectronics driver")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jose Abreu authored and David S. Miller committed Dec 18, 2019
1 parent 8605131 commit b2f3a48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,9 @@ static int stmmac_set_bfsize(int mtu, int bufsize)
{
int ret = bufsize;

if (mtu >= BUF_SIZE_4KiB)
if (mtu >= BUF_SIZE_8KiB)
ret = BUF_SIZE_16KiB;
else if (mtu >= BUF_SIZE_4KiB)
ret = BUF_SIZE_8KiB;
else if (mtu >= BUF_SIZE_2KiB)
ret = BUF_SIZE_4KiB;
Expand Down

0 comments on commit b2f3a48

Please sign in to comment.