From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030437AbbJ3Iad (ORCPT ); Fri, 30 Oct 2015 04:30:33 -0400 Received: from mga14.intel.com ([192.55.52.115]:62876 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759007AbbJ3Ia2 (ORCPT ); Fri, 30 Oct 2015 04:30:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,217,1444719600"; d="scan'208";a="807301286" Date: Fri, 30 Oct 2015 09:30:24 +0100 From: "Herrero, Gregory" To: John Youn Cc: Doug Anderson , Felipe Balbi , wulf , lyz , Heiko =?iso-8859-1?Q?St=FCbner?= , "open list:ARM/Rockchip SoC..." , Julius Werner , "Kaukab, Yousaf" , "r.baldyga@samsung.com" , Dinh Nguyen , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2 Message-ID: <20151030083024.GA9527@herrerog> References: <1445544303-24202-1-git-send-email-dianders@chromium.org> <2B3535C5ECE8B5419E3ECBE30077290901DC3B0E98@US01WEMBX2.internal.synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2B3535C5ECE8B5419E3ECBE30077290901DC3B0E98@US01WEMBX2.internal.synopsys.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2015 at 03:21:29AM +0000, John Youn wrote: > On 10/29/2015 9:43 AM, Doug Anderson wrote: > > John, > > > > On Thu, Oct 22, 2015 at 1:05 PM, Douglas Anderson wrote: > >> In commit 734643dfbdde ("usb: dwc2: host: add flag to reflect bus > >> state") we changed dwc2_port_suspend() not to set the lx_state > >> anymore (instead it sets the new bus_suspended variable). This > >> introduced a bug where we would fail to detect device insertions if: > >> > >> 1. Plug empty hub into dwc2 > >> 2. Plug USB flash drive into the empty hub. > >> 3. Wait a few seconds > >> 4. Unplug USB flash drive > >> 5. Less than 2 seconds after step 4, plug the USB flash drive in again. > >> > >> The dwc2_hcd_rem_wakeup() function should have been changed to look at > >> the new bus_suspended variable. > >> > >> Let's fix it. Since commit b46146d59fda ("usb: dwc2: host: resume root > >> hub on remote wakeup") talks about needing the root hub resumed if the > >> bus was suspended, we'll include it in our test. > >> > >> It appears that the "port_l1_change" should only be set to 1 if we were > >> in DWC2_L1 (the driver currently never sets this), so we'll update the > >> former "else" case based on this test. > >> > >> Fixes: 734643dfbdde ("usb: dwc2: host: add flag to reflect bus state") > >> Signed-off-by: Douglas Anderson > >> --- > >> drivers/usb/dwc2/hcd.c | 9 +++++---- > >> 1 file changed, 5 insertions(+), 4 deletions(-) > > > > I know I've sent up a lot of patches recently, but this one in > > particular would be good to get tested, reviewed, and landed sooner > > rather than later. I believe it fixes a recent regression that is > > probably experienced across all dwc2 users. > > > > Please let me know if you have any questions. > > > Acked-by: John Youn > > Sorry for the delay. I'll get to the others soon. > > > Yousaf, Gregory, > > Care to provide reviewed or tested-bys? > Hi John, Patch looks good to me. I tested multiple suspend/resume and connect/disconnect with it. Tested-by: Gregory Herrero Regards, Gregory