[coreboot-gerrit] New patch to review for coreboot: libpayload: udc/dwc2: Ignore setup packet in check for queue empty during shutdown
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Nov 12 00:09:56 CET 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12413
-gerrit
commit cdf7573a7fdf77afe6dd696cc6cc9c113a8f16e2
Author: Furquan Shaikh <furquan at google.com>
Date: Fri Nov 6 22:22:56 2015 -0800
libpayload: udc/dwc2: Ignore setup packet in check for queue empty
during shutdown
DWC2 UDC controller always requires an active packet to be present in
EP0-OUT to ensure proper operation of control plane. Thus, during
shutdown ignore EP0-OUT for queue empty check if only 1 packet is
present.
BUG=b:24676003
BRANCH=None
TEST=Compiles successfully. "fastboot reboot-bootloader" reboots
device without timeout in udc shutdown.
Change-Id: Iafe46c80f58c4cd57f8d58f060d805b603506bbd
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: 4e7c27d849c0411aae58e60a24d8170a27ab8485
Original-Change-Id: Ifa493ce0e41964ee7ca8bb3a1f4bb8726fa11173
Original-Signed-off-by: Furquan Shaikh <furquan at google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/311257
Original-Commit-Ready: Furquan Shaikh <furquan at chromium.org>
Original-Tested-by: Furquan Shaikh <furquan at chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
payloads/libpayload/drivers/udc/dwc2.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/udc/dwc2.c b/payloads/libpayload/drivers/udc/dwc2.c
index dc9eb7c..cde3a76 100644
--- a/payloads/libpayload/drivers/udc/dwc2.c
+++ b/payloads/libpayload/drivers/udc/dwc2.c
@@ -704,9 +704,21 @@ static void dwc2_shutdown(struct usbdev_ctrl *this)
is_empty = 1;
this->poll(this);
for (i = 0; i < 16; i++)
- for (j = 0; j < 2; j++)
+ for (j = 0; j < 2; j++) {
+ /*
+ * EP0-OUT needs to always have an active packet
+ * for proper operation of control packet
+ * flow. Thus, ignore if only 1 packet is
+ * present in EP0-OUT.
+ */
+ if ((i == 0) && (j == 0) &&
+ SIMPLEQ_SINGLETON(&p->eps[0][0].job_queue,
+ queue))
+ continue;
+
if (!SIMPLEQ_EMPTY(&p->eps[i][j].job_queue))
is_empty = 0;
+ }
}
if (timer_us(shutdown_timer_us) >= shutdown_timeout_us)
More information about the coreboot-gerrit
mailing list