]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.164/ravb-decrease-txfifo-depth-of-q3-and-q2-to-one.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.164 / ravb-decrease-txfifo-depth-of-q3-and-q2-to-one.patch
1 From foo@baz Fri Mar 15 21:00:09 PDT 2019
2 From: Masaru Nagai <masaru.nagai.vx@renesas.com>
3 Date: Thu, 7 Mar 2019 11:24:47 +0100
4 Subject: ravb: Decrease TxFIFO depth of Q3 and Q2 to one
5
6 From: Masaru Nagai <masaru.nagai.vx@renesas.com>
7
8 [ Upstream commit ae9819e339b451da7a86ab6fe38ecfcb6814e78a ]
9
10 Hardware has the CBS (Credit Based Shaper) which affects only Q3
11 and Q2. When updating the CBS settings, even if the driver does so
12 after waiting for Tx DMA finished, there is a possibility that frame
13 data still remains in TxFIFO.
14
15 To avoid this, decrease TxFIFO depth of Q3 and Q2 to one.
16
17 This patch has been exercised this using netperf TCP_MAERTS, TCP_STREAM
18 and UDP_STREAM tests run on an Ebisu board. No performance change was
19 detected, outside of noise in the tests, both in terms of throughput and
20 CPU utilisation.
21
22 Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
23 Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com>
24 Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
25 [simon: updated changelog]
26 Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
27 Signed-off-by: David S. Miller <davem@davemloft.net>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 ---
30 drivers/net/ethernet/renesas/ravb_main.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33 --- a/drivers/net/ethernet/renesas/ravb_main.c
34 +++ b/drivers/net/ethernet/renesas/ravb_main.c
35 @@ -457,7 +457,7 @@ static int ravb_dmac_init(struct net_dev
36 RCR_EFFS | RCR_ENCF | RCR_ETS0 | RCR_ESF | 0x18000000, RCR);
37
38 /* Set FIFO size */
39 - ravb_write(ndev, TGC_TQP_AVBMODE1 | 0x00222200, TGC);
40 + ravb_write(ndev, TGC_TQP_AVBMODE1 | 0x00112200, TGC);
41
42 /* Timestamp enable */
43 ravb_write(ndev, TCCR_TFEN, TCCR);