public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] usb: phy: Fix deferred probing
Date: Thu, 8 Jan 2015 12:09:08 -0600	[thread overview]
Message-ID: <20150108180908.GO31926@saruman> (raw)
In-Reply-To: <20150108180417.GB17281@ulmo.nvidia.com>

On Thu, Jan 08, 2015 at 07:04:18PM +0100, Thierry Reding wrote:
> On Thu, Jan 08, 2015 at 11:24:11AM -0600, Felipe Balbi wrote:
> > * PGP Signed by an unknown key
> > 
> > On Thu, Jan 08, 2015 at 06:32:27PM +0200, Grygorii.Strashko at linaro.org wrote:
> > > Hi,
> > > 
> > > On 01/07/2015 06:41 AM, Olof Johansson wrote:
> > > > On Tue, Jan 6, 2015 at 7:45 AM, Maxime Ripard
> > > > <maxime.ripard@free-electrons.com> wrote:
> > > >> Commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on
> > > >> failure") actually broke the deferred probing mechanism, since it now returns
> > > >> EPROBE_DEFER only when the try_module_get call fails, but not when the phy
> > > >> lookup does.
> > > >>
> > > >> All the other similar functions seem to return ENODEV when try_module_get
> > > >> fails, and the error code of either __usb_find_phy or __of_usb_find_phy
> > > >> otherwise.
> > > >>
> > > >> In order to have a consistent behaviour, and a meaningful EPROBE_DEFER, always
> > > >> return EPROBE_DEFER when __(of_)usb_find_phy fails to look up the requested
> > > >> phy, that will be propagated by the caller, and ENODEV if try_module_get fails.
> > > >>
> > > > 
> > > > Fixes:  1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error
> > > > on failure")
> > > > 
> > > >> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > > > 
> > > > This also fixes USB on tegra/trimslice here.
> > > > 
> > > > Tested-by: Olof Johansson <olof@lixom.net>
> > > > 
> > > > Given that the regression went in during 3.19 merge window, this
> > > > should go in as a fix during -rc, please.
> > > 
> > > 1) Pls note, there is a duplication patch https://www.mail-archive.com/linux-usb at vger.kernel.org/msg53893.html
> > > but this one is more correct as for me. 
> > > 
> > > 2) This patch fixes USB regression on Keystone 2, so
> > > 
> > >  Tested-by: Grygorii Strashko <grygorii.strashko@linaro.org>
> > 
> > Are we asking that I drop Thierry's Patch or just apply the other hunks?
> 
> The above doesn't like to my patch. The original is here:
> 
> 	http://www.spinics.net/lists/linux-usb/msg118358.html
> 
> That has the advantage of also handling the case where the PHY provider
> is disabled and will therefore never become available, thus preventing
> infinite deferred probe.
> 
> My patch doesn't handle the non-OF case, though I'm not sure that
> it's safe to defer probe for those, since we don't have any indication
> that the probe will ever succeed. In that case it might actually be
> better to keep returning -ENODEV. Also the change to __usb_find_phy() is
> unrelated to the commit that causes the regression, so if we want to
> defer probe in that case, too it might be better to do so in a separate
> patch.

my thoughts exactly. I'll send your patch and expect another patch for
3.20 for the other case. Thanks

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150108/daf33c2e/attachment-0001.sig>

  reply	other threads:[~2015-01-08 18:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 15:45 [PATCH 0/4] ARM: mvebu: Enable XHCI on the A385-AP Maxime Ripard
2015-01-06 15:45 ` [PATCH 1/4] usb: phy: Fix deferred probing Maxime Ripard
2015-01-07  4:41   ` Olof Johansson
2015-01-08 16:32     ` Grygorii.Strashko@linaro.org
2015-01-08 17:24       ` Felipe Balbi
2015-01-08 18:04         ` Thierry Reding
2015-01-08 18:09           ` Felipe Balbi [this message]
2015-01-06 15:45 ` [PATCH 2/4] usb: XHCI: platform: Move the Marvell quirks after the enabling the clocks Maxime Ripard
2015-01-06 15:58   ` Thomas Petazzoni
2015-01-06 15:45 ` [PATCH 3/4] usb: xhci: plat: Add USB phy support Maxime Ripard
2015-01-06 19:39   ` Sergei Shtylyov
2015-01-06 15:45 ` [PATCH 4/4] ARM: mvebu: armada-385-ap: Enable USB3 port Maxime Ripard

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=20150108180908.GO31926@saruman \
    --to=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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