From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758284AbbJ3DVd (ORCPT ); Thu, 29 Oct 2015 23:21:33 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:49229 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755607AbbJ3DVc convert rfc822-to-8bit (ORCPT ); Thu, 29 Oct 2015 23:21:32 -0400 From: John Youn To: Doug Anderson , John Youn , Felipe Balbi CC: wulf , lyz , =?iso-8859-1?Q?Heiko_St=FCbner?= , "open list:ARM/Rockchip SoC..." , Julius Werner , "Herrero, Gregory" , "Kaukab, Yousaf" , "r.baldyga@samsung.com" , Dinh Nguyen , "Greg Kroah-Hartman" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Kaukab, Yousaf" Subject: Re: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2 Thread-Topic: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2 Thread-Index: AQHRDQT+cpJR0xzHgkWOYSzl0YW+UA== Date: Fri, 30 Oct 2015 03:21:29 +0000 Message-ID: <2B3535C5ECE8B5419E3ECBE30077290901DC3B0E98@US01WEMBX2.internal.synopsys.com> References: <1445544303-24202-1-git-send-email-dianders@chromium.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.9.139.222] Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Regards, John