lkml.org 
[lkml]   [2016]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb:solve resume usb device identification problem
On Mon, 11 Jul 2016, Pengcheng Li wrote:

> A usb device in the connection state. Then host is suspend and resume.
> But the usb device could not be at the right speed. We should be reset
> the reset.
>
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>

Why wouldn't the USB device be at the right speed?

You should _not_ reset the device if it is at the right speed.

> @@ -3512,6 +3512,10 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> }
> }
>
> + retval = hub_port_reset(hub, port1, udev, HUB_ROOT_RESET_TIME, false);
> + if (retval < 0)
> + hub_port_disable(hub, port1, 0);
> +

Most of the time (for example, for non-USB3 devices) this would be
wrong.

Alan Stern

\
 
 \ /
  Last update: 2016-07-11 17:41    [W:0.076 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site