diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-11-14 14:42:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-15 23:25:41 +0300 |
commit | 854248e5ec810afe2c3dcf017bb76b7224b97c47 (patch) | |
tree | 8065e3f36c78f789c6ab1771386530595b4935c5 | |
parent | 4e4337ccf780978881f8f41c5c30dad626a4a51e (diff) | |
download | linux-854248e5ec810afe2c3dcf017bb76b7224b97c47.tar.xz |
net: stmmac: gmac4+: Remove uneeded computation for RFA/RFD
RFA and RFD should not be dependent on FIFO size. In fact, the more FIFO
space we have, the later we can activate Flow Control. Let's use
hard-coded values for RFA and RFD for all FIFO sizes with the exception
of 4k, which is a special case.
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c index 36a0af8bf89f..c15409030710 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c @@ -252,19 +252,9 @@ static void dwmac4_dma_rx_chan_op_mode(void __iomem *ioaddr, int mode, rfa = 0x01; /* Full-1.5K */ break; - case 8192: - rfd = 0x06; /* Full-4K */ - rfa = 0x0a; /* Full-6K */ - break; - - case 16384: - rfd = 0x06; /* Full-4K */ - rfa = 0x12; /* Full-10K */ - break; - default: - rfd = 0x06; /* Full-4K */ - rfa = 0x1e; /* Full-16K */ + rfd = 0x07; /* Full-4.5K */ + rfa = 0x04; /* Full-3K */ break; } |