Skip to content

Commit c15128c

Browse files
committed
Merge branch 'r8152-bp-settings'
Hayes Wang says: ==================== r8152: fix bp settings Fix the wrong bp settings of the firmware. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents d98c821 + 6633fb8 commit c15128c

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

drivers/net/usb/r8152.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3955,17 +3955,28 @@ static void rtl_clear_bp(struct r8152 *tp, u16 type)
39553955
case RTL_VER_06:
39563956
ocp_write_byte(tp, type, PLA_BP_EN, 0);
39573957
break;
3958+
case RTL_VER_14:
3959+
ocp_write_word(tp, type, USB_BP2_EN, 0);
3960+
3961+
ocp_write_word(tp, type, USB_BP_8, 0);
3962+
ocp_write_word(tp, type, USB_BP_9, 0);
3963+
ocp_write_word(tp, type, USB_BP_10, 0);
3964+
ocp_write_word(tp, type, USB_BP_11, 0);
3965+
ocp_write_word(tp, type, USB_BP_12, 0);
3966+
ocp_write_word(tp, type, USB_BP_13, 0);
3967+
ocp_write_word(tp, type, USB_BP_14, 0);
3968+
ocp_write_word(tp, type, USB_BP_15, 0);
3969+
break;
39583970
case RTL_VER_08:
39593971
case RTL_VER_09:
39603972
case RTL_VER_10:
39613973
case RTL_VER_11:
39623974
case RTL_VER_12:
39633975
case RTL_VER_13:
3964-
case RTL_VER_14:
39653976
case RTL_VER_15:
39663977
default:
39673978
if (type == MCU_TYPE_USB) {
3968-
ocp_write_byte(tp, MCU_TYPE_USB, USB_BP2_EN, 0);
3979+
ocp_write_word(tp, MCU_TYPE_USB, USB_BP2_EN, 0);
39693980

39703981
ocp_write_word(tp, MCU_TYPE_USB, USB_BP_8, 0);
39713982
ocp_write_word(tp, MCU_TYPE_USB, USB_BP_9, 0);
@@ -4331,14 +4342,20 @@ static bool rtl8152_is_fw_mac_ok(struct r8152 *tp, struct fw_mac *mac)
43314342
case RTL_VER_11:
43324343
case RTL_VER_12:
43334344
case RTL_VER_13:
4334-
case RTL_VER_14:
43354345
case RTL_VER_15:
43364346
fw_reg = 0xf800;
43374347
bp_ba_addr = PLA_BP_BA;
43384348
bp_en_addr = PLA_BP_EN;
43394349
bp_start = PLA_BP_0;
43404350
max_bp = 8;
43414351
break;
4352+
case RTL_VER_14:
4353+
fw_reg = 0xf800;
4354+
bp_ba_addr = PLA_BP_BA;
4355+
bp_en_addr = USB_BP2_EN;
4356+
bp_start = PLA_BP_0;
4357+
max_bp = 16;
4358+
break;
43424359
default:
43434360
goto out;
43444361
}

0 commit comments

Comments
 (0)