Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/usb Pull up following revision(s) (requested by r...



details:   https://anonhg.NetBSD.org/src/rev/d9fdfc88eb06
branches:  netbsd-9
changeset: 368777:d9fdfc88eb06
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 03 15:50:03 2022 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1492):

        sys/dev/usb/ukbd.c: revision 1.154

ukbd(4): Wait for callouts and blinking to complete in detach.

This detach routine (and whole driver) has got a lotta other
problems, but let's fix 'em one at a time...

diffstat:

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

diffs (29 lines):

diff -r 8f4609b3d7ab -r d9fdfc88eb06 sys/dev/usb/ukbd.c
--- a/sys/dev/usb/ukbd.c        Wed Aug 03 15:47:48 2022 +0000
+++ b/sys/dev/usb/ukbd.c        Wed Aug 03 15:50:03 2022 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ukbd.c,v 1.142 2019/05/05 03:17:54 mrg Exp $        */
+/*      $NetBSD: ukbd.c,v 1.142.2.1 2022/08/03 15:50:03 martin Exp $        */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.142 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.142.2.1 2022/08/03 15:50:03 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -578,6 +578,10 @@
        if (sc->sc_wskbddev != NULL)
                rv = config_detach(sc->sc_wskbddev, flags);
 
+       callout_halt(&sc->sc_delay, NULL);
+       usb_rem_task_wait(sc->sc_hdev.sc_parent->sc_udev, &sc->sc_ledtask,
+           USB_TASKQ_DRIVER, NULL);
+
        /* The console keyboard does not get a disable call, so check pipe. */
        if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
                uhidev_close(&sc->sc_hdev);



Home | Main Index | Thread Index | Old Index