Skip to content

Commit cce8334

Browse files
hayesorzdavem330
authored andcommitted
r8152: move setting r8153b_rx_agg_chg_indicate()
Move setting r8153b_rx_agg_chg_indicate() for 2.5G devices. The r8153b_rx_agg_chg_indicate() has to be called after enabling tx/rx. Otherwise, the coalescing settings are useless. Fixes: 195aae3 ("r8152: support new chips") Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 61b0ad6 commit cce8334

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/net/usb/r8152.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,12 +3027,16 @@ static int rtl_enable(struct r8152 *tp)
30273027
ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data);
30283028

30293029
switch (tp->version) {
3030-
case RTL_VER_08:
3031-
case RTL_VER_09:
3032-
case RTL_VER_14:
3033-
r8153b_rx_agg_chg_indicate(tp);
3030+
case RTL_VER_01:
3031+
case RTL_VER_02:
3032+
case RTL_VER_03:
3033+
case RTL_VER_04:
3034+
case RTL_VER_05:
3035+
case RTL_VER_06:
3036+
case RTL_VER_07:
30343037
break;
30353038
default:
3039+
r8153b_rx_agg_chg_indicate(tp);
30363040
break;
30373041
}
30383042

@@ -3086,7 +3090,6 @@ static void r8153_set_rx_early_timeout(struct r8152 *tp)
30863090
640 / 8);
30873091
ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EXTRA_AGGR_TMR,
30883092
ocp_data);
3089-
r8153b_rx_agg_chg_indicate(tp);
30903093
break;
30913094

30923095
default:
@@ -3120,7 +3123,6 @@ static void r8153_set_rx_early_size(struct r8152 *tp)
31203123
case RTL_VER_15:
31213124
ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE,
31223125
ocp_data / 8);
3123-
r8153b_rx_agg_chg_indicate(tp);
31243126
break;
31253127
default:
31263128
WARN_ON_ONCE(1);

0 commit comments

Comments
 (0)