
On 29.01.2021 01:56, Jan Palus wrote:
On 28.01.2021 23:28, Jan Palus wrote:
FWIW I figured it hangs in ohci-hcd.c at:
static int hc_reset(ohci_t *ohci) ... if (ohci_readl(&ohci->regs->control) & OHCI_CTRL_IR) {
This appears to be caused by following events:
- usb_stop() (usb-class.c) iterates to remove every bus
- starts with ehci and goes all the way to ehci_shutdown_phy()
- there it calls generic_phy_exit() ending in rockchip_usb2phy_exit()
- where at last it disables clock with clk_disable() (rk3399_clk_disable())
After disabling clock ohci_readl(&ohci->regs->control) starts to hang so perhaps it shouldn't be disabled until ohci is removed.
Looks like that's as far as I can go by myself. Perhaps the solution could be CCF which appears to enable usage count tracking and prevents disabling clock if it still has more users. Or perhaps EHCI/OHCI should not be removed independently but instead one single remove should be issued for usb2phy. Can't really tell.
In the meantime on Pinebook Pro more convenient workaround than suggested disabling OHCI, is to rather disable EHCI. This way internal keyboard works and boot process is still fine. I suppose external keyboard wouldn't work then though.