Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440989

Re: [PATCH] usb:solve resume usb device identification problem

From Lu Baolu <baolu.lu@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] usb:solve resume usb device identification problem
Date 2016-07-12 02:50 +0200
Message-ID <rTU3D-607-1@gated-at.bofh.it> (permalink)
References <rTJ8d-7rE-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 07/11/2016 08:57 PM, 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.

Have you tried applying XHCI_RESET_ON_RESUME quirk to your
host controller driver? Is your usb device self powered?

Best regards,
Lu  Baolu

>
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> ---
>  drivers/usb/core/hub.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index bee1351..cd71bb3 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3455,7 +3455,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
>  	struct usb_hub	*hub = usb_hub_to_struct_hub(udev->parent);
>  	struct usb_port *port_dev = hub->ports[udev->portnum  - 1];
>  	int		port1 = udev->portnum;
> -	int		status;
> +	int		status, retval;
>  	u16		portchange, portstatus;
>  
>  	if (!test_and_set_bit(port1, hub->child_usage_bits)) {
> @@ -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);
> +
>  	if (udev->persist_enabled)
>  		status = wait_for_connected(udev, hub, &port1, &portchange,
>  				&portstatus);

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] usb:solve resume usb device identification problem Pengcheng Li <lpc.li@hisilicon.com> - 2016-07-11 15:10 +0200
  Re: [PATCH] usb:solve resume usb device identification problem Alan Stern <stern@rowland.harvard.edu> - 2016-07-11 17:00 +0200
    RE: [PATCH] usb:solve resume usb device identification problem Lipengcheng <lpc.li@hisilicon.com> - 2016-07-12 03:50 +0200
  Re: [PATCH] usb:solve resume usb device identification problem Lu Baolu <baolu.lu@linux.intel.com> - 2016-07-12 02:50 +0200
    RE: [PATCH] usb:solve resume usb device identification problem Lipengcheng <lpc.li@hisilicon.com> - 2016-07-12 04:00 +0200
      Re: [PATCH] usb:solve resume usb device identification problem Lu Baolu <baolu.lu@linux.intel.com> - 2016-07-12 04:30 +0200
        RE: [PATCH] usb:solve resume usb device identification problem Lipengcheng <lpc.li@hisilicon.com> - 2016-07-12 13:40 +0200

csiph-web