linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lipengcheng <lpc.li@hisilicon.com>
To: Lu Baolu <baolu.lu@linux.intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"chasemetzger15@gmail.com" <chasemetzger15@gmail.com>,
	"mathias.nyman@linux.intel.com" <mathias.nyman@linux.intel.com>,
	"oneukum@suse.com" <oneukum@suse.com>,
	"jun.li@freescale.com" <jun.li@freescale.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] usb:solve resume usb device identification problem
Date: Tue, 12 Jul 2016 01:48:58 +0000	[thread overview]
Message-ID: <637796ED17F7774FB27D6AAE3C6951584A92BE8A@SZXEMA509-MBS.china.huawei.com> (raw)
In-Reply-To: <57843CC3.7050204@linux.intel.com>

Hi,

> -----Original Message-----
> From: Lu Baolu [mailto:baolu.lu@linux.intel.com]
> Sent: Tuesday, July 12, 2016 8:42 AM
> To: Lipengcheng; gregkh@linuxfoundation.org; stern@rowland.harvard.edu; chasemetzger15@gmail.com; mathias.nyman@linux.intel.com;
> oneukum@suse.com; jun.li@freescale.com
> Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] usb:solve resume usb device identification problem
> 
> 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?
> 
I do not apply XHCI_RESET_ON_RESUME quir to my host controller driver. I select no pci platform. Our usb device is not 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);
Best regards
Pengcheng Li

  reply	other threads:[~2016-07-12  1:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 12:57 [PATCH] usb:solve resume usb device identification problem Pengcheng Li
2016-07-11 14:51 ` Alan Stern
2016-07-12  1:45   ` Lipengcheng
2016-07-12  0:41 ` Lu Baolu
2016-07-12  1:48   ` Lipengcheng [this message]
2016-07-12  2:23     ` Lu Baolu
2016-07-12 11:24       ` Lipengcheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=637796ED17F7774FB27D6AAE3C6951584A92BE8A@SZXEMA509-MBS.china.huawei.com \
    --to=lpc.li@hisilicon.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=chasemetzger15@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=oneukum@suse.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).