summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2002-07-09 15:22:09 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2002-07-09 15:22:09 +0000
commit4fd5221df774f98cc0ecff162ebc6476cd362c21 (patch)
treebaa90d538962ab31efbfd4918a1350e678a6099a /sys/dev
parentb44597436845cfaf048928d3dc212d297cf4c0b9 (diff)
fixes from NetBSD
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/umidi.c24
-rw-r--r--sys/dev/usb/umidi_quirks.c36
2 files changed, 49 insertions, 11 deletions
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index 315a31bf902..b081ed5ae9f 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: umidi.c,v 1.3 2002/06/11 07:49:56 nate Exp $ */
-/* $NetBSD: umidi.c,v 1.14 2002/03/08 17:24:06 kent Exp $ */
+/* $OpenBSD: umidi.c,v 1.4 2002/07/09 15:22:08 nate Exp $ */
+/* $NetBSD: umidi.c,v 1.15 2002/06/19 13:51:34 tshiozak Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -808,9 +808,9 @@ bind_jacks_to_mididev(struct umidi_softc *sc,
static void
unbind_jacks_from_mididev(struct umidi_mididev *mididev)
{
- if ((mididev->flags&FWRITE) && mididev->out_jack)
+ if ((mididev->flags & FWRITE) && mididev->out_jack)
close_out_jack(mididev->out_jack);
- if ((mididev->flags&FWRITE) && mididev->in_jack)
+ if ((mididev->flags & FREAD) && mididev->in_jack)
close_in_jack(mididev->in_jack);
if (mididev->out_jack)
@@ -904,8 +904,14 @@ close_out_jack(struct umidi_jack *jack)
if (jack->opened) {
s = splusb();
- LIST_REMOVE(jack, u.out.queue_entry);
- if (jack==jack->endpoint->queue_tail) {
+ LIST_FOREACH(tail,
+ &jack->endpoint->queue_head,
+ u.out.queue_entry)
+ if (tail == jack) {
+ LIST_REMOVE(jack, u.out.queue_entry);
+ break;
+ }
+ if (jack == jack->endpoint->queue_tail) {
/* find tail */
LIST_FOREACH(tail,
&jack->endpoint->queue_head,
@@ -1073,8 +1079,8 @@ dump_ep(struct umidi_endpoint *ep)
static void
dump_jack(struct umidi_jack *jack)
{
- DPRINTFN(10, ("\t\t\tep=%p, mididev=%p\n",
- jack->endpoint, jack->mididev));
+ DPRINTFN(10, ("\t\t\tep=%p\n",
+ jack->endpoint));
}
#endif /* UMIDI_DEBUG */
@@ -1241,7 +1247,7 @@ in_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
}
if (!jack->binded || !jack->opened)
return;
- DPR_PACKET(in, ep->sc, &jack->buffer);
+ DPR_PACKET(in, ep->sc, &jack->packet);
if (jack->u.in.intr) {
for (i=0; i<len; i++) {
(*jack->u.in.intr)(jack->arg, ep->buffer[i+1]);
diff --git a/sys/dev/usb/umidi_quirks.c b/sys/dev/usb/umidi_quirks.c
index e5b47503246..cf557bf7586 100644
--- a/sys/dev/usb/umidi_quirks.c
+++ b/sys/dev/usb/umidi_quirks.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: umidi_quirks.c,v 1.3 2002/06/11 07:49:57 nate Exp $ */
-/* $NetBSD: umidi_quirks.c,v 1.3 2001/11/13 06:24:56 lukem Exp $ */
+/* $OpenBSD: umidi_quirks.c,v 1.4 2002/07/09 15:22:08 nate Exp $ */
+/* $NetBSD: umidi_quirks.c,v 1.4 2002/06/19 13:55:30 tshiozak Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -120,6 +120,36 @@ UMQ_DEF(ROLAND, ROLAND_UM1, 2) = {
UMQ_TERMINATOR
};
+/*
+ * ROLAND SC-8850
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_SC8850, 2, 1, 1) = {
+ /* out */
+ { 0, 6 },
+ /* in */
+ { 1, 6 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_SC8850, 2) = {
+ UMQ_FIXED_EP_REG(ROLAND, ROLAND_SC8850, 2),
+ UMQ_TERMINATOR
+};
+
+/*
+ * ROLAND SD-90
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_SD90, 2, 1, 1) = {
+ /* out */
+ { 0, 4 },
+ /* in */
+ { 1, 4 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_SD90, 2) = {
+ UMQ_FIXED_EP_REG(ROLAND, ROLAND_SD90, 2),
+ UMQ_TERMINATOR
+};
+
/*
* ROLAND UM-880 (native mode)
@@ -145,6 +175,8 @@ struct umidi_quirk umidi_quirklist[] = {
UMQ_REG(YAMAHA, YAMAHA_UX256, ANYIFACE),
UMQ_REG(YAMAHA, ANYPRODUCT, ANYIFACE),
UMQ_REG(ROLAND, ROLAND_UM1, 2),
+ UMQ_REG(ROLAND, ROLAND_SC8850, 2),
+ UMQ_REG(ROLAND, ROLAND_SD90, 2),
UMQ_REG(ROLAND, ROLAND_UM880N, 0),
UMQ_TERMINATOR
};