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 Add missing locking in ehci_device_fs_isoc_...



details:   https://anonhg.NetBSD.org/src/rev/ae6ae710a337
branches:  nick-nhusb
changeset: 334139:ae6ae710a337
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 07 22:15:50 2015 +0000

description:
Add missing locking in ehci_device_fs_isoc_transfer

diffstat:

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

diffs (32 lines):

diff -r a929c85d3f58 -r ae6ae710a337 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Mar 07 08:33:18 2015 +0000
+++ b/sys/dev/usb/ehci.c        Sat Mar 07 22:15:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.234.2.39 2015/03/05 20:57:07 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.234.2.40 2015/03/07 22:15:50 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.39 2015/03/05 20:57:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.40 2015/03/07 22:15:50 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -4049,9 +4049,13 @@
 Static usbd_status
 ehci_device_fs_isoc_transfer(usbd_xfer_handle xfer)
 {
+       ehci_softc_t *sc = xfer->ux_pipe->up_dev->ud_bus->ub_hcpriv;
        usbd_status err;
 
+       mutex_enter(&sc->sc_lock);
        err = usb_insert_transfer(xfer);
+       mutex_exit(&sc->sc_lock);
+
        if (err && err != USBD_IN_PROGRESS)
                return err;
 



Home | Main Index | Thread Index | Old Index