Commit b2f3a481 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller

net: stmmac: Enable 16KB buffer size

XGMAC supports maximum MTU that can go to 16KB. Lets add this check in
the calculation of RX buffer size.

Fixes: 7ac6653a ("stmmac: Move the STMicroelectronics driver")
Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86051317
...@@ -1109,7 +1109,9 @@ static int stmmac_set_bfsize(int mtu, int bufsize) ...@@ -1109,7 +1109,9 @@ static int stmmac_set_bfsize(int mtu, int bufsize)
{ {
int ret = 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; ret = BUF_SIZE_8KiB;
else if (mtu >= BUF_SIZE_2KiB) else if (mtu >= BUF_SIZE_2KiB)
ret = BUF_SIZE_4KiB; ret = BUF_SIZE_4KiB;
......
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