mbox series

[0/2] ARM: sunxi: Fix USB host init fail on v5.1-rc1

Message ID 20190322085108.18693-1-wens@kernel.org (mailing list archive)
Headers show
Series ARM: sunxi: Fix USB host init fail on v5.1-rc1 | expand

Message

Chen-Yu Tsai March 22, 2019, 8:51 a.m. UTC
From: Chen-Yu Tsai <wens@csie.org>

Hi everyone,

As previously reported [1], USB EHCI/OHCI hosts are broken on Allwinner
SoCs on v5.1-rc1. This is partially triggered by commit b97a31348379
("usb: core: comply to PHY framework"), and partially due to how the
Allwinner USB PHY driver handles phy_set_mode for non-OTG PHYs.

This series fixes this in both places.

Patch 1 makes phy-sun4i-usb accept PHY_MODE_USB_HOST for non-OTG PHYs.

Patch 2 makes the usb core fall back to setting the mode
PHY_MODE_USB_HOST if set_mode with PHY_MODE_USB_HOST_SS fails. If that
fails then the failure path is the same as before. This should make it
so existing USB 3.0 drivers are affected.

The patches don't have any dependencies on each other, and could go in
through separate branches. However this affects usability of USB input
devices and Ethernet dongles, I'd rather they go in sooner than later.

Regards
ChenYu


[1] https://lkml.org/lkml/2019/3/18/74

Chen-Yu Tsai (2):
  phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs
  usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode
    fails

 drivers/phy/allwinner/phy-sun4i-usb.c | 5 ++++-
 drivers/usb/core/hcd.c                | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Maxime Ripard March 22, 2019, 9:05 a.m. UTC | #1
On Fri, Mar 22, 2019 at 04:51:06PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
>
> Hi everyone,
>
> As previously reported [1], USB EHCI/OHCI hosts are broken on Allwinner
> SoCs on v5.1-rc1. This is partially triggered by commit b97a31348379
> ("usb: core: comply to PHY framework"), and partially due to how the
> Allwinner USB PHY driver handles phy_set_mode for non-OTG PHYs.
>
> This series fixes this in both places.
>
> Patch 1 makes phy-sun4i-usb accept PHY_MODE_USB_HOST for non-OTG PHYs.
>
> Patch 2 makes the usb core fall back to setting the mode
> PHY_MODE_USB_HOST if set_mode with PHY_MODE_USB_HOST_SS fails. If that
> fails then the failure path is the same as before. This should make it
> so existing USB 3.0 drivers are affected.
>
> The patches don't have any dependencies on each other, and could go in
> through separate branches. However this affects usability of USB input
> devices and Ethernet dongles, I'd rather they go in sooner than later.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Greg KH March 26, 2019, 7:49 a.m. UTC | #2
On Fri, Mar 22, 2019 at 04:51:06PM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Hi everyone,
> 
> As previously reported [1], USB EHCI/OHCI hosts are broken on Allwinner
> SoCs on v5.1-rc1. This is partially triggered by commit b97a31348379
> ("usb: core: comply to PHY framework"), and partially due to how the
> Allwinner USB PHY driver handles phy_set_mode for non-OTG PHYs.
> 
> This series fixes this in both places.
> 
> Patch 1 makes phy-sun4i-usb accept PHY_MODE_USB_HOST for non-OTG PHYs.
> 
> Patch 2 makes the usb core fall back to setting the mode
> PHY_MODE_USB_HOST if set_mode with PHY_MODE_USB_HOST_SS fails. If that
> fails then the failure path is the same as before. This should make it
> so existing USB 3.0 drivers are affected.
> 
> The patches don't have any dependencies on each other, and could go in
> through separate branches. However this affects usability of USB input
> devices and Ethernet dongles, I'd rather they go in sooner than later.

I'll take them both now, thanks.

greg k-h