linux/drivers
Arnd Bergmann b7563e2796 phy: work around 'phys' references to usb-nop-xceiv devices
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: 014d6da6cb ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells
Fixes: c5bbf358b7 arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv
Fixes: 44e5dced2e arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv
Fixes: f568f6f554 ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv
Fixes: d745d5f277 ARM: dts: imx51-zii-rdu1: Add missing #phy-cells to usb-nop-xceiv
Fixes: 915fbe59cb 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: Felipe Balbi <balbi@kernel.org>
Cc: Eric Anholt <eric@anholt.net>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-01-19 16:12:37 +01:00
..
accessibility License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2017-12-23 13:47:22 -08:00
amba A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
android binder: fix proc->files use-after-free 2017-12-18 15:47:12 +01:00
ata libata: sata_down_spd_limit should return if driver has not recorded sstatus speed 2017-12-04 13:57:03 -08:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-29 13:10:25 -08:00
auxdisplay auxdisplay: img-ascii-lcd: Only build on archs that have IOMEM 2017-11-27 12:36:45 -08:00
base Driver core fixes for 4.15-rc6 2017-12-31 10:50:05 -08:00
bcma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
block null_blk: unalign call_single_data 2017-12-20 13:16:33 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
bus Allwinner fixes for 4.15 2018-01-04 17:06:25 +01:00
cdrom Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
char The big changes for IPMI that just went in had a few problems. These 2017-12-11 17:01:59 -08:00
clk clk: use atomic runtime pm api in clk_core_is_enabled 2017-12-26 17:34:03 -08:00
clocksource - final batch of "non trivial" timer conversions (multi-tree dependencies, 2017-11-23 16:29:05 +01:00
connector
cpufreq cpufreq: governor: Ensure sufficiently large sampling intervals 2017-12-18 12:09:39 +01:00
cpuidle powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
crypto crypto: inside-secure - do not use areq->result for partial results 2017-12-22 19:48:01 +11:00
dax device-dax: implement ->split() to catch invalid munmap attempts 2017-11-29 18:40:42 -08:00
dca
devfreq Merge branches 'pm-devfreq' and 'pm-tools' 2017-11-13 01:41:39 +01:00
dio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma dmaengine: fsl-edma: disable clks on all error paths 2017-12-15 09:53:04 +05:30
dma-buf Tracing updates for 4.15: 2017-11-17 14:58:01 -08:00
edac Modules updates for v4.15 2017-11-15 13:46:33 -08:00
eisa License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extcon USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
firewire Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
firmware efi/capsule-loader: Reinstate virtual capsule mapping 2018-01-03 13:54:31 +01:00
fmc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fpga Char/Misc patches for 4.15-rc1 2017-11-16 09:10:59 -08:00
fsi
gpio genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
gpu drm/i915 fixes for v4.15-rc7 2018-01-05 09:25:01 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2017-12-30 10:16:51 -08:00
hsi HSI changes for the v4.15 series 2017-11-15 13:35:43 -08:00
hv vmbus: unregister device_obj->channels_kset 2017-12-18 15:47:12 +01:00
hwmon hwmon: Deal with errors from the thermal subsystem 2017-12-26 11:53:24 -08:00
hwspinlock hwspinlock update for v4.15 2017-11-17 20:16:20 -08:00
hwtracing tracing: Pass export pointer as argument to ->write() 2017-12-04 07:14:30 -05:00
i2c i2c: piix4: Fix port number check on release 2017-12-12 23:27:04 +01:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2017-11-19 08:04:41 -10:00
idle Merge branch 'pm-cpuidle' 2017-11-13 01:34:14 +01:00
iio iio: health: max30102: Temperature should be in milli Celsius 2017-12-02 11:15:14 +00:00
infiniband Third pull request for 4.15-rc 2017-12-28 23:06:01 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-01-05 16:45:06 -08:00
iommu iommu/arm-smmu-v3: Cope with duplicated Stream IDs 2018-01-02 16:45:51 +00:00
ipack
irqchip genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
isdn treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
leds leds: core: Fix regression caused by commit 2b83ff96f5 2018-01-07 13:27:07 +01:00
lightnvm lightnvm: Convert timers to use timer_setup() 2017-11-21 15:46:44 -08:00
macintosh Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
mailbox Change to POLL api and fixes for FlexRM and OMAP driver 2017-11-15 13:39:18 -08:00
mcb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
md - Fix a particularly nasty DM core bug in a 4.15 refcount_t conversion. 2017-12-15 12:53:37 -08:00
media media fixes for v4.15-rc3 2017-12-08 13:18:47 -08:00
memory ARM: SoC driver updates for v4.15 2017-11-16 16:05:01 -08:00
memstick treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
message Modules updates for v4.15 2017-11-15 13:46:33 -08:00
mfd mfd: rtsx: Release IRQ during shutdown 2018-01-05 11:14:57 +00:00
misc Merge branch 'WIP.x86-pti.base.prep-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-17 13:54:31 -08:00
mmc mmc: core: apply NO_CMD23 quirk to some specific cards 2017-12-11 13:43:27 +01:00
mtd mtd: nand: pxa3xx: Fix READOOB implementation 2018-01-06 23:06:58 +01:00
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-28 23:20:21 -08:00
nfc treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
ntb treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
nubus m68k updates for 4.15 2017-11-13 12:10:24 -08:00
nvdimm libnvdimm, btt: Fix an incompatibility in the log layout 2017-12-21 14:59:27 -08:00
nvme nvme: setup streams after initializing namespace head 2017-12-15 15:18:07 +01:00
nvmem nvmem: meson-mx-efuse: fix reading from an offset other than 0 2017-12-23 16:46:23 +01:00
of of_mdio / mdiobus: ensure mdio devices have fwnode correctly populated 2017-12-13 15:01:47 -05:00
opp
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
parisc parisc: Show unhashed EISA EEPROM address 2018-01-02 21:01:02 +01:00
parport Char/Misc patches for 4.15-rc1 2017-11-16 09:10:59 -08:00
pci Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-31 13:13:56 -08:00
pcmcia drivers/pcmcia/sa1111_badge4.c: avoid unused function warning 2017-11-17 16:10:04 -08:00
perf arm64 updates for 4.15 2017-11-15 10:56:56 -08:00
phy phy: work around 'phys' references to usb-nop-xceiv devices 2018-01-19 16:12:37 +01:00
pinctrl genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
platform platform/x86: dell-wmi: check for kmalloc() errors 2017-12-11 17:26:03 -08:00
pnp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
power power supply and reset changes for the v4.15 series 2017-11-15 13:37:15 -08:00
powercap
pps treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
ps3
ptp xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
pwm pwm: Changes for v4.15-rc1 2017-11-22 21:09:18 -10:00
rapidio Merge branch 'akpm' (patches from Andrew) 2017-11-17 16:56:17 -08:00
ras Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
regulator - New Drivers 2017-11-16 09:15:57 -08:00
remoteproc remoteproc updates for v4.15 2017-11-17 20:14:10 -08:00
reset ARM: SoC driver updates for v4.15 2017-11-16 16:05:01 -08:00
rpmsg rpmsg updates for v4.15 2017-11-17 20:12:08 -08:00
rtc Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-25 08:37:16 -10:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-01-05 12:17:33 -08:00
sbus Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2017-11-17 20:21:44 -08:00
scsi SCSI fixes on 20171230 2017-12-30 14:31:30 -08:00
sfi
sh A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
sn
soc meson-gx-socinfo: Fix package id parsing 2017-11-30 15:29:44 -08:00
spi Merge remote-tracking branches 'spi/fix/armada', 'spi/fix/atmel', 'spi/fix/doc', 'spi/fix/imx', 'spi/fix/rspi', 'spi/fix/sun4i' and 'spi/fix/xilinx' into spi-linus 2017-12-19 11:07:00 +00:00
spmi
ssb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
staging staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device 2017-12-19 15:53:39 +01:00
target block: fix blk_rq_append_bio 2017-12-18 13:55:43 -07:00
tc
tee optee: fix invalid of_node_put() in optee_driver_init() 2017-11-29 10:24:57 +01:00
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2017-11-17 14:31:27 -08:00
thunderbolt thunderbolt: Mask ring interrupt properly when polling starts 2017-12-16 16:37:51 +01:00
tty n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) 2017-12-21 11:19:22 +01:00
uio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usb usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201 2017-12-27 15:24:27 +01:00
uwb treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
vfio VFIO Updates for Linux v4.15 2017-11-14 16:47:47 -08:00
vhost vhost: fix skb leak in handle_rx() 2017-12-02 21:31:03 -05:00
video fbdev changes for v4.15: 2017-11-20 21:50:24 -10:00
virt
virtio virtio_mmio: fix devm cleanup 2017-12-14 21:01:40 +02:00
vlynq
vme Char/Misc patches for 4.15-rc1 2017-11-16 09:10:59 -08:00
w1 Char/Misc patches for 4.15-rc1 2017-11-16 09:10:59 -08:00
watchdog treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
xen xen: fix for 4.15-rc7 2018-01-05 12:15:12 -08:00
zorro License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig Merge branches 'pm-cpufreq-sched' and 'pm-opp' 2017-11-13 01:40:52 +01:00
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2017-11-28 15:17:49 +01:00