diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-12-18 11:17:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-18 12:04:18 -0800 |
commit | b2f3a481c4cd62f78391b836b64c0a6e72b503d2 (patch) | |
tree | b67389cf016c9fb636004cb02b28486903563977 /drivers/net | |
parent | 8605131747e7e1fd8f6c9f97a00287aae2b2c640 (diff) | |
download | linux-b2f3a481c4cd62f78391b836b64c0a6e72b503d2.tar.gz linux-b2f3a481c4cd62f78391b836b64c0a6e72b503d2.tar.bz2 linux-b2f3a481c4cd62f78391b836b64c0a6e72b503d2.zip |
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: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f507a9bee15b..1cb466dd5b3f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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; |