Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935127AbaKNEtq (ORCPT ); Thu, 13 Nov 2014 23:49:46 -0500 Received: from mail-oi0-f42.google.com ([209.85.218.42]:36243 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934226AbaKNEtp (ORCPT ); Thu, 13 Nov 2014 23:49:45 -0500 MIME-Version: 1.0 In-Reply-To: <5463FE5E.906@rock-chips.com> References: <1415624983-22413-1-git-send-email-kever.yang@rock-chips.com> <5463FE5E.906@rock-chips.com> Date: Thu, 13 Nov 2014 20:49:44 -0800 X-Google-Sender-Auth: XLofNeOppgSsyDZ98ZLqduMFBG8 Message-ID: Subject: Re: [PATCH v3] usb: dwc2: add bus suspend/resume for dwc2 From: Julius Werner To: Kever Yang , Alan Stern Cc: Doug Anderson , Paul Zimmerman , Felipe Balbi , Dinh Nguyen , Romain Perier , Heiko Stuebner , Sonny Rao , Addy Ke , Eddie Cai , lyz , wulf , Tao Huang , "open list:ARM/Rockchip SoC..." , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Julius Werner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I will figure out how to make dwc2 detect the device connect after auto > suspend, > or disable the auto suspend feature for the dwc2 hcd. I think auto-suspend of the root hub device (which is what calls bus_suspend, but is not the host controller device itself) is expected to always happen and not really meant to be disabled. I'm surprised that the controller would fail to come back up, though. Does removing the PCGCTL part make it work? That's the only thing I can think of (but then again the function should immediately return if the port is not in L0, so if there is nothing plugged in the suspend shouldn't really do anything). Another thing might be that the port connect interrupt does not correctly resume the root hub. I don't really know many details about how that works, and it seems pretty complicated. But I can see that all other HCDs seem to call usb_hcd_resume_root_hub() from their interrupt handlers, which we don't. There's also a usb_hcd_start_port_resume() in EHCI which I'm not familiar with, that seems to have been added recently. And finally, it seems that all normal host controllers (UHCI/OHCI/EHCI/XHCI) now do the usb_hcd->uses_new_polling thing (where you're supposed to call hcd_poll_rh_status() from the HCD code)... the old polling code still seems to be in place, but without any relevant driver using I wouldn't be so sure if it's still functional. +Alan who should know HCD/core interactions much better and might have some ideas what the DWC2 driver is still missing right now. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/