From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932686AbcGLBtQ (ORCPT ); Mon, 11 Jul 2016 21:49:16 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:43500 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932129AbcGLBtO (ORCPT ); Mon, 11 Jul 2016 21:49:14 -0400 From: Lipengcheng To: Alan Stern CC: "gregkh@linuxfoundation.org" , "baolu.lu@linux.intel.com" , "chasemetzger15@gmail.com" , "mathias.nyman@linux.intel.com" , "oneukum@suse.com" , "jun.li@freescale.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] usb:solve resume usb device identification problem Thread-Topic: [PATCH] usb:solve resume usb device identification problem Thread-Index: AQHR23QigLE4+YniOUal4v6VVRClraASykQAgAE1B4A= Date: Tue, 12 Jul 2016 01:45:29 +0000 Message-ID: <637796ED17F7774FB27D6AAE3C6951584A929E7C@SZXEMA509-MBS.china.huawei.com> References: <1468241823-116879-1-git-send-email-lpc.li@hisilicon.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.233.95] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.57844BBD.0031,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.2.215, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 79f2640638779afabd1e62ab6d986401 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u6C1nLsW022410 Hi, > -----Original Message----- > From: Alan Stern [mailto:stern@rowland.harvard.edu] > Sent: Monday, July 11, 2016 10:51 PM > To: Lipengcheng > Cc: gregkh@linuxfoundation.org; baolu.lu@linux.intel.com; chasemetzger15@gmail.com; mathias.nyman@linux.intel.com; > oneukum@suse.com; jun.li@freescale.com; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [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 > > Why wouldn't the USB device be at the right speed? > For example, some USB3 devices are resume, the device may be in USB 2.0 Device States. We should have USB 2.0 reset and make the device into 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. > Yes, USB3 devices have this problem. So far, USB2 device can not find this problem. I mainly refer to the reset process of usb enumeration process. > Alan Stern Thanks, Pengcheng Li