mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
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:
parent
a56a8ad111
commit
290c9a02c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57700
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue