usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode fails
Some PHYs do not support PHY_MODE_USB_HOST_SS, i.e. USB 3.0 or higher.
Fall back and try the more generic PHY_MODE_USB_HOST if it fails.
Fixes: b97a313483
("usb: core: comply to PHY framework")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1396929e8a
commit
e671765e52
|
@ -2741,6 +2741,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
|
|||
|
||||
retval = usb_phy_roothub_set_mode(hcd->phy_roothub,
|
||||
PHY_MODE_USB_HOST_SS);
|
||||
if (retval)
|
||||
retval = usb_phy_roothub_set_mode(hcd->phy_roothub,
|
||||
PHY_MODE_USB_HOST);
|
||||
if (retval)
|
||||
goto err_usb_phy_roothub_power_on;
|
||||
|
||||
|
|
Loading…
Reference in New Issue