Author: hselasky
Date: Sat May 14 12:02:03 2011
New Revision: 221880
URL: http://svn.freebsd.org/changeset/base/221880

Log:
  MFC r218791 and r218988.
  USB MIDI related changes and improvements.

Modified:
  stable/8/sys/dev/sound/usb/uaudio.c
  stable/8/sys/dev/usb/quirk/usb_quirk.c
  stable/8/sys/dev/usb/quirk/usb_quirk.h
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/sound/usb/uaudio.c
==============================================================================
--- stable/8/sys/dev/sound/usb/uaudio.c Sat May 14 11:26:00 2011        
(r221879)
+++ stable/8/sys/dev/sound/usb/uaudio.c Sat May 14 12:02:03 2011        
(r221880)
@@ -191,10 +191,15 @@ struct uaudio_chan {
        uint8_t iface_alt_index;
 };
 
-#define        UMIDI_N_TRANSFER    4           /* units */
 #define        UMIDI_CABLES_MAX   16           /* units */
 #define        UMIDI_BULK_SIZE  1024           /* bytes */
 
+enum {
+       UMIDI_TX_TRANSFER,
+       UMIDI_RX_TRANSFER,
+       UMIDI_N_TRANSFER,
+};
+
 struct umidi_sub_chan {
        struct usb_fifo_sc fifo;
        uint8_t *temp_cmd;
@@ -224,10 +229,6 @@ struct umidi_chan {
        uint8_t iface_index;
        uint8_t iface_alt_index;
 
-       uint8_t flags;
-#define        UMIDI_FLAG_READ_STALL  0x01
-#define        UMIDI_FLAG_WRITE_STALL 0x02
-
        uint8_t read_open_refcount;
        uint8_t write_open_refcount;
 
@@ -264,6 +265,7 @@ struct uaudio_softc {
        uint8_t sc_uq_au_inp_async:1;
        uint8_t sc_uq_au_no_xu:1;
        uint8_t sc_uq_bad_adc:1;
+       uint8_t sc_uq_au_vendor_class:1;
 };
 
 struct uaudio_search_result {
@@ -336,9 +338,7 @@ static device_detach_t uaudio_detach;
 static usb_callback_t uaudio_chan_play_callback;
 static usb_callback_t uaudio_chan_record_callback;
 static usb_callback_t uaudio_mixer_write_cfg_callback;
-static usb_callback_t umidi_read_clear_stall_callback;
 static usb_callback_t umidi_bulk_read_callback;
-static usb_callback_t umidi_write_clear_stall_callback;
 static usb_callback_t umidi_bulk_write_callback;
 
 static void    uaudio_chan_fill_info_sub(struct uaudio_softc *,
@@ -402,8 +402,8 @@ static int  umidi_open(struct usb_fifo *,
 static int     umidi_ioctl(struct usb_fifo *, u_long cmd, void *, int);
 static void    umidi_close(struct usb_fifo *, int);
 static void    umidi_init(device_t dev);
-static int32_t umidi_probe(device_t dev);
-static int32_t umidi_detach(device_t dev);
+static int     umidi_probe(device_t dev);
+static int     umidi_detach(device_t dev);
 
 #ifdef USB_DEBUG
 static void    uaudio_chan_dump_ep_desc(
@@ -493,7 +493,7 @@ uint8_t     umidi_cmd_to_len[16] = {
 
 static const struct usb_config
        umidi_config[UMIDI_N_TRANSFER] = {
-       [0] = {
+       [UMIDI_TX_TRANSFER] = {
                .type = UE_BULK,
                .endpoint = UE_ADDR_ANY,
                .direction = UE_DIR_OUT,
@@ -502,7 +502,7 @@ static const struct usb_config
                .callback = &umidi_bulk_write_callback,
        },
 
-       [1] = {
+       [UMIDI_RX_TRANSFER] = {
                .type = UE_BULK,
                .endpoint = UE_ADDR_ANY,
                .direction = UE_DIR_IN,
@@ -510,26 +510,6 @@ static const struct usb_config
                .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.proxy_buffer = 1,},
                .callback = &umidi_bulk_read_callback,
        },
-
-       [2] = {
-               .type = UE_CONTROL,
-               .endpoint = 0x00,       /* Control pipe */
-               .direction = UE_DIR_ANY,
-               .bufsize = sizeof(struct usb_device_request),
-               .callback = &umidi_write_clear_stall_callback,
-               .timeout = 1000,        /* 1 second */
-               .interval = 50, /* 50ms */
-       },
-
-       [3] = {
-               .type = UE_CONTROL,
-               .endpoint = 0x00,       /* Control pipe */
-               .direction = UE_DIR_ANY,
-               .bufsize = sizeof(struct usb_device_request),
-               .callback = &umidi_read_clear_stall_callback,
-               .timeout = 1000,        /* 1 second */
-               .interval = 50, /* 50ms */
-       },
 };
 
 static devclass_t uaudio_devclass;
@@ -562,10 +542,16 @@ uaudio_probe(device_t dev)
        if (uaa->use_generic == 0)
                return (ENXIO);
 
-       /* trigger on the control interface */
+       /* lookup non-standard device */
 
-       if ((uaa->info.bInterfaceClass == UICLASS_AUDIO) &&
-           (uaa->info.bInterfaceSubClass == UISUBCLASS_AUDIOCONTROL)) {
+       if (uaa->info.bInterfaceClass != UICLASS_AUDIO) {
+               if (usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS) == 0)
+                       return (ENXIO);
+       }
+
+       /* check for AUDIO control interface */
+
+       if (uaa->info.bInterfaceSubClass == UISUBCLASS_AUDIOCONTROL) {
                if (usb_test_quirk(uaa, UQ_BAD_AUDIO))
                        return (ENXIO);
                else
@@ -574,9 +560,11 @@ uaudio_probe(device_t dev)
 
        /* check for MIDI stream */
 
-       if ((uaa->info.bInterfaceClass == UICLASS_AUDIO) &&
-           (uaa->info.bInterfaceSubClass == UISUBCLASS_MIDISTREAM)) {
-               return (0);
+       if (uaa->info.bInterfaceSubClass == UISUBCLASS_MIDISTREAM) {
+               if (usb_test_quirk(uaa, UQ_BAD_MIDI))
+                       return (ENXIO);
+               else
+                       return (0);
        }
        return (ENXIO);
 }
@@ -607,6 +595,9 @@ uaudio_attach(device_t dev)
        if (usb_test_quirk(uaa, UQ_BAD_ADC))
                sc->sc_uq_bad_adc = 1;
 
+       if (usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS))
+               sc->sc_uq_au_vendor_class = 1;
+
        umidi_init(dev);
 
        device_set_usb_desc(dev);
@@ -821,6 +812,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
        uint8_t bBitResolution;
        uint8_t x;
        uint8_t audio_if = 0;
+       uint8_t uma_if_class;
 
        while ((desc = usb_desc_foreach(cd, desc))) {
 
@@ -838,19 +830,22 @@ uaudio_chan_fill_info_sub(struct uaudio_
                                alt_index++;
                        }
 
-                       if ((id->bInterfaceClass == UICLASS_AUDIO) &&
-                           (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) 
{
+                       uma_if_class =
+                           ((id->bInterfaceClass == UICLASS_AUDIO) ||
+                           ((id->bInterfaceClass == UICLASS_VENDOR) &&
+                           (sc->sc_uq_au_vendor_class != 0)));
+
+                       if ((uma_if_class != 0) && (id->bInterfaceSubClass == 
UISUBCLASS_AUDIOSTREAM)) {
                                audio_if = 1;
                        } else {
                                audio_if = 0;
                        }
 
-                       if ((id->bInterfaceClass == UICLASS_AUDIO) &&
+                       if ((uma_if_class != 0) &&
                            (id->bInterfaceSubClass == UISUBCLASS_MIDISTREAM)) {
 
                                /*
                                 * XXX could allow multiple MIDI interfaces
-                                * XXX
                                 */
 
                                if ((sc->sc_midi_chan.valid == 0) &&
@@ -1361,7 +1356,8 @@ uaudio_chan_init(struct uaudio_softc *sc
                    usbd_errstr(err));
                goto error;
        }
-       usbd_set_parent_iface(sc->sc_udev, iface_index, 
sc->sc_mixer_iface_index);
+       usbd_set_parent_iface(sc->sc_udev, iface_index,
+           sc->sc_mixer_iface_index);
 
        /*
         * Only set the sample rate if the channel reports that it
@@ -1576,10 +1572,10 @@ static void
 uaudio_mixer_add_ctl_sub(struct uaudio_softc *sc, struct uaudio_mixer_node *mc)
 {
        struct uaudio_mixer_node *p_mc_new =
-       malloc(sizeof(*p_mc_new), M_USBDEV, M_WAITOK);
+           malloc(sizeof(*p_mc_new), M_USBDEV, M_WAITOK);
 
-       if (p_mc_new) {
-               bcopy(mc, p_mc_new, sizeof(*p_mc_new));
+       if (p_mc_new != NULL) {
+               memcpy(p_mc_new, mc, sizeof(*p_mc_new));
                p_mc_new->next = sc->sc_mixer_root;
                sc->sc_mixer_root = p_mc_new;
                sc->sc_mixer_count++;
@@ -1721,7 +1717,7 @@ uaudio_mixer_add_mixer(struct uaudio_sof
 
        DPRINTFN(3, "ichs=%d ochs=%d\n", ichs, ochs);
 
-       bzero(&mix, sizeof(mix));
+       memset(&mix, 0, sizeof(mix));
 
        mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
        uaudio_mixer_determine_class(&iot[id], &mix);
@@ -1781,7 +1777,7 @@ uaudio_mixer_add_selector(struct uaudio_
        if (d->bNrInPins == 0) {
                return;
        }
-       bzero(&mix, sizeof(mix));
+       memset(&mix, 0, sizeof(mix));
 
        mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
        mix.wValue[0] = MAKE_WORD(0, 0);
@@ -1851,7 +1847,7 @@ uaudio_mixer_add_feature(struct uaudio_s
        if (d->bControlSize == 0) {
                return;
        }
-       bzero(&mix, sizeof(mix));
+       memset(&mix, 0, sizeof(mix));
 
        nchan = (d->bLength - 7) / d->bControlSize;
        mmask = uaudio_mixer_feature_get_bmaControls(d, 0);
@@ -1985,7 +1981,7 @@ uaudio_mixer_add_processing_updown(struc
                DPRINTF("no mode select\n");
                return;
        }
-       bzero(&mix, sizeof(mix));
+       memset(&mix, 0, sizeof(mix));
 
        mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
        mix.nchan = 1;
@@ -2011,7 +2007,7 @@ uaudio_mixer_add_processing(struct uaudi
        struct uaudio_mixer_node mix;
        uint16_t ptype;
 
-       bzero(&mix, sizeof(mix));
+       memset(&mix, 0, sizeof(mix));
 
        ptype = UGETW(d0->wProcessType);
 
@@ -2066,7 +2062,7 @@ uaudio_mixer_add_extension(struct uaudio
        }
        if (d1->bmControls[0] & UA_EXT_ENABLE_MASK) {
 
-               bzero(&mix, sizeof(mix));
+               memset(&mix, 0, sizeof(mix));
 
                mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
                mix.nchan = 1;
@@ -2293,7 +2289,7 @@ uaudio_mixer_get_cluster(uint8_t id, con
        }
 error:
        DPRINTF("bad data\n");
-       bzero(&r, sizeof(r));
+       memset(&r, 0, sizeof(r));
 done:
        return (r);
 }
@@ -3283,25 +3279,12 @@ uaudio_mixer_setrecsrc(struct uaudio_sof
  *========================================================================*/
 
 static void
-umidi_read_clear_stall_callback(struct usb_xfer *xfer, usb_error_t error)
-{
-       struct umidi_chan *chan = usbd_xfer_softc(xfer);
-       struct usb_xfer *xfer_other = chan->xfer[1];
-
-       if (usbd_clear_stall_callback(xfer, xfer_other)) {
-               DPRINTF("stall cleared\n");
-               chan->flags &= ~UMIDI_FLAG_READ_STALL;
-               usbd_transfer_start(xfer_other);
-       }
-}
-
-static void
 umidi_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
 {
        struct umidi_chan *chan = usbd_xfer_softc(xfer);
        struct umidi_sub_chan *sub;
        struct usb_page_cache *pc;
-       uint8_t buf[1];
+       uint8_t buf[4];
        uint8_t cmd_len;
        uint8_t cn;
        uint16_t pos;
@@ -3319,57 +3302,47 @@ umidi_bulk_read_callback(struct usb_xfer
 
                while (actlen >= 4) {
 
-                       usbd_copy_out(pc, pos, buf, 1);
-
-                       cmd_len = umidi_cmd_to_len[buf[0] & 0xF];       /* 
command length */
-                       cn = buf[0] >> 4;       /* cable number */
+                       /* copy out the MIDI data */
+                       usbd_copy_out(pc, pos, buf, 4);
+                       /* command length */
+                       cmd_len = umidi_cmd_to_len[buf[0] & 0xF];
+                       /* cable number */
+                       cn = buf[0] >> 4;
+                       /*
+                        * Lookup sub-channel. The index is range
+                        * checked below.
+                        */
                        sub = &chan->sub[cn];
 
-                       if (cmd_len && (cn < chan->max_cable) && 
sub->read_open) {
-                               usb_fifo_put_data(sub->fifo.fp[USB_FIFO_RX], pc,
-                                   pos + 1, cmd_len, 1);
-                       } else {
-                               /* ignore the command */
+                       if ((cmd_len != 0) &&
+                           (cn < chan->max_cable) &&
+                           (sub->read_open != 0)) {
+
+                               /* Send data to the application */
+                               usb_fifo_put_data_linear(
+                                   sub->fifo.fp[USB_FIFO_RX],
+                                   buf + 1, cmd_len, 1);
                        }
-
                        actlen -= 4;
                        pos += 4;
                }
 
        case USB_ST_SETUP:
                DPRINTF("start\n");
-
-               if (chan->flags & UMIDI_FLAG_READ_STALL) {
-                       usbd_transfer_start(chan->xfer[3]);
-                       return;
-               }
+tr_setup:
                usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer));
                usbd_transfer_submit(xfer);
-               return;
+               break;
 
        default:
                DPRINTF("error=%s\n", usbd_errstr(error));
 
                if (error != USB_ERR_CANCELLED) {
                        /* try to clear stall first */
-                       chan->flags |= UMIDI_FLAG_READ_STALL;
-                       usbd_transfer_start(chan->xfer[3]);
+                       usbd_xfer_set_stall(xfer);
+                       goto tr_setup;
                }
-               return;
-
-       }
-}
-
-static void
-umidi_write_clear_stall_callback(struct usb_xfer *xfer, usb_error_t error)
-{
-       struct umidi_chan *chan = usbd_xfer_softc(xfer);
-       struct usb_xfer *xfer_other = chan->xfer[0];
-
-       if (usbd_clear_stall_callback(xfer, xfer_other)) {
-               DPRINTF("stall cleared\n");
-               chan->flags &= ~UMIDI_FLAG_WRITE_STALL;
-               usbd_transfer_start(xfer_other);
+               break;
        }
 }
 
@@ -3501,6 +3474,8 @@ umidi_convert_to_usb(struct umidi_sub_ch
                        sub->temp_cmd = sub->temp_1;
                        sub->state = UMIDI_ST_SYSEX_0;
                        return (1);
+               default:
+                       break;
                }
        }
        return (0);
@@ -3526,13 +3501,9 @@ umidi_bulk_write_callback(struct usb_xfe
                DPRINTF("actlen=%d bytes\n", len);
 
        case USB_ST_SETUP:
-
+tr_setup:
                DPRINTF("start\n");
 
-               if (chan->flags & UMIDI_FLAG_WRITE_STALL) {
-                       usbd_transfer_start(chan->xfer[2]);
-                       return;
-               }
                total_length = 0;       /* reset */
                start_cable = chan->curr_cable;
                tr_any = 0;
@@ -3592,7 +3563,7 @@ umidi_bulk_write_callback(struct usb_xfe
                        usbd_xfer_set_frame_len(xfer, 0, total_length);
                        usbd_transfer_submit(xfer);
                }
-               return;
+               break;
 
        default:                        /* Error */
 
@@ -3600,11 +3571,10 @@ umidi_bulk_write_callback(struct usb_xfe
 
                if (error != USB_ERR_CANCELLED) {
                        /* try to clear stall first */
-                       chan->flags |= UMIDI_FLAG_WRITE_STALL;
-                       usbd_transfer_start(chan->xfer[2]);
+                       usbd_xfer_set_stall(xfer);
+                       goto tr_setup;
                }
-               return;
-
+               break;
        }
 }
 
@@ -3634,7 +3604,7 @@ umidi_start_read(struct usb_fifo *fifo)
 {
        struct umidi_chan *chan = usb_fifo_softc(fifo);
 
-       usbd_transfer_start(chan->xfer[1]);
+       usbd_transfer_start(chan->xfer[UMIDI_RX_TRANSFER]);
 }
 
 static void
@@ -3661,7 +3631,7 @@ umidi_start_write(struct usb_fifo *fifo)
 {
        struct umidi_chan *chan = usb_fifo_softc(fifo);
 
-       usbd_transfer_start(chan->xfer[0]);
+       usbd_transfer_start(chan->xfer[UMIDI_TX_TRANSFER]);
 }
 
 static void
@@ -3676,8 +3646,7 @@ umidi_stop_write(struct usb_fifo *fifo)
 
        if (--(chan->write_open_refcount) == 0) {
                DPRINTF("(stopping write transfer)\n");
-               usbd_transfer_stop(chan->xfer[2]);
-               usbd_transfer_stop(chan->xfer[0]);
+               usbd_transfer_stop(chan->xfer[UMIDI_TX_TRANSFER]);
        }
 }
 
@@ -3702,7 +3671,7 @@ umidi_open(struct usb_fifo *fifo, int ff
                }
                /* clear stall first */
                mtx_lock(&chan->mtx);
-               chan->flags |= UMIDI_FLAG_WRITE_STALL;
+               usbd_xfer_set_stall(chan->xfer[UMIDI_TX_TRANSFER]);
                chan->write_open_refcount++;
                sub->write_open = 1;
 
@@ -3752,7 +3721,7 @@ static struct usb_fifo_methods umidi_fif
        .basename[0] = "umidi",
 };
 
-static int32_t
+static int
 umidi_probe(device_t dev)
 {
        struct uaudio_softc *sc = device_get_softc(dev);
@@ -3768,7 +3737,8 @@ umidi_probe(device_t dev)
                DPRINTF("setting of alternate index failed!\n");
                goto detach;
        }
-       usbd_set_parent_iface(sc->sc_udev, chan->iface_index, 
sc->sc_mixer_iface_index);
+       usbd_set_parent_iface(sc->sc_udev, chan->iface_index,
+           sc->sc_mixer_iface_index);
 
        error = usbd_transfer_setup(uaa->device, &chan->iface_index,
            chan->xfer, umidi_config, UMIDI_N_TRANSFER,
@@ -3798,13 +3768,15 @@ umidi_probe(device_t dev)
        mtx_lock(&chan->mtx);
 
        /* clear stall first */
-       chan->flags |= UMIDI_FLAG_READ_STALL;
+       usbd_xfer_set_stall(chan->xfer[UMIDI_RX_TRANSFER]);
 
        /*
-        * NOTE: at least one device will not work properly unless
-        * the BULK pipe is open all the time.
+        * NOTE: At least one device will not work properly unless the
+        * BULK IN pipe is open all the time. This might have to do
+        * about that the internal queues of the device overflow if we
+        * don't read them regularly.
         */
-       usbd_transfer_start(chan->xfer[1]);
+       usbd_transfer_start(chan->xfer[UMIDI_RX_TRANSFER]);
 
        mtx_unlock(&chan->mtx);
 
@@ -3814,7 +3786,7 @@ detach:
        return (ENXIO);                 /* failure */
 }
 
-static int32_t
+static int
 umidi_detach(device_t dev)
 {
        struct uaudio_softc *sc = device_get_softc(dev);
@@ -3827,8 +3799,7 @@ umidi_detach(device_t dev)
 
        mtx_lock(&chan->mtx);
 
-       usbd_transfer_stop(chan->xfer[3]);
-       usbd_transfer_stop(chan->xfer[1]);
+       usbd_transfer_stop(chan->xfer[UMIDI_RX_TRANSFER]);
 
        mtx_unlock(&chan->mtx);
 

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c      Sat May 14 11:26:00 2011        
(r221879)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c      Sat May 14 12:02:03 2011        
(r221880)
@@ -94,11 +94,7 @@ static struct usb_quirk_entry usb_quirks
        USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC),
        USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS),
        USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1),
-
-       /*
-        * XXX The following quirks should have a more specific revision
-        * number:
-        */
+       /* Quirks for printer devices */
        USB_QUIRK(HP, 895C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
        USB_QUIRK(HP, 880C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
        USB_QUIRK(HP, 815C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
@@ -458,6 +454,24 @@ static struct usb_quirk_entry usb_quirks
        USB_QUIRK(CHIPSBANK, USBMEMSTICK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
        USB_QUIRK(CHIPSBANK, USBMEMSTICK1, 0x0000, 0xffff, 
UQ_MSC_NO_SYNC_CACHE),
        USB_QUIRK(NEWLINK, USB2IDEBRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
+
+       /* Non-standard USB MIDI devices */
+       USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SD90, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UM880N, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UA100, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UM4, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, U8, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UM2, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SC8820, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, PC300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SK500, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SCD70, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UM550, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+       USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
 };
 #undef USB_QUIRK_VP
 #undef USB_QUIRK
@@ -522,6 +536,8 @@ static const char *usb_quirk_str[USB_QUI
        [UQ_MSC_EJECT_SAEL_M460]        = "UQ_MSC_EJECT_SAEL_M460",
        [UQ_MSC_EJECT_HUAWEISCSI]       = "UQ_MSC_EJECT_HUAWEISCSI",
        [UQ_MSC_EJECT_TCT]              = "UQ_MSC_EJECT_TCT",
+       [UQ_BAD_MIDI]                   = "UQ_BAD_MIDI",
+       [UQ_AU_VENDOR_CLASS]            = "UQ_AU_VENDOR_CLASS",
 };
 
 /*------------------------------------------------------------------------*

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.h
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.h      Sat May 14 11:26:00 2011        
(r221879)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.h      Sat May 14 12:02:03 2011        
(r221880)
@@ -100,6 +100,9 @@ enum {
        UQ_MSC_EJECT_HUAWEISCSI,        /* ejects after Huawei SCSI command */
        UQ_MSC_EJECT_TCT,               /* ejects after TCT SCSI command */
 
+       UQ_BAD_MIDI,            /* device claims MIDI class, but isn't */
+       UQ_AU_VENDOR_CLASS,     /* audio device uses vendor and not audio class 
*/
+
        USB_QUIRK_MAX
 };
 

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs        Sat May 14 11:26:00 2011        
(r221879)
+++ stable/8/sys/dev/usb/usbdevs        Sat May 14 12:02:03 2011        
(r221880)
@@ -2771,9 +2771,23 @@ product RICOH VGPVCC8            0x183b  VGP-VCC8 C
 product REINERSCT CYBERJACK_ECOM       0x0100  e-com cyberJack
 
 /* Roland products */
+product ROLAND UA100           0x0000  UA-100 Audio I/F
+product ROLAND UM4             0x0002  UM-4 MIDI I/F
+product ROLAND SC8850          0x0003  SC-8850 MIDI Synth
+product ROLAND U8              0x0004  U-8 Audio I/F
+product ROLAND UM2             0x0005  UM-2 MIDI I/F
+product ROLAND SC8820          0x0007  SC-8820 MIDI Synth
+product ROLAND PC300           0x0008  PC-300 MIDI Keyboard
 product ROLAND UM1             0x0009  UM-1 MIDI I/F
+product ROLAND SK500           0x000b  SK-500 MIDI Keyboard
+product ROLAND SCD70           0x000c  SC-D70 MIDI Synth
 product ROLAND UM880N          0x0014  EDIROL UM-880 MIDI I/F (native)
 product ROLAND UM880G          0x0015  EDIROL UM-880 MIDI I/F (generic)
+product ROLAND SD90            0x0016  SD-90 MIDI Synth
+product ROLAND UM550           0x0023  UM-550 MIDI I/F
+product ROLAND SD20            0x0027  SD-20 MIDI Synth
+product ROLAND SD80            0x0029  SD-80 MIDI Synth
+product ROLAND UA700           0x002b  UA-700 Audio I/F
 
 /* Rockfire products */
 product ROCKFIRE GAMEPAD       0x2033  gamepad 203USB
@@ -3381,10 +3395,11 @@ product XYRATEX PRISM_GT_2      0x2002  PrismG
 /* Yamaha products */
 product YAMAHA UX256           0x1000  UX256 MIDI I/F
 product YAMAHA UX96            0x1008  UX96 MIDI I/F
+product YAMAHA RPU200          0x3104  RP-U200
 product YAMAHA RTA54I          0x4000  NetVolante RTA54i Broadband&ISDN Router
-product YAMAHA RTA55I          0x4004  NetVolante RTA55i Broadband VoIP Router
 product YAMAHA RTW65B          0x4001  NetVolante RTW65b Broadband Wireless 
Router
 product YAMAHA RTW65I          0x4002  NetVolante RTW65i Broadband&ISDN 
Wireless Router
+product YAMAHA RTA55I          0x4004  NetVolante RTA55i Broadband VoIP Router
 
 /* Yano products */
 product YANO U640MO            0x0101  U640MO-03
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to