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 Call callout_reset on the xfer timeout...



details:   https://anonhg.NetBSD.org/src/rev/5c54ad554002
branches:  trunk
changeset: 792427:5c54ad554002
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Jan 03 12:20:26 2014 +0000

description:
Call callout_reset on the xfer timeoute_handle before calling
dwc2_hcd_urb_enqueue

diffstat:

 sys/external/bsd/dwc2/dwc2.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 9b51b2649efa -r 5c54ad554002 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c      Fri Jan 03 12:07:37 2014 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c      Fri Jan 03 12:20:26 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.c,v 1.24 2014/01/03 12:07:37 skrll Exp $  */
+/*     $NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 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.24 2014/01/03 12:07:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.25 2014/01/03 12:20:26 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1381,16 +1381,16 @@
        /* might need to check cpu_intr_p */
        mutex_spin_enter(&hsotg->lock);
 
+       if (xfer->timeout && !sc->sc_bus.use_polling) {
+               callout_reset(&xfer->timeout_handle, mstohz(xfer->timeout),
+                   dwc2_timeout, xfer);
+       }
+
        dwc2_urb->priv = xfer;
        retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, &dpipe->priv, 0);
        if (retval)
                goto fail;
 
-       if (xfer->timeout && !sc->sc_bus.use_polling) {
-               callout_reset(&xfer->timeout_handle, mstohz(xfer->timeout),
-                   dwc2_timeout, xfer);
-       }
-
        if (alloc_bandwidth) {
                dwc2_allocate_bus_bandwidth(hsotg,
                                dwc2_hcd_get_ep_bandwidth(hsotg, dpipe),



Home | Main Index | Thread Index | Old Index