Received: by 10.223.176.46 with SMTP id f43csp833605wra; Fri, 19 Jan 2018 02:43:07 -0800 (PST) X-Google-Smtp-Source: ACJfBotqodxNNCt9xMZEWc+BUbMBgfV/DfUjLP3BSYpEwpqhoiOXcGeZkB6I3Iocy/rmGwxpIpMY X-Received: by 10.99.176.76 with SMTP id z12mr17016471pgo.405.1516358587534; Fri, 19 Jan 2018 02:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516358587; cv=none; d=google.com; s=arc-20160816; b=Nddo5qZ/uCxv3D0h7sfj3Kqd5A0SrlzCNiTWTOa8h1VPGUZgz7Corfpl/zF7/n2hmn apiWreofyVnZlOs9rXfbkNSv6J9Sp1OFZ30wEHKfvfFgVjFVZthHf4o/xkCRm13HTOi7 VD1yEoxXAXSMYl40qU+CknPfvOZ0i8LBm6ZFPMli8ceAgppMU2Q2H9nW9C9m2Houhyqv igEPZ/1dxDnpEVfwNXQFdxJ6mV/C3fjnpiZONOYr5W/lm0ch8ihvh+wJ3FekfBC3DRZK y7UniyRzF27BdQuZbxupwj93ARi91qTYyND5SHywobUCRyaTYWV2i5J4O/XDhcQ4UMRO EKlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=ksYVEJtxcCpRBCD8JP6x8ccO384hKV0zy7K88vTOsvw=; b=guLe7Ji0N2+crN2DPF/YfbMysBytv73zh2958o5ZFdY2AAiUA6akVUwvEvYF83TiCQ zS+mgioTj8GSTRIOLB4r3Zk4DNic/dYqD9JnuKH1Lf8yjwOJFLKUZliYlan/hziOE4zC zl0mwipZFGNaA2+1AyCJu9Nm0pTbz6gS9PR7/VWyQcfKuat5J98jobhECmgmYylJrTyb 3fMxBD1yvLxpUfVZA2339rovTyiEPqYvB6M+Fb5G0cYhCPJmf+QRYlsGsBf7St2u/kUD 4tf4o0NUPAzaGJokO2dNtolTImdVidJnut6RjgCANXkIfqzUYJ1xgwlpu4seB4JZ6B4m q69A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t83si8986769pfi.53.2018.01.19.02.42.53; Fri, 19 Jan 2018 02:43:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932208AbeASKlE (ORCPT + 99 others); Fri, 19 Jan 2018 05:41:04 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:61237 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754873AbeASKkz (ORCPT ); Fri, 19 Jan 2018 05:40:55 -0500 Received: from [192.168.178.51] ([109.104.37.234]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MJZeR-1eewzV07Wl-0038X5; Fri, 19 Jan 2018 11:35:18 +0100 Subject: Re: [PATCH] phy: work around 'phys' references to usb-nop-xceiv devices To: Rob Herring , Arnd Bergmann , Greg Kroah-Hartman Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Florian Fainelli , Felipe Balbi , John Youn , "linux-kernel@vger.kernel.org" , stable , Kishon Vijay Abraham I , Eric Anholt , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , Andrzej Pietrasiewicz , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" References: <20180112101223.3661181-1-arnd@arndb.de> From: Stefan Wahren Message-ID: Date: Fri, 19 Jan 2018 11:35:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: de-DE X-Provags-ID: V03:K0:ajoD8XT4f8Dbdh2r84oUtJi2rCvBziUdjyAhMPHwthxDPnw9y8r uuAGFFlKFcGVpsvwlBoUAPc9ExPj+bz+dyw56pvqUDDxV9yWpEEwnM1kHkV2yFqkGeumoZw 4kYb6nVzCgdQ2P5j/XTUePx2eZPAtFSnySXW7ysqMB4+Aso3Q3iwk6Y+EJL3hjScKM6oA4n 4iCy3oe05RDYrHeLLdErQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:aeKhT+w+FYA=:BAbL9i+SUsGkFMzQGA3xmN 4NZceoTy3ethGovIphvLwAPh0SFBjA5B1KDQkgrzDs0gDh8YJXs1f2duaUkpeG6faCKdQ4yW4 BAmT23XkqJE/qbz/xmKhZPWQTZbhQQy1pV6nPsLp9SNEkZrBt+8c4Z4gzo4ctFVY0MqQBKDtK aq8H9CztvzwaLLT+r3zePeGwXw5yCZ7a2blc2fJwtTEEKEV+08c6awyo/ghwALUe7CHtgWtUW XWCgjv0ZuJkJtQS/+tAkO3cVqwS4/b7Cdj+UtUF+iym3rqq997W8iPg1CJF1P7/AYRbfQjdQ4 /HU/dszZa4pWqcixnFV/AI+1L4x1325JBr0IlpV3ALYLGcv5J1/6fsfoBKIFPqXIA1NQXTyro QJWq5fGP/xW0zgnknENO4t0hkPEZYBODrlP79vE0xHOi2Lw3qW1x7ad7Vmu1fpXZTz5Hzl/SP mRDQX0Wk0WLiS8Y+JgDbD4mmAQgenyIosQI+zBzx2VgI8ip6f/bWpaaEz4/ioon/d2nmcsZKx pSShtr+EPQ4/HCSIwtd98bUIUO8LDUlIoHDBti7FShvuBDEeVRowb+jC3z18SObEXZ6RWZU7K Nlkk2OyAZgRlLKb5JiGY8qyhYa92MAK23PwDWuoEbbjspXsfA8jpFwo6+7H4hxkepGqX8BO0V Vjs5GKDKS/ehXju/bMkD3hS0+2Zn2zx0C8KSWNhKpU+q4IRk8mNvXkrFWSPO1pY8E7etb/WTK Mi9Hif7DB1qRPQKn4kcMfm8w9SltnnqLklP1nPflpjxi8rEeRD5RTMpJp3I= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 12.01.2018 um 20:54 schrieb Rob Herring: > On Fri, Jan 12, 2018 at 4:12 AM, Arnd Bergmann wrote: >> Stefan Wahren reports a problem with a warning fix that was merged >> for v4.15: we had lots of device nodes with a 'phys' property pointing >> to a device node that is not compliant with the binding documented in >> Documentation/devicetree/bindings/phy/phy-bindings.txt >> >> This generally works because USB HCD drivers that support both the generic >> phy subsystem and the older usb-phy subsystem ignore most errors from >> phy_get() and related calls and then use the usb-phy driver instead. >> >> However, it turns out that making the usb-nop-xceiv device compatible with >> the generic-phy binding changes the phy_get() return code from -EINVAL to >> -EPROBE_DEFER, and the dwc2 usb controller driver for bcm2835 now returns >> -EPROBE_DEFER from its probe function rather than ignoring the failure, >> breaking all USB support on raspberry-pi when CONFIG_GENERIC_PHY is >> enabled. The same code is used in the dwc3 driver and the usb_add_hcd() >> function, so a reasonable assumption would be that many other platforms >> are affected as well. >> >> I have reviewed all the related patches and concluded that "usb-nop-xceiv" >> is the only USB phy that is affected by the change, and since it is by far >> the most commonly referenced phy, all the other USB phy drivers appear >> to be used in ways that are are either safe in DT (they don't use the >> 'phys' property), or in the driver (they already ignore -EPROBE_DEFER >> from generic-phy when usb-phy is available). >> >> To work around the problem, this adds a special case to _of_phy_get() >> so we ignore any PHY node that is compatible with "usb-nop-xceiv", >> as we know that this can never load no matter how much we defer. In the >> future, we might implement a generic-phy driver for "usb-nop-xceiv" >> and then remove this workaround. >> >> Since we generally want older kernels to also want to work with the >> fixed devicetree files, it would be good to backport the patch into >> stable kernels as well (3.13+ are possibly affected), even though they >> don't contain any of the patches that may have caused regressions. >> >> Fixes: 014d6da6cb25 ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells >> Fixes: c5bbf358b790 arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv >> Fixes: 44e5dced2ef6 arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv >> Fixes: f568f6f554b8 ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv >> Fixes: d745d5f277bf ARM: dts: imx51-zii-rdu1: Add missing #phy-cells to usb-nop-xceiv >> Fixes: 915fbe59cbf2 ARM: dts: imx: Add missing #phy-cells to usb-nop-xceiv >> Link: https://marc.info/?l=linux-usb&m=151518314314753&w=2 >> Link: https://patchwork.kernel.org/patch/10158145/ >> Cc: stable@vger.kernel.org >> Cc: Stefan Wahren >> Cc: Felipe Balbi >> Cc: Eric Anholt >> Tested-by: Hans Verkuil >> Acked-by: Kishon Vijay Abraham I >> Signed-off-by: Arnd Bergmann >> --- >> Hans tested the earlier version of this patch, I'd like one more >> confirmation from Hans or Stefan (or anyone else) that this version >> addresses the regression as well before this gets merged. >> >> Greg, can you pick this up into usb-linus for v4.15 once the fix >> has been confirmed, or should I merge it through arm-soc? >> --- >> drivers/phy/phy-core.c | 4 ++++ >> 1 file changed, 4 insertions(+) > Thanks for fixing this. > > Acked-by: Rob Herring > > Rob ping ...