Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbcD0Fbl (ORCPT ); Wed, 27 Apr 2016 01:31:41 -0400 Received: from mga11.intel.com ([192.55.52.93]:27942 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbcD0Fbj (ORCPT ); Wed, 27 Apr 2016 01:31:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,540,1455004800"; d="asc'?scan'208";a="953773645" From: Felipe Balbi To: Jisheng Zhang , mathias.nyman@intel.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, yendapally.reddy@broadcom.com, Jisheng Zhang , Maxime Ripard , Mathias Nyman Subject: Re: [RESEND PATCH v2 2/7] usb: xhci: plat: attach the usb_phy to the correct hcd In-Reply-To: <1461675460-2295-3-git-send-email-jszhang@marvell.com> References: <1461675460-2295-1-git-send-email-jszhang@marvell.com> <1461675460-2295-3-git-send-email-jszhang@marvell.com> User-Agent: Notmuch/0.21+96~g9bbc54b (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Wed, 27 Apr 2016 08:29:34 +0300 Message-ID: <87potbpqkh.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3757 Lines: 117 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, (Cc authors and maintainer, otherwise you're patch might be forgotten ;-) Jisheng Zhang writes: > Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the > usb_phy for usb3, but it attached the usb_phy to incorrect hcd. The where did you see that's the USB3 phy ? I can't see it. > xhci->shared_hcd is the hcd for usb3, this patch fixes this issue > by attach the usb_phy to the xhci->shared_hcd. Fixes: 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") Cc: Signed-off-by: Jisheng Zhang > --- > drivers/usb/host/xhci-plat.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index 8cb46cb..9ff89e9 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -144,6 +144,7 @@ static int xhci_plat_probe(struct platform_device *pd= ev) > struct resource *res; > struct usb_hcd *hcd; > struct clk *clk; > + struct usb_phy *usb_phy; > int ret; > int irq; >=20=20 > @@ -231,17 +232,18 @@ static int xhci_plat_probe(struct platform_device *= pdev) > if (HCC_MAX_PSA(xhci->hcc_params) >=3D 4) > xhci->shared_hcd->can_do_streams =3D 1; >=20=20 > - hcd->usb_phy =3D devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); > - if (IS_ERR(hcd->usb_phy)) { > - ret =3D PTR_ERR(hcd->usb_phy); > + usb_phy =3D devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); > + if (IS_ERR(usb_phy)) { > + ret =3D PTR_ERR(usb_phy); > if (ret =3D=3D -EPROBE_DEFER) > goto put_usb3_hcd; > - hcd->usb_phy =3D NULL; > + usb_phy =3D NULL; > } else { > - ret =3D usb_phy_init(hcd->usb_phy); > + ret =3D usb_phy_init(usb_phy); > if (ret) > goto put_usb3_hcd; > } > + xhci->shared_hcd->usb_phy =3D usb_phy; >=20=20 > ret =3D usb_add_hcd(hcd, irq, IRQF_SHARED); > if (ret) > @@ -258,7 +260,7 @@ dealloc_usb2_hcd: > usb_remove_hcd(hcd); >=20=20 > disable_usb_phy: > - usb_phy_shutdown(hcd->usb_phy); > + usb_phy_shutdown(usb_phy); >=20=20 > put_usb3_hcd: > usb_put_hcd(xhci->shared_hcd); > @@ -280,7 +282,7 @@ static int xhci_plat_remove(struct platform_device *d= ev) > struct clk *clk =3D xhci->clk; >=20=20 > usb_remove_hcd(xhci->shared_hcd); > - usb_phy_shutdown(hcd->usb_phy); > + usb_phy_shutdown(xhci->shared_hcd->usb_phy); >=20=20 > usb_remove_hcd(hcd); > usb_put_hcd(xhci->shared_hcd); > --=20 > 2.8.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXIE4/AAoJEIaOsuA1yqREikwP/jreuTUKdaItVnYMp7TJFpC6 ajDeJi5v8xP/610iBtSzLbmeMWc0zYnOxQ1z9DT/OVjhIsGeVFGoTOT4ZCM2cMbY turw0ddzAywwVlkiXDOng64NxKMRTpABleJC6WiRMGtQ4cevK+cXXYWK2Vxm4V5R uqhf/zFbcOUeq+z8VNazq44QzdgecIkelYijWluvNDf131TlCjYnPK+FT9xk/FCx pT+0UpewidicpGWcPKUT43PsYUT/wHwxM5Y+M4KPsTOCKsmFmGmNnJ25BkXvCnLl /E1LzMEC9hTeqJwl3IlAKZL2hLmAv4JVPsu5YDYovOSF8tB1tAWSiWMENexiF3Y5 CfH7XeCUKVFhi3ssdZpXyDqohzuK/yJfDLSZDGGp/ea9Qz4Y2t9ZwRtg+c9aFkfL 8OkBuUx2NKupkX005/T7071t6OInpfXMkHJWqzY45n0se5+yDMgPRPqDNojkEYV/ +G2+T5MhwPuGzXpCJ/NO9UXZroVQrT/pTloWRQNO56O7ICxZDqfUYp+P3+zVyvpY OnUeuUHDTTXEqO8mRqIdeNxj3p9tIIST3UURMcPjsXdIv7haRxRt+52yHwsFs1+R o3wxTJHhRCPaqlR2uHgwmQQ/DY1g7UdX4E9K9VWZ4G+GOoaNOQab6DBGPoWrTWGC ZpVZhr7Nx7iXpMRUyJbN =u9NH -----END PGP SIGNATURE----- --=-=-=--