Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nick-nhusb]: src/sys/dev/usb Initialise up_serialise to true and add a K...



details:   https://anonhg.NetBSD.org/src/rev/b20d765d0048
branches:  nick-nhusb
changeset: 334438:b20d765d0048
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 19 07:12:21 2016 +0000

description:
Initialise up_serialise to true and add a KASSERT.

diffstat:

 sys/dev/usb/usb_subr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r a12496ef7d5e -r b20d765d0048 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Thu Mar 17 09:04:53 2016 +0000
+++ b/sys/dev/usb/usb_subr.c    Sat Mar 19 07:12:21 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.198.2.25 2016/03/08 21:16:27 skrll Exp $        */
+/*     $NetBSD: usb_subr.c,v 1.198.2.26 2016/03/19 07:12:21 skrll Exp $        */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.25 2016/03/08 21:16:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.26 2016/03/19 07:12:21 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -789,6 +789,7 @@
        p->up_intrxfer = NULL;
        p->up_running = 0;
        p->up_aborting = 0;
+       p->up_serialise = true;
        p->up_repeat = 0;
        p->up_interval = ival;
        p->up_flags = flags;
@@ -800,6 +801,9 @@
                kmem_intr_free(p, dev->ud_bus->ub_pipesize);
                return err;
        }
+
+       KASSERT(p->up_methods->upm_start || p->up_serialise == false);
+
        usb_init_task(&p->up_async_task, usbd_clear_endpoint_stall_task, p,
            USB_TASKQ_MPSAFE);
        DPRINTFN(1, "pipe=%p", p, 0, 0, 0);



Home | Main Index | Thread Index | Old Index