Skip to content

Commit 59cfae6

Browse files
hayesorzgregkh
authored andcommitted
r8152: fix the units of some registers for RTL8156A
[ Upstream commit 6dc4df1 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 9cf8575 commit 59cfae6

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
@@ -6429,21 +6429,8 @@ static void r8156_fc_parameter(struct r8152 *tp)
64296429
u32 pause_on = tp->fc_pause_on ? tp->fc_pause_on : fc_pause_on_auto(tp);
64306430
u32 pause_off = tp->fc_pause_off ? tp->fc_pause_off : fc_pause_off_auto(tp);
64316431

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

64496436
static void rtl8156_change_mtu(struct r8152 *tp)

0 commit comments

Comments
 (0)