net: stmmac: Use correct values in TQS/RQS fields
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 13 Oct 2017 09:58:36 +0000 (10:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Oct 2017 18:12:07 +0000 (11:12 -0700)
commit52a76235d0c4dd259cd0df503afed4757c04ba1d
treecf8334f8ce1ba811562a9d6b90f20f9eb1171310
parent258bbb1b0e594ad5f5652cb526b3c63e6a7fad3d
net: stmmac: Use correct values in TQS/RQS fields

Currently we are using all the available fifo size in RQS and
TQS fields. This will not work correctly in multi-queues IP's
because total fifo size must be splitted to the enabled queues.

Correct this by computing the available fifo size per queue and
setting the right value in TQS and RQS fields.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c