On 2021/3/25 下午7:54, 丁宁(富邻) wrote:
Please refer to upsteam patch 4fdc1790e6a9ef22399c6bc6e63b80f4609f3b7e.
Ok, A new version of this patch will be provided later.
BR
Artie Ding
------------------------------------------------------------------
发件人:LeoLiu-oc <LeoLiu-oc(a)zhaoxin.com>
发送时间:2021年3月22日(星期一) 18:45
收件人:cloud-kernel <cloud-kernel(a)lists.openanolis.org>
抄 送:TonyWWang-oc <TonyWWang-oc(a)zhaoxin.com>om>; TimGuo
<TimGuo(a)zhaoxin.com>om>; CobeChen <CobeChen(a)zhaoxin.com>
主 题:[ck] [patch v1] ck: xhci: fix issue with some USB device
cannot recognize
During polling phase after some device plug in type-c port,
if polling timeout three times, link state will goto inactive.
However this event not handle by the driver, which will cause
device can't be recognized. To fix this issue, if port link state
detected in inactive, record this event that will trigger a warm reset
to bring device identified by driver.
The patch is scheduled to be submitted to the kernel mainline in 2021.
Signed-off-by: LeoLiu-oc <LeoLiu-oc(a)zhaoxin.com>
---
drivers/usb/core/hub.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b33ec768404b..22e233afc6f6 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1128,6 +1128,11 @@ static void hub_activate(struct usb_hub *hub,
enum hub_activation_type type)
USB_SS_PORT_LS_POLLING))
need_debounce_delay = true;
+ /* Make sure a warm-reset request is handled by port_event */
+ if (type == HUB_RESUME &&
+ hub_port_warm_reset_required(hub, port1, portstatus))
+ set_bit(port1, hub->event_bits);
+
/* Clear status-change flags; we'll debounce later */
if (portchange & USB_PORT_STAT_C_CONNECTION) {
need_debounce_delay = true;
--
2.20.1
_______________________________________________
Cloud Kernel mailing list -- cloud-kernel(a)lists.openanolis.org
To unsubscribe send an email to cloud-kernel-leave(a)lists.openanolis.org