diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2018-04-18 21:39:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-22 15:01:30 +0200 |
commit | fec94445db7777c65b0a681b8dc0ed2532304d2a (patch) | |
tree | 7a218a6ecacd9b2d56fe133eb8e6e6497ef9b325 /fs/squashfs | |
parent | f0e36d478faf37fb26413b2530d04e6b30af3834 (diff) | |
download | linux-fec94445db7777c65b0a681b8dc0ed2532304d2a.tar.gz linux-fec94445db7777c65b0a681b8dc0ed2532304d2a.tar.bz2 linux-fec94445db7777c65b0a681b8dc0ed2532304d2a.zip |
usb: core: phy: make it a no-op if CONFIG_GENERIC_PHY is disabled
If the generic PHY support is disabled the stub of devm_of_phy_get_by_index
returns ENOSYS. This corner case isn't handled properly by
usb_phy_roothub_add_phy and at least breaks USB support on Raspberry Pi
(bcm2835_defconfig):
dwc2 20980000.usb: dwc2_hcd_init() FAILED, returning -38
dwc2: probe of 20980000.usb failed with error -38
Let usb_phy_roothub_alloc() return in case CONFIG_GENERIC_PHY is
disabled to fix this issue (compilers might even be smart enough to
optimize away most of the code within usb_phy_roothub_alloc and
usb_phy_roothub_add_phy if CONFIG_GENERIC_PHY is disabled). All
existing usb_phy_roothub_* functions are already NULL-safe, so no
special handling is required there.
Fixes: 07dbff0ddbd8 ("usb: core: add a wrapper for the USB PHYs on the HCD")
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/squashfs')
0 files changed, 0 insertions, 0 deletions