Module Name: src
Committed By: riastradh
Date: Sat Sep 24 11:06:41 UTC 2022
Modified Files:
src/sys/dev/usb: uhid.c
Log Message:
uhid(4): Don't wake waiters on changing sc_open.
This is only a diagnostic measure, not part of semantics.
Can probably safely eliminate the diagnostic measure at this point
now.
To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/usb/uhid.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/uhid.c
diff -u src/sys/dev/usb/uhid.c:1.125 src/sys/dev/usb/uhid.c:1.126
--- src/sys/dev/usb/uhid.c:1.125 Thu Mar 31 17:43:50 2022
+++ src/sys/dev/usb/uhid.c Sat Sep 24 11:06:41 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: uhid.c,v 1.125 2022/03/31 17:43:50 christos Exp $ */
+/* $NetBSD: uhid.c,v 1.126 2022/09/24 11:06:41 riastradh Exp $ */
/*
* Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.125 2022/03/31 17:43:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.126 2022/09/24 11:06:41 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -314,7 +314,6 @@ uhidopen(dev_t dev, int flag, int mode,
/* We are open for business. */
mutex_enter(&sc->sc_lock);
sc->sc_open = UHID_OPEN;
- cv_broadcast(&sc->sc_cv);
mutex_exit(&sc->sc_lock);
return 0;
@@ -331,7 +330,6 @@ fail1: selnotify(&sc->sc_rsel, POLLHUP,
fail0: mutex_enter(&sc->sc_lock);
KASSERT(sc->sc_open == UHID_OPENING);
sc->sc_open = UHID_CLOSED;
- cv_broadcast(&sc->sc_cv);
atomic_store_relaxed(&sc->sc_state, 0);
mutex_exit(&sc->sc_lock);
return error;
@@ -403,7 +401,6 @@ uhidclose(dev_t dev, int flag, int mode,
sc->sc_open = UHID_CLOSED;
out: KASSERT(sc->sc_open == UHID_CLOSED);
sc->sc_closing = false;
- cv_broadcast(&sc->sc_cv);
atomic_store_relaxed(&sc->sc_state, 0);
mutex_exit(&sc->sc_lock);