Skip to content

Commit 49d1034

Browse files
hayesorzdavem330
authored andcommitted
r8152: move the default coalesce setting for RTL8153
Only RTL8153 could set coalesce, so move the default setting for rtl8152_probe() to r8153_init(). Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3cb3234 commit 49d1034

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/net/usb/r8152.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3579,6 +3579,19 @@ static void r8153_init(struct r8152 *tp)
35793579
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
35803580

35813581
rtl_tally_reset(tp);
3582+
3583+
switch (tp->udev->speed) {
3584+
case USB_SPEED_SUPER:
3585+
case USB_SPEED_SUPER_PLUS:
3586+
tp->coalesce = COALESCE_SUPER;
3587+
break;
3588+
case USB_SPEED_HIGH:
3589+
tp->coalesce = COALESCE_HIGH;
3590+
break;
3591+
default:
3592+
tp->coalesce = COALESCE_SLOW;
3593+
break;
3594+
}
35823595
}
35833596

35843597
static int rtl8152_pre_reset(struct usb_interface *intf)
@@ -4524,19 +4537,6 @@ static int rtl8152_probe(struct usb_interface *intf,
45244537
tp->mii.reg_num_mask = 0x1f;
45254538
tp->mii.phy_id = R8152_PHY_ID;
45264539

4527-
switch (udev->speed) {
4528-
case USB_SPEED_SUPER:
4529-
case USB_SPEED_SUPER_PLUS:
4530-
tp->coalesce = COALESCE_SUPER;
4531-
break;
4532-
case USB_SPEED_HIGH:
4533-
tp->coalesce = COALESCE_HIGH;
4534-
break;
4535-
default:
4536-
tp->coalesce = COALESCE_SLOW;
4537-
break;
4538-
}
4539-
45404540
tp->autoneg = AUTONEG_ENABLE;
45414541
tp->speed = tp->mii.supports_gmii ? SPEED_1000 : SPEED_100;
45424542
tp->duplex = DUPLEX_FULL;

0 commit comments

Comments
 (0)