Skip to content

Commit 2e8b65f

Browse files
hayesorzgregkh
authored andcommitted
r8152: fix the RX FIFO settings when suspending
[ Upstream commit b75d612 ] The RX FIFO would be changed when suspending, so the related settings have to be modified, too. Otherwise, the flow control would work abnormally. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216333 Reported-by: Mark Blakeney <[email protected]> Fixes: cdf0b86 ("r8152: fix a WOL issue") Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 59cfae6 commit 2e8b65f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/usb/r8152.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5904,6 +5904,11 @@ static void r8153_enter_oob(struct r8152 *tp)
59045904
ocp_data &= ~NOW_IS_OOB;
59055905
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
59065906

5907+
/* RX FIFO settings for OOB */
5908+
ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_OOB);
5909+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, RXFIFO_THR2_OOB);
5910+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, RXFIFO_THR3_OOB);
5911+
59075912
rtl_disable(tp);
59085913
rtl_reset_bmu(tp);
59095914

@@ -6542,6 +6547,11 @@ static void rtl8156_down(struct r8152 *tp)
65426547
ocp_data &= ~NOW_IS_OOB;
65436548
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
65446549

6550+
/* RX FIFO settings for OOB */
6551+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_FULL, 64 / 16);
6552+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, 1024 / 16);
6553+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, 4096 / 16);
6554+
65456555
rtl_disable(tp);
65466556
rtl_reset_bmu(tp);
65476557

0 commit comments

Comments
 (0)