On Fri, 2011-08-26 at 13:39 +0800, jerome huang wrote: > Please find the attachments. > > Thanks, > Jerome > Please apply test2.patch and post the dmesg. Thanks, Andiry
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 36ce572..3fbdbbd 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -688,6 +688,8 @@ enum hub_activation_type { static void hub_init_func2(struct work_struct *ws); static void hub_init_func3(struct work_struct *ws); +static int hub_port_reset(struct usb_hub *hub, int port1, + struct usb_device *udev, unsigned int delay, bool warm); static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) { @@ -796,6 +798,14 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) } } + if (hub_is_superspeed(hub->hdev) && + (portstatus & USB_PORT_STAT_LINK_STATE) + == USB_SS_PORT_LS_COMP_MOD) { + dev_dbg(hub_dev, "warm reset port %d\n", i); + hub_port_reset(hub, port1, NULL, + HUB_BH_RESET_TIME, true); + } + /* Clear status-change flags; we'll debounce later */ if (portchange & USB_PORT_STAT_C_CONNECTION) { need_debounce_delay = true;