Fix flushing of the clists before deleting them. Stops the machine

from panicing when disconnecting a USB Wacom Graphire tablet.

jhk approved the fix some time ago, but I forgot to actually commit the
thing.

Reported by:	Dirk van Gulik <dirkx@webweaving.org>
Approved by:	jhk
This commit is contained in:
Nick Hibma 2000-03-02 16:01:53 +00:00
parent a56a8ad111
commit 290c9a02c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57700
2 changed files with 2 additions and 0 deletions

View file

@ -414,6 +414,7 @@ ugenclose(dev, flag, mode, p)
if (sce->ibuf != NULL) {
free(sce->ibuf, M_USBDEV);
sce->ibuf = NULL;
ndflush(&sce->q, sce->q.c_cc);
clfree(&sce->q);
}

View file

@ -415,6 +415,7 @@ uhidclose(dev, flag, mode, p)
usbd_close_pipe(sc->sc_intrpipe);
sc->sc_intrpipe = 0;
ndflush(&sc->sc_q, sc->sc_q.c_cc);
clfree(&sc->sc_q);
free(sc->sc_ibuf, M_USBDEV);