libpayload: usb: dwc2: fix hub hot-plug bug

When disconnect is detected in dwc2_split_transfer() the split
configuration registers should be cleared before return.

BRANCH=None
BUG=chrome-os-partner:44534
TEST=On Jerry, usb hot plug works with devices behind hubs

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 37594d8b4490b6d393d19d17d8e497db7de8817d
Original-Change-Id: Ie1eecec067305874513c6ceb95df4240dc393cd6
Original-Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/295625
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Original-Commit-Queue: Lin Huang <hl@rock-chips.com>
Original-Tested-by: Lin Huang <hl@rock-chips.com>
Original-(cherry picked from commit d543e14cdc73bd549dd553c8d1d07672a1307981)
Original-Reviewed-on: https://chromium-review.googlesource.com/299700
Original-Commit-Ready: David Hendricks <dhendrix@chromium.org>
Original-Tested-by: David Hendricks <dhendrix@chromium.org>

Change-Id: Ib4604097743f2f9d763b29ee27f3bc1788a85a62
Reviewed-on: http://review.coreboot.org/11661
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Yunzhi Li 2015-08-28 09:43:44 +08:00 committed by Patrick Georgi
parent 52a92606bb
commit a881000cd1
1 changed files with 4 additions and 2 deletions

View File

@ -323,8 +323,10 @@ dwc2_split_transfer(endpoint_t *ep, int size, int pid, ep_dir_t dir,
do {
hfnum.d32 = readl(&reg->host.hfnum);
if (dwc2_disconnected(ep->dev->controller))
return -HCSTAT_DISCONNECTED;
if (dwc2_disconnected(ep->dev->controller)) {
ret = -HCSTAT_DISCONNECTED;
goto out;
}
} while (hfnum.frnum % 8 != 0);
/* Handle Start-Split */