summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorgson <gson@NetBSD.org>2003-12-05 06:01:59 +0000
committergson <gson@NetBSD.org>2003-12-05 06:01:59 +0000
commit07bb045f57f7413ca9dda9315cc40c9e2551ea3d (patch)
treebef51ed6531a3ae034801d87c912086f56822545 /sys/dev
parent5f7a1eaf57bb2dd0b44d8e366d7bc8bd5cffca1b (diff)
Opening umidi read-only failed to increment ep->num_open because
open_in_jack() treated USBD_IN_PROGRESS as a failure return.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/umidi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index 697efb6f9e5..5e8533637ae 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: umidi.c,v 1.17 2003/12/04 13:57:31 keihan Exp $ */
+/* $NetBSD: umidi.c,v 1.18 2003/12/05 06:01:59 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.17 2003/12/04 13:57:31 keihan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.18 2003/12/05 06:01:59 gson Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -890,7 +890,8 @@ open_in_jack(struct umidi_jack *jack, void *arg, void (*intr)(void *, int))
jack->opened = 1;
if (ep->num_open++==0 && UE_GET_DIR(ep->addr)==UE_DIR_IN) {
err = start_input_transfer(ep);
- if (err!=USBD_NORMAL_COMPLETION) {
+ if (err != USBD_NORMAL_COMPLETION &&
+ err != USBD_IN_PROGRESS) {
ep->num_open--;
}
}