Skip to content

Commit 6dc4df1

Browse files
hayesorzdavem330
authored andcommitted
r8152: fix the units of some registers for RTL8156A
The units of PLA_RX_FIFO_FULL and PLA_RX_FIFO_EMPTY are 16 bytes. Fixes: 195aae3 ("r8152: support new chips") Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3c53cd6 commit 6dc4df1

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

drivers/net/usb/r8152.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6431,21 +6431,8 @@ static void r8156_fc_parameter(struct r8152 *tp)
64316431
u32 pause_on = tp->fc_pause_on ? tp->fc_pause_on : fc_pause_on_auto(tp);
64326432
u32 pause_off = tp->fc_pause_off ? tp->fc_pause_off : fc_pause_off_auto(tp);
64336433

6434-
switch (tp->version) {
6435-
case RTL_VER_10:
6436-
case RTL_VER_11:
6437-
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 8);
6438-
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 8);
6439-
break;
6440-
case RTL_VER_12:
6441-
case RTL_VER_13:
6442-
case RTL_VER_15:
6443-
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 16);
6444-
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 16);
6445-
break;
6446-
default:
6447-
break;
6448-
}
6434+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 16);
6435+
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 16);
64496436
}
64506437

64516438
static void rtl8156_change_mtu(struct r8152 *tp)

0 commit comments

Comments
 (0)