summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorYunzhi Li <lyz@rock-chips.com>2015-08-28 09:43:44 +0800
committerPatrick Georgi <pgeorgi@google.com>2015-09-17 14:18:08 +0000
commita881000cd1d5df26f512e4ce7a1a1a6161a8b636 (patch)
treeadb2c0c6d1b48d7874afc47aeb6589c2576de8d4 /payloads
parent52a92606bb594c52da50b8c5dcfc9f9307c481e6 (diff)
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>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/usb/dwc2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/dwc2.c b/payloads/libpayload/drivers/usb/dwc2.c
index 30e00fba64..0941eb64d1 100644
--- a/payloads/libpayload/drivers/usb/dwc2.c
+++ b/payloads/libpayload/drivers/usb/dwc2.c
@@ -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 */