libpayload: usb: Reset ohci controller when trying to shutdown ohci

Currently we just disabled ohci interrupts when calling ohci_shutdown,
Which would not actually shutdown the ohci controller, for example it
may still written the increased HccaFrameNumber to Hcca buffer.

Perform a soft reset to ohci controller as the linux kernel ohci-hcd
driver does.

BUG=chrome-os-partner:60996
BRANCH=None
TEST=Checked on gru, no more "BUG: Bad page state" error in kernel.

Change-Id: I3f192aea627ba2fa69533bc0a4270466ca18f2a7
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/426338
Reviewed-by: Douglas Anderson <dianders@chromium.org>
This commit is contained in:
Jeffy Chen 2016-12-23 13:52:07 +08:00 committed by chrome-bot
commit 4749fc82fd

View file

@ -268,6 +268,7 @@ ohci_shutdown (hci_t *controller)
return;
detach_controller (controller);
ohci_stop(controller);
ohci_reset(controller);
free (OHCI_INST (controller)->hcca);
free ((void *)OHCI_INST (controller)->periodic_ed);
free (OHCI_INST (controller));