Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/dwc2 Update for latest dwc2 dist
details: https://anonhg.NetBSD.org/src/rev/1d416e35216c
branches: trunk
changeset: 813694:1d416e35216c
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Feb 14 10:56:22 2016 +0000
description:
Update for latest dwc2 dist
diffstat:
sys/external/bsd/dwc2/dwc2.c | 42 +++++++++++++++++++++++++-----------------
1 files changed, 25 insertions(+), 17 deletions(-)
diffs (92 lines):
diff -r 70db4e717e6a -r 1d416e35216c sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Sun Feb 14 10:53:30 2016 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Sun Feb 14 10:56:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.38 2015/12/22 14:31:36 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.39 2016/02/14 10:56:22 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.38 2015/12/22 14:31:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.39 2016/02/14 10:56:22 skrll Exp $");
#include "opt_usb.h"
@@ -1685,7 +1685,7 @@
retval = dwc2_hcd_init(hsotg);
if (retval) {
if (hsotg->gadget_enabled)
- s3c_hsotg_remove(hsotg);
+ dwc2_hsotg_remove(hsotg);
goto fail2;
}
hsotg->hcd_enabled = 1;
@@ -1788,28 +1788,28 @@
ed = xfer->pipe->endpoint->edesc;
xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
- xfer->actlen = dwc2_hcd_urb_get_actual_length(qtd->urb);
+ struct dwc2_hcd_urb *urb = qtd->urb;
+ xfer->actlen = dwc2_hcd_urb_get_actual_length(urb);
DPRINTFN(3, "xfer=%p actlen=%d\n", xfer, xfer->actlen);
+ if (xfertype == UE_ISOCHRONOUS) {
+ int i;
+ xfer->actlen = 0;
+ for (i = 0; i < xfer->nframes; ++i) {
+ xfer->frlengths[i] =
+ dwc2_hcd_urb_get_iso_desc_actual_length(
+ urb, i);
+ xfer->actlen += xfer->frlengths[i];
+ }
+ }
+
if (xfertype == UE_ISOCHRONOUS && dbg_perio()) {
int i;
for (i = 0; i < xfer->nframes; i++)
dev_vdbg(hsotg->dev, " ISO Desc %d status %d\n",
- i, qtd->urb->iso_descs[i].status);
- }
-
- if (xfertype == UE_ISOCHRONOUS) {
- int i;
-
- xfer->actlen = 0;
- for (i = 0; i < xfer->nframes; ++i) {
- xfer->frlengths[i] =
- dwc2_hcd_urb_get_iso_desc_actual_length(
- qtd->urb, i);
- xfer->actlen += xfer->frlengths[i];
- }
+ i, urb->iso_descs[i].status);
}
if (!status) {
@@ -1838,6 +1838,7 @@
xfer->status = USBD_IOERROR;
break;
default:
+ xfer->status = USBD_IOERROR;
printf("%s: unknown error status %d\n", __func__, status);
}
@@ -1884,6 +1885,13 @@
mutex_spin_enter(&hsotg->lock);
+ hsotg->lx_state = DWC2_L0;
+
+ if (dwc2_is_device_mode(hsotg)) {
+ mutex_spin_exit(&hsotg->lock);
+ return 0; /* why 0 ?? */
+ }
+
dwc2_hcd_reinit(hsotg);
mutex_spin_exit(&hsotg->lock);
Home |
Main Index |
Thread Index |
Old Index