diff mbox

usb: host: ehci-tegra: request deferred probe when failing to get phy

Message ID 1419416190-4321-1-git-send-email-vinceh@nvidia.com
State Rejected, archived
Headers show

Commit Message

Vince Hsu Dec. 24, 2014, 10:16 a.m. UTC
The commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on
failure") changed the condition to return -EPROBE_DEFER to host driver.
Originally the Tegra host driver depended on the returned -EPROBE_DEFER to
get the phy device later when booting. Now we have to do that explicitly.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
---
Hi,

This fixes a regression found on 3.19-rc1. The USB host can't be probed and
the USB failed on Jetson TK1.

Thanks,
Vince


 drivers/usb/host/ehci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomeu Vizoso Jan. 5, 2015, 2:12 p.m. UTC | #1
On 24 December 2014 at 11:16, Vince Hsu <vinceh@nvidia.com> wrote:
> The commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on
> failure") changed the condition to return -EPROBE_DEFER to host driver.
> Originally the Tegra host driver depended on the returned -EPROBE_DEFER to
> get the phy device later when booting. Now we have to do that explicitly.

With this patch, USB works again on this nyan-blaze board.

Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Thanks,

Tomeu

> Signed-off-by: Vince Hsu <vinceh@nvidia.com>
> ---
> Hi,
>
> This fixes a regression found on 3.19-rc1. The USB host can't be probed and
> the USB failed on Jetson TK1.
>
> Thanks,
> Vince
>
>
>  drivers/usb/host/ehci-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
> index 19a9af1b4d74..ff9af29b4e9f 100644
> --- a/drivers/usb/host/ehci-tegra.c
> +++ b/drivers/usb/host/ehci-tegra.c
> @@ -451,7 +451,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
>
>         u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0);
>         if (IS_ERR(u_phy)) {
> -               err = PTR_ERR(u_phy);
> +               err = -EPROBE_DEFER;
>                 goto cleanup_clk_en;
>         }
>         hcd->usb_phy = u_phy;
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 19a9af1b4d74..ff9af29b4e9f 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -451,7 +451,7 @@  static int tegra_ehci_probe(struct platform_device *pdev)
 
 	u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0);
 	if (IS_ERR(u_phy)) {
-		err = PTR_ERR(u_phy);
+		err = -EPROBE_DEFER;
 		goto cleanup_clk_en;
 	}
 	hcd->usb_phy = u_phy;