diff options
| author | gson <gson@NetBSD.org> | 2004-01-06 05:42:47 +0000 |
|---|---|---|
| committer | gson <gson@NetBSD.org> | 2004-01-06 05:42:47 +0000 |
| commit | e11055d0907ba56bf8ba58181ef7945ddfe7220d (patch) | |
| tree | 048b4b22e7af9abf05c40ed897a04ece49d7b942 /sys/dev | |
| parent | 57ec8c75e12e235fabc15d2751335fcf6a0f82b2 (diff) | |
Abort the USB transfer on an endpoint when the last midi device
referencing it is closed. Fixes kern/23987.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/umidi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c index 5e8533637ae..d5436714c53 100644 --- a/sys/dev/usb/umidi.c +++ b/sys/dev/usb/umidi.c @@ -1,4 +1,4 @@ -/* $NetBSD: umidi.c,v 1.18 2003/12/05 06:01:59 gson Exp $ */ +/* $NetBSD: umidi.c,v 1.19 2004/01/06 05:42:47 gson Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.18 2003/12/05 06:01:59 gson Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.19 2004/01/06 05:42:47 gson Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -935,7 +935,9 @@ close_in_jack(struct umidi_jack *jack) { if (jack->opened) { jack->opened = 0; - jack->endpoint->num_open--; + if (--jack->endpoint->num_open == 0) { + usbd_abort_pipe(jack->endpoint->pipe); + } } } |
