From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932498AbdJXJgT (ORCPT ); Tue, 24 Oct 2017 05:36:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:46394 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbdJXJfg (ORCPT ); Tue, 24 Oct 2017 05:35:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,427,1503385200"; d="asc'?scan'208";a="1028653605" From: Felipe Balbi To: Manu Gautam Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , open list Subject: Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume In-Reply-To: References: <1506511163-26026-1-git-send-email-mgautam@codeaurora.org> Date: Tue, 24 Oct 2017 12:35:02 +0300 Message-ID: <877evkhos9.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Manu Gautam writes: > Hi Felipe, > > Let me know if patches in this series look fine to you. It does, I just don't have means to test this as intel's platform doesn't give SW access to PHYs. I was hoping someone from TI would give a tested-by, but it's too late. We'll just take this series and fix any possible bugs during the =2Drc cycle. Just one question below > On 9/27/2017 4:49 PM, Manu Gautam wrote: >> Driver powers-off PHYs and reinitializes DWC3 core and gadget on >> resume. While this works fine for gadget mode but in host >> mode there is not re-initialization of host stack. Also, resetting >> bus as part of bus_suspend/resume is not correct which could affect >> (or disconnect) connected devices. >> Fix this by not reinitializing core on suspend/resume in host mode >> for HOST only and OTG/drd configurations. >> >> Signed-off-by: Manu Gautam >> --- >> drivers/usb/dwc3/core.c | 43 ++++++++++++++++++++----------------------- >> 1 file changed, 20 insertions(+), 23 deletions(-) >> >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> index 03474d3..f75613f 100644 >> --- a/drivers/usb/dwc3/core.c >> +++ b/drivers/usb/dwc3/core.c >> @@ -927,6 +927,7 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) >>=20=20 >> switch (dwc->dr_mode) { >> case USB_DR_MODE_PERIPHERAL: >> + dwc->current_dr_role =3D DWC3_GCTL_PRTCAP_DEVICE; seems like this could be done inside dwc3_set_prtcap(), no? We can do that as a separate patch too. No issues. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlnvCUgACgkQzL64meEa mQYLhg/9FQ3sWXDRpniRq0hVtPJlqbFDgPAVfmoQxSZfivuLggfJx+0Q7+IBdDEL Zmh2clEvoVO6lz37Mv1lzpwlogTlpuKTLsyrOOWN8WcI/grF4MXHKshps6Uzhzq3 bIkknRheRp+8nrs/RAeUGBYDLdQb5rMPXrPVWwB9mUK2KTuy4mA4KjiApAvQxy5L dkyChCp22ur77algs2ijgCB/ZFaUzILb96tB4yijAJkvlvAkiljiMpjMj2Eivbjq C+VrYNGfzDL28Nv1qtlF+w0t7EGir78ZDLVNIs61/P8UtQXPmi/op24WnIKFSgRS /oE43ndvakxC9gHLPJ3SYzQbI/QLe+tQEC6EMbFiWx9YCLX63zjWSnSTbO/8YYBo gUStoyGY8aViJvFZPlwRA57jV5vfCZrHc2wnmm+HjHidDbbuuDqAY7GE/Qbxrttz mVBE9hD9VqBpbbVYsmahq72sWTKhrqhJrIjOxqPBTgYEZrGQGW5t/4vbZKtSI1GA iv29rw6FkbajvsQmdLCeTzdpmvzjEmgz0cVi0IMUMrcDUuY7qT/vx9b1XA5dSww2 rhfoFYRj7G07OC1MTvatVjwQRN4ggZHHuI6/ITeJeuME0enYyKWF0qArbJDuieLe PQst3x4/bkGwY5SOG0anjY+KCxsuMQZFcmPhfZTdxST+rKSNXGs= =yDoH -----END PGP SIGNATURE----- --=-=-=--