]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
phy: phy-brcm-usb-init: DRD mode can cause crash on startup
authorAl Cooper <al.cooper@broadcom.com>
Wed, 27 Dec 2017 19:28:51 +0000 (14:28 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 21 Mar 2018 16:40:46 +0000 (13:40 -0300)
commitff3d28fdbb88958e468f5c926e81d77666475d87
treebfce6fcf9d023f31cf438d3410fb47919b93a1ec
parent896242728ec019a2e3d71ef338c0263347c0b004
phy: phy-brcm-usb-init: DRD mode can cause crash on startup

BugLink: http://bugs.launchpad.net/bugs/1757465
commit 0aa0c12262fd848c48448c39ff6c1c097be00dd4 upstream.

This is caused by a bug in the BDC core. When the BDC core comes
out of reset and it's not selected, it gets a backup clock. When
the BDC core is selected, it get's the main clock. If HOST mode
is then selected the BDC core has the main clock shut off but
the backup clock is not restored.

The failure scenario and cause are as follows:
- DRD mode is active
- Device mode is selected first in bootloader
- When host mode is now selected, the clock to the BDC is cut off.
- BDC registers are inaccessible and therefore the BDC driver
  crashes upon Linux boot.

The fix is to have the phy driver always force a BDC reset on
startup.

Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver")
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/phy/broadcom/phy-brcm-usb-init.c