Skip to content

Commit b75d612

Browse files
hayesorzdavem330
authored andcommitted
r8152: fix the RX FIFO settings when suspending
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]>
1 parent 6dc4df1 commit b75d612

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
@@ -5906,6 +5906,11 @@ static void r8153_enter_oob(struct r8152 *tp)
59065906
ocp_data &= ~NOW_IS_OOB;
59075907
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
59085908

5909+
/* RX FIFO settings for OOB */
5910+
ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_OOB);
5911+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, RXFIFO_THR2_OOB);
5912+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, RXFIFO_THR3_OOB);
5913+
59095914
rtl_disable(tp);
59105915
rtl_reset_bmu(tp);
59115916

@@ -6544,6 +6549,11 @@ static void rtl8156_down(struct r8152 *tp)
65446549
ocp_data &= ~NOW_IS_OOB;
65456550
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
65466551

6552+
/* RX FIFO settings for OOB */
6553+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_FULL, 64 / 16);
6554+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, 1024 / 16);
6555+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, 4096 / 16);
6556+
65476557
rtl_disable(tp);
65486558
rtl_reset_bmu(tp);
65496559

0 commit comments

Comments
 (0)