]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.20/lan743x-fix-tx-stall-issue.patch
Linux 5.0.3
[thirdparty/kernel/stable-queue.git] / queue-4.20 / lan743x-fix-tx-stall-issue.patch
1 From foo@baz Thu Mar 14 23:20:15 PDT 2019
2 From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
3 Date: Wed, 13 Mar 2019 15:55:48 -0400
4 Subject: lan743x: Fix TX Stall Issue
5
6 From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
7
8 [ Upstream commit deb6bfabdbb634e91f36a4e9cb00a7137d72d886 ]
9
10 It has been observed that tx queue may stall while downloading
11 from certain web sites (example www.speedtest.net)
12
13 The cause has been tracked down to a corner case where
14 the tx interrupt vector was disabled automatically, but
15 was not re enabled later.
16
17 The lan743x has two mechanisms to enable/disable individual
18 interrupts. Interrupts can be enabled/disabled by individual
19 source, and they can also be enabled/disabled by individual
20 vector which has been mapped to the source. Both must be
21 enabled for interrupts to work properly.
22
23 The TX code path, primarily uses the interrupt enable/disable of
24 the TX source bit, while leaving the vector enabled all the time.
25
26 However, while investigating this issue it was noticed that
27 the driver requested the use of the vector auto clear feature.
28
29 The test above revealed a case where the vector enable was
30 cleared unintentionally.
31
32 This patch fixes the issue by deleting the lines that request
33 the vector auto clear feature to be used.
34
35 Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
36 Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
37 Signed-off-by: David S. Miller <davem@davemloft.net>
38 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
39 ---
40 drivers/net/ethernet/microchip/lan743x_main.c | 9 +--------
41 1 file changed, 1 insertion(+), 8 deletions(-)
42
43 --- a/drivers/net/ethernet/microchip/lan743x_main.c
44 +++ b/drivers/net/ethernet/microchip/lan743x_main.c
45 @@ -585,8 +585,7 @@ static int lan743x_intr_open(struct lan7
46
47 if (adapter->csr.flags &
48 LAN743X_CSR_FLAG_SUPPORTS_INTR_AUTO_SET_CLR) {
49 - flags = LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_CLEAR |
50 - LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_SET |
51 + flags = LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_SET |
52 LAN743X_VECTOR_FLAG_SOURCE_ENABLE_AUTO_SET |
53 LAN743X_VECTOR_FLAG_SOURCE_ENABLE_AUTO_CLEAR |
54 LAN743X_VECTOR_FLAG_SOURCE_STATUS_AUTO_CLEAR;
55 @@ -599,12 +598,6 @@ static int lan743x_intr_open(struct lan7
56 /* map TX interrupt to vector */
57 int_vec_map1 |= INT_VEC_MAP1_TX_VEC_(index, vector);
58 lan743x_csr_write(adapter, INT_VEC_MAP1, int_vec_map1);
59 - if (flags &
60 - LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_CLEAR) {
61 - int_vec_en_auto_clr |= INT_VEC_EN_(vector);
62 - lan743x_csr_write(adapter, INT_VEC_EN_AUTO_CLR,
63 - int_vec_en_auto_clr);
64 - }
65
66 /* Remove TX interrupt from shared mask */
67 intr->vector_list[0].int_mask &= ~int_bit;