From: Felipe Balbi <balbi@ti.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: phy: Restore deferred probing path
Date: Tue, 23 Dec 2014 12:36:33 -0600 [thread overview]
Message-ID: <20141223183633.GH9147@saruman> (raw)
In-Reply-To: <1417694767-18848-1-git-send-email-thierry.reding@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
On Thu, Dec 04, 2014 at 01:06:07PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on
> failure") broke platforms that rely on deferred probing to order probing
> of PHY and host controller drivers. The reason is that the commit simply
> propagates errors from __of_usb_find_phy(), which returns -ENODEV if no
> PHY has been registered yet for a given device tree node. The only case
> in which -EPROBE_DEFER would now be returned is if try_module_get() did
> fail, which does not make sense.
>
> The correct thing to do is to return -EPROBE_DEFER if a PHY hasn't been
> registered yet. The only condition under which it makes sense to return
> -ENODEV is if the device tree node representing the PHY has been
> disabled (via the status property) because in that case the PHY will
> never be registered.
>
> This patch addresses the problem by making __of_usb_find_phy() return an
> appropriate error code while keeping in line with the above-mentioned
> commit to propagate error codes rather than overwriting them. At the
> same time the check for a valid PHY is decoupled from the check for the
> try_module_get() call and a separate error code is returned if the
> latter fails.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
you forgot to add the magic "Fixes: foo bar" here, I'll add it this
time, but I've already sent my -rc2 pull request, so this will only show
up on -rc3.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-23 18:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 12:06 [PATCH] usb: phy: Restore deferred probing path Thierry Reding
2014-12-04 12:23 ` Sergei Shtylyov
2014-12-04 13:22 ` Thierry Reding
2014-12-04 13:35 ` Sergei Shtylyov
2014-12-17 8:30 ` Thierry Reding
2014-12-17 17:34 ` Greg Kroah-Hartman
2014-12-18 8:28 ` Thierry Reding
2014-12-23 18:36 ` Felipe Balbi [this message]
2015-01-05 19:33 ` Stephen Warren
2015-01-06 10:19 ` Thierry Reding
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=20141223183633.GH9147@saruman \
--to=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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