Commit a0246daf authored by Hayes Wang's avatar Hayes Wang Committed by David S. Miller

r8152: don't enable U1U2 with USB_SPEED_HIGH for RTL8153B

For certain platforms, it causes USB reset periodically.
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7f1b596
...@@ -3391,6 +3391,7 @@ static void rtl8153b_runtime_enable(struct r8152 *tp, bool enable) ...@@ -3391,6 +3391,7 @@ static void rtl8153b_runtime_enable(struct r8152 *tp, bool enable)
r8153b_ups_en(tp, false); r8153b_ups_en(tp, false);
r8153_queue_wake(tp, false); r8153_queue_wake(tp, false);
rtl_runtime_suspend_enable(tp, false); rtl_runtime_suspend_enable(tp, false);
if (tp->udev->speed != USB_SPEED_HIGH)
r8153b_u1u2en(tp, true); r8153b_u1u2en(tp, true);
} }
} }
...@@ -5024,6 +5025,8 @@ static void rtl8153b_up(struct r8152 *tp) ...@@ -5024,6 +5025,8 @@ static void rtl8153b_up(struct r8152 *tp)
ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data);
r8153_aldps_en(tp, true); r8153_aldps_en(tp, true);
if (tp->udev->speed != USB_SPEED_HIGH)
r8153b_u1u2en(tp, true); r8153b_u1u2en(tp, true);
} }
...@@ -5527,6 +5530,8 @@ static void r8153b_init(struct r8152 *tp) ...@@ -5527,6 +5530,8 @@ static void r8153b_init(struct r8152 *tp)
ocp_data &= ~CUR_LINK_OK; ocp_data &= ~CUR_LINK_OK;
ocp_data |= POLL_LINK_CHG; ocp_data |= POLL_LINK_CHG;
ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data);
if (tp->udev->speed != USB_SPEED_HIGH)
r8153b_u1u2en(tp, true); r8153b_u1u2en(tp, true);
usb_enable_lpm(tp->udev); usb_enable_lpm(tp->udev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment