/[packages]/backports/8/kernel/current/SOURCES/r8152-fix-the-rx-fifo-settings-when-suspending.patch
ViewVC logotype

Contents of /backports/8/kernel/current/SOURCES/r8152-fix-the-rx-fifo-settings-when-suspending.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1881590 - (show annotations) (download)
Mon Aug 29 03:49:40 2022 UTC (19 months, 3 weeks ago) by tmb
File size: 1907 byte(s)
- add current -stable queue
- io_uring: fix issue with io_write() not always undoing sb_start_write()
- HID: input: fix uclogic tablets


1 From f21e8c6c49e3a27deb308da11f8cb32ef4d41bc4 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 18 Aug 2022 16:06:20 +0800
4 Subject: r8152: fix the RX FIFO settings when suspending
5
6 From: Hayes Wang <hayeswang@realtek.com>
7
8 [ Upstream commit b75d612014447e04abdf0e37ffb8f2fd8b0b49d6 ]
9
10 The RX FIFO would be changed when suspending, so the related settings
11 have to be modified, too. Otherwise, the flow control would work
12 abnormally.
13
14 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216333
15 Reported-by: Mark Blakeney <mark.blakeney@bullet-systems.net>
16 Fixes: cdf0b86b250f ("r8152: fix a WOL issue")
17 Signed-off-by: Hayes Wang <hayeswang@realtek.com>
18 Signed-off-by: David S. Miller <davem@davemloft.net>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 drivers/net/usb/r8152.c | 10 ++++++++++
22 1 file changed, 10 insertions(+)
23
24 diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
25 index 46c7954d27629..d142ac8fcf6e2 100644
26 --- a/drivers/net/usb/r8152.c
27 +++ b/drivers/net/usb/r8152.c
28 @@ -5906,6 +5906,11 @@ static void r8153_enter_oob(struct r8152 *tp)
29 ocp_data &= ~NOW_IS_OOB;
30 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
31
32 + /* RX FIFO settings for OOB */
33 + ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_OOB);
34 + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, RXFIFO_THR2_OOB);
35 + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, RXFIFO_THR3_OOB);
36 +
37 rtl_disable(tp);
38 rtl_reset_bmu(tp);
39
40 @@ -6544,6 +6549,11 @@ static void rtl8156_down(struct r8152 *tp)
41 ocp_data &= ~NOW_IS_OOB;
42 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
43
44 + /* RX FIFO settings for OOB */
45 + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_FULL, 64 / 16);
46 + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, 1024 / 16);
47 + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, 4096 / 16);
48 +
49 rtl_disable(tp);
50 rtl_reset_bmu(tp);
51
52 --
53 2.35.1
54

  ViewVC Help
Powered by ViewVC 1.1.30