Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb usbd_open_pipe and usbd_open_pipe_intr take diff...



details:   https://anonhg.NetBSD.org/src/rev/67667acccdc1
branches:  trunk
changeset: 784220:67667acccdc1
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Jan 22 13:27:59 2013 +0000

description:
usbd_open_pipe and usbd_open_pipe_intr take different flags! Make sure
the value of USBD_MPSAFE doesn't conflict with flags for either of them, as
it can be passed to both.

diffstat:

 sys/dev/usb/usbdi.c |  7 ++++---
 sys/dev/usb/usbdi.h |  6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r f99e118d418d -r 67667acccdc1 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Tue Jan 22 13:18:47 2013 +0000
+++ b/sys/dev/usb/usbdi.c       Tue Jan 22 13:27:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.149 2013/01/22 13:18:47 jmcneill Exp $     */
+/*     $NetBSD: usbdi.c,v 1.150 2013/01/22 13:27:59 jmcneill Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.149 2013/01/22 13:18:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.150 2013/01/22 13:27:59 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -198,7 +198,8 @@
        DPRINTFN(3,("usbd_open_pipe_intr: address=0x%x flags=0x%x len=%d\n",
                    address, flags, len));
 
-       err = usbd_open_pipe_ival(iface, address, USBD_EXCLUSIVE_USE | flags,
+       err = usbd_open_pipe_ival(iface, address,
+                                 USBD_EXCLUSIVE_USE | (flags & USBD_MPSAFE),
                                  &ipipe, ival);
        if (err)
                return (err);
diff -r f99e118d418d -r 67667acccdc1 sys/dev/usb/usbdi.h
--- a/sys/dev/usb/usbdi.h       Tue Jan 22 13:18:47 2013 +0000
+++ b/sys/dev/usb/usbdi.h       Tue Jan 22 13:27:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.h,v 1.86 2013/01/22 12:48:07 jmcneill Exp $      */
+/*     $NetBSD: usbdi.h,v 1.87 2013/01/22 13:27:59 jmcneill Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $      */
 
 /*
@@ -71,7 +71,7 @@
 
 /* Open flags */
 #define USBD_EXCLUSIVE_USE     0x01
-#define USBD_MPSAFE            0x02
+#define USBD_MPSAFE            0x80
 
 /* Use default (specified by ep. desc.) interval on interrupt pipe */
 #define USBD_DEFAULT_INTERVAL  (-1)
@@ -209,7 +209,7 @@
 #define        USB_TASKQ_DRIVER        1
 #define        USB_NUM_TASKQS          2
 #define        USB_TASKQ_NAMES         {"usbtask-hc", "usbtask-dr"}
-#define        USB_TASKQ_MPSAFE        0x02
+#define        USB_TASKQ_MPSAFE        0x80
 
 void usb_add_task(usbd_device_handle, struct usb_task *, int);
 void usb_rem_task(usbd_device_handle, struct usb_task *);



Home | Main Index | Thread Index | Old Index