From: Neil Armstrong <narmstrong@baylibre.com>
To: Chen-Yu Tsai <wens@kernel.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kishon Vijay Abraham I <kishon@ti.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
Grygorii Strashko <grygorii.strashko@ti.com>,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>
Subject: Re: [PATCH 2/2] usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode fails
Date: Fri, 22 Mar 2019 13:56:19 +0100 [thread overview]
Message-ID: <aefd56fe-8478-453c-eb57-fcae6d0a5b40@baylibre.com> (raw)
In-Reply-To: <20190322085108.18693-3-wens@kernel.org>
On 22/03/2019 09:51, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
>
> Some PHYs do not support PHY_MODE_USB_HOST_SS, i.e. USB 3.0 or higher.
> Fall back and try the more generic PHY_MODE_USB_HOST if it fails.
>
> Fixes: b97a31348379 ("usb: core: comply to PHY framework")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> drivers/usb/core/hcd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index 3189181bb628..975d7c1288e3 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -2741,6 +2741,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
>
> retval = usb_phy_roothub_set_mode(hcd->phy_roothub,
> PHY_MODE_USB_HOST_SS);
> + if (retval)
> + retval = usb_phy_roothub_set_mode(hcd->phy_roothub,
> + PHY_MODE_USB_HOST);
> if (retval)
> goto err_usb_phy_roothub_power_on;
>
>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
This fixes USB on Amlogic GXL/GXL, tested on a Nexbox A1 with a S912 SoC running v5.1-rc1
Error was :
[ 4.851477] phy phy-d0078080.phy.3: unsupported PHY mode 5
[ 4.856266] xhci-hcd: probe of xhci-hcd.0.auto failed with error -22
Neil
next prev parent reply other threads:[~2019-03-22 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 8:51 [PATCH 0/2] ARM: sunxi: Fix USB host init fail on v5.1-rc1 Chen-Yu Tsai
2019-03-22 8:51 ` [PATCH 1/2] phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs Chen-Yu Tsai
2019-03-22 8:51 ` [PATCH 2/2] usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode fails Chen-Yu Tsai
2019-03-22 12:56 ` Neil Armstrong [this message]
2019-03-22 9:05 ` [PATCH 0/2] ARM: sunxi: Fix USB host init fail on v5.1-rc1 Maxime Ripard
2019-03-26 7:49 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aefd56fe-8478-453c-eb57-fcae6d0a5b40@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=grygorii.strashko@ti.com \
--cc=kishon@ti.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=wens@csie.org \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).