On Wed, Dec 17, 2014 at 09:34:48AM -0800, Greg Kroah-Hartman wrote: > On Wed, Dec 17, 2014 at 09:30:03AM +0100, Thierry Reding wrote: > > On Thu, Dec 04, 2014 at 01:06:07PM +0100, Thierry Reding wrote: > > > From: Thierry Reding <treding@xxxxxxxxxx> > > > > > > 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@xxxxxxxxxx> > > > --- > > > drivers/usb/phy/phy.c | 14 ++++++++++---- > > > 1 file changed, 10 insertions(+), 4 deletions(-) > > > > Ping? > > It's the middle of the merge window, we can't do anything until 3.19-rc1 > is out at the earliest. This fixes a regression that was introduced in commit 1290a958d48e which has been merged for v3.19-rc1, so this really should go in as soon as possible. I brought this up around the time of v3.18-rc5 and it's a shame it's been broken for so long. Thierry
Attachment:
pgpme75CEISOL.pgp
Description: PGP signature