Author: thompsa
Date: Mon Jun 15 01:02:43 2009
New Revision: 194228
URL: http://svn.freebsd.org/changeset/base/194228

Log:
  s/usb2_/usb_|usbd_/ on all function names for the USB stack.

Modified:
  head/sys/compat/ndis/subr_usbd.c
  head/sys/dev/ata/ata-usb.c
  head/sys/dev/if_ndis/if_ndis_usb.c
  head/sys/dev/sound/usb/uaudio.c
  head/sys/dev/usb/controller/at91dci.c
  head/sys/dev/usb/controller/at91dci_atmelarm.c
  head/sys/dev/usb/controller/atmegadci.c
  head/sys/dev/usb/controller/atmegadci_atmelarm.c
  head/sys/dev/usb/controller/avr32dci.c
  head/sys/dev/usb/controller/ehci.c
  head/sys/dev/usb/controller/ehci_ixp4xx.c
  head/sys/dev/usb/controller/ehci_mbus.c
  head/sys/dev/usb/controller/ehci_pci.c
  head/sys/dev/usb/controller/musb_otg.c
  head/sys/dev/usb/controller/musb_otg_atmelarm.c
  head/sys/dev/usb/controller/ohci.c
  head/sys/dev/usb/controller/ohci_atmelarm.c
  head/sys/dev/usb/controller/ohci_pci.c
  head/sys/dev/usb/controller/uhci.c
  head/sys/dev/usb/controller/uhci_pci.c
  head/sys/dev/usb/controller/usb_controller.c
  head/sys/dev/usb/controller/uss820dci.c
  head/sys/dev/usb/controller/uss820dci_atmelarm.c
  head/sys/dev/usb/input/uhid.c
  head/sys/dev/usb/input/ukbd.c
  head/sys/dev/usb/input/ums.c
  head/sys/dev/usb/misc/udbp.c
  head/sys/dev/usb/misc/ufm.c
  head/sys/dev/usb/net/if_aue.c
  head/sys/dev/usb/net/if_auereg.h
  head/sys/dev/usb/net/if_axe.c
  head/sys/dev/usb/net/if_axereg.h
  head/sys/dev/usb/net/if_cdce.c
  head/sys/dev/usb/net/if_cue.c
  head/sys/dev/usb/net/if_kue.c
  head/sys/dev/usb/net/if_rue.c
  head/sys/dev/usb/net/if_ruereg.h
  head/sys/dev/usb/net/if_udav.c
  head/sys/dev/usb/net/if_udavreg.h
  head/sys/dev/usb/net/usb_ethernet.c
  head/sys/dev/usb/net/usb_ethernet.h
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/serial/uark.c
  head/sys/dev/usb/serial/ubsa.c
  head/sys/dev/usb/serial/ubser.c
  head/sys/dev/usb/serial/uchcom.c
  head/sys/dev/usb/serial/ucycom.c
  head/sys/dev/usb/serial/ufoma.c
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/serial/ugensa.c
  head/sys/dev/usb/serial/uipaq.c
  head/sys/dev/usb/serial/ulpt.c
  head/sys/dev/usb/serial/umct.c
  head/sys/dev/usb/serial/umodem.c
  head/sys/dev/usb/serial/umoscom.c
  head/sys/dev/usb/serial/uplcom.c
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/dev/usb/serial/usb_serial.h
  head/sys/dev/usb/serial/uslcom.c
  head/sys/dev/usb/serial/uvisor.c
  head/sys/dev/usb/serial/uvscom.c
  head/sys/dev/usb/storage/umass.c
  head/sys/dev/usb/storage/urio.c
  head/sys/dev/usb/storage/ustorage_fs.c
  head/sys/dev/usb/template/usb_template.c
  head/sys/dev/usb/template/usb_template.h
  head/sys/dev/usb/template/usb_template_cdce.c
  head/sys/dev/usb/template/usb_template_msc.c
  head/sys/dev/usb/template/usb_template_mtp.c
  head/sys/dev/usb/usb_busdma.c
  head/sys/dev/usb/usb_busdma.h
  head/sys/dev/usb/usb_compat_linux.c
  head/sys/dev/usb/usb_compat_linux.h
  head/sys/dev/usb/usb_controller.h
  head/sys/dev/usb/usb_core.h
  head/sys/dev/usb/usb_debug.c
  head/sys/dev/usb/usb_debug.h
  head/sys/dev/usb/usb_dev.c
  head/sys/dev/usb/usb_dev.h
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_device.h
  head/sys/dev/usb/usb_dynamic.c
  head/sys/dev/usb/usb_dynamic.h
  head/sys/dev/usb/usb_error.c
  head/sys/dev/usb/usb_generic.c
  head/sys/dev/usb/usb_generic.h
  head/sys/dev/usb/usb_handle_request.c
  head/sys/dev/usb/usb_hid.c
  head/sys/dev/usb/usb_hid.h
  head/sys/dev/usb/usb_hub.c
  head/sys/dev/usb/usb_hub.h
  head/sys/dev/usb/usb_lookup.c
  head/sys/dev/usb/usb_lookup.h
  head/sys/dev/usb/usb_mbuf.c
  head/sys/dev/usb/usb_mbuf.h
  head/sys/dev/usb/usb_msctest.c
  head/sys/dev/usb/usb_msctest.h
  head/sys/dev/usb/usb_parse.c
  head/sys/dev/usb/usb_parse.h
  head/sys/dev/usb/usb_process.c
  head/sys/dev/usb/usb_process.h
  head/sys/dev/usb/usb_request.c
  head/sys/dev/usb/usb_request.h
  head/sys/dev/usb/usb_transfer.c
  head/sys/dev/usb/usb_transfer.h
  head/sys/dev/usb/usb_util.c
  head/sys/dev/usb/usb_util.h
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
  head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c

Modified: head/sys/compat/ndis/subr_usbd.c
==============================================================================
--- head/sys/compat/ndis/subr_usbd.c    Mon Jun 15 00:33:18 2009        
(r194227)
+++ head/sys/compat/ndis/subr_usbd.c    Mon Jun 15 01:02:43 2009        
(r194228)
@@ -472,7 +472,7 @@ usbd_func_getdesc(ip)
                 * The NDIS driver is not allowed to change the
                 * config! There is only one choice!
                 */
-               cdp = usb2_get_config_descriptor(sc->ndisusb_dev);
+               cdp = usbd_get_config_descriptor(sc->ndisusb_dev);
                if (cdp == NULL) {
                        status = USB_ERR_INVAL;
                        goto exit;
@@ -492,7 +492,7 @@ usbd_func_getdesc(ip)
                status = USB_ERR_NORMAL_COMPLETION;
        } else {
                NDISUSB_LOCK(sc);
-               status = usb2_req_get_desc(sc->ndisusb_dev, &sc->ndisusb_mtx,
+               status = usbd_req_get_desc(sc->ndisusb_dev, &sc->ndisusb_mtx,
                    &actlen, ctldesc->ucd_trans_buf, 2,
                    ctldesc->ucd_trans_buflen, ctldesc->ucd_langid,
                    ctldesc->ucd_desctype, ctldesc->ucd_idx,
@@ -540,16 +540,16 @@ usbd_func_selconf(ip)
 
        intf = &selconf->usc_intf;
        for (i = 0; i < conf->bNumInterface && intf->uii_len > 0; i++) {
-               ret = usb2_set_alt_interface_index(udev,
+               ret = usbd_set_alt_interface_index(udev,
                    intf->uii_intfnum, intf->uii_altset);
                if (ret != USB_ERR_NORMAL_COMPLETION && ret != USB_ERR_IN_USE) {
                        device_printf(dev,
                            "setting alternate interface failed: %s\n",
-                           usb2_errstr(ret));
+                           usbd_errstr(ret));
                        return usbd_usb2urb(ret);
                }
 
-               for (j = 0; (ep = usb2_endpoint_foreach(udev, ep)); j++) {
+               for (j = 0; (ep = usb_endpoint_foreach(udev, ep)); j++) {
                        if (j >= intf->uii_numeps) {
                                device_printf(dev,
                                    "endpoint %d and above are ignored",
@@ -608,11 +608,11 @@ usbd_setup_endpoint_one(ip, ifidx, ne, e
        InitializeListHead(&ne->ne_pending);
        KeInitializeSpinLock(&ne->ne_lock);
 
-       status = usb2_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer,
+       status = usbd_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer,
            epconf, 1, sc, &sc->ndisusb_mtx);
        if (status != USB_ERR_NORMAL_COMPLETION) {
                device_printf(dev, "couldn't setup xfer: %s\n",
-                   usb2_errstr(status));
+                   usbd_errstr(status));
                return (status);
        }
        xfer = ne->ne_xfer[0];
@@ -680,11 +680,11 @@ usbd_setup_endpoint(ip, ifidx, ep)
        if (UE_GET_DIR(ep->bEndpointAddress) == UE_DIR_IN)
                cfg.flags.short_xfer_ok = 1;
 
-       status = usb2_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer,
+       status = usbd_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer,
            &cfg, 1, sc, &sc->ndisusb_mtx);
        if (status != USB_ERR_NORMAL_COMPLETION) {
                device_printf(dev, "couldn't setup xfer: %s\n",
-                   usb2_errstr(status));
+                   usbd_errstr(status));
                return (status);
        }
        xfer = ne->ne_xfer[0];
@@ -718,8 +718,8 @@ usbd_func_abort_pipe(ip)
        }
 
        NDISUSB_LOCK(sc);
-       usb2_transfer_stop(ne->ne_xfer[0]);
-       usb2_transfer_start(ne->ne_xfer[0]);
+       usbd_transfer_stop(ne->ne_xfer[0]);
+       usbd_transfer_start(ne->ne_xfer[0]);
        NDISUSB_UNLOCK(sc);
 
        return (USBD_STATUS_SUCCESS);
@@ -800,8 +800,8 @@ usbd_irpcancel(dobj, ip)
         * cancelled and then restarted.
         */
        NDISUSB_LOCK(sc);
-       usb2_transfer_stop(ne->ne_xfer[0]);
-       usb2_transfer_start(ne->ne_xfer[0]);
+       usbd_transfer_stop(ne->ne_xfer[0]);
+       usbd_transfer_start(ne->ne_xfer[0]);
        NDISUSB_UNLOCK(sc);
 
        ip->irp_cancel = TRUE;
@@ -873,7 +873,7 @@ usbd_non_isoc_callback(struct usb_xfer *
 
                /* copy in data with regard to the URB */
                if (ne->ne_dirin != 0)
-                       usb2_copy_out(xfer->frbuffers, 0, nx->nx_urbbuf,
+                       usbd_copy_out(xfer->frbuffers, 0, nx->nx_urbbuf,
                            xfer->frlengths[0]);
                nx->nx_urbbuf += xfer->frlengths[0];
                nx->nx_urbactlen += xfer->frlengths[0];
@@ -929,10 +929,10 @@ next:
 extra:
                len = MIN(xfer->max_data_length, nx->nx_urblen);
                if (UE_GET_DIR(ep->bEndpointAddress) == UE_DIR_OUT)
-                       usb2_copy_in(xfer->frbuffers, 0, nx->nx_urbbuf, len);
+                       usbd_copy_in(xfer->frbuffers, 0, nx->nx_urbbuf, len);
                xfer->frlengths[0] = len;
                xfer->nframes = 1;
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                break;
        default:
                nx = usbd_aq_getfirst(sc, ne);
@@ -941,7 +941,7 @@ extra:
                if (xfer->error != USB_ERR_CANCELLED) {
                        xfer->flags.stall_pipe = 1;
                        device_printf(sc->ndis_dev, "usb xfer warning (%s)\n",
-                           usb2_errstr(xfer->error));
+                           usbd_errstr(xfer->error));
                }
                usbd_xfer_complete(sc, ne, nx, xfer->error);
                if (xfer->error != USB_ERR_CANCELLED)
@@ -974,7 +974,7 @@ usbd_ctrl_callback(struct usb_xfer *xfer
                vcreq = &urb->uu_vcreq;
 
                if (vcreq->uvc_trans_flags & USBD_TRANSFER_DIRECTION_IN) {
-                       usb2_copy_out(xfer->frbuffers + 1, 0,
+                       usbd_copy_out(xfer->frbuffers + 1, 0,
                            vcreq->uvc_trans_buf, xfer->frlengths[1]);
                        nx->nx_urbactlen += xfer->frlengths[1];
                }
@@ -1044,7 +1044,7 @@ next:
                nx->nx_urblen           = vcreq->uvc_trans_buflen;
                nx->nx_urbactlen        = 0;
 
-               usb2_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
+               usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
                xfer->frlengths[0] = sizeof(req);
                xfer->nframes = 1;
                if (vcreq->uvc_trans_flags & USBD_TRANSFER_DIRECTION_IN) {
@@ -1066,13 +1066,13 @@ next:
                         * the future if it needs to be.
                         */
                        if (nx->nx_urblen > 0) {
-                               usb2_copy_in(xfer->frbuffers + 1 , 0,
+                               usbd_copy_in(xfer->frbuffers + 1 , 0,
                                    nx->nx_urbbuf, nx->nx_urblen);
                                xfer->frlengths[1] = nx->nx_urblen;
                                xfer->nframes = 2;
                        }
                }
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                break;
        default:
                nx = usbd_aq_getfirst(sc, ne);
@@ -1081,7 +1081,7 @@ next:
                if (xfer->error != USB_ERR_CANCELLED) {
                        xfer->flags.stall_pipe = 1;
                        device_printf(sc->ndis_dev, "usb xfer warning (%s)\n",
-                           usb2_errstr(xfer->error));
+                           usbd_errstr(xfer->error));
                }
                usbd_xfer_complete(sc, ne, nx, xfer->error);
                if (xfer->error != USB_ERR_CANCELLED)
@@ -1244,7 +1244,7 @@ usbd_task(dobj, arg)
                        ne = usbd_get_ndisep(ip, urb->uu_bulkintr.ubi_epdesc);
                        if (ne == NULL)
                                goto exit;
-                       usb2_transfer_start(ne->ne_xfer[0]);
+                       usbd_transfer_start(ne->ne_xfer[0]);
                        break;
                case NDISUSB_TASK_IRPCANCEL:
                        ne = usbd_get_ndisep(ip,
@@ -1254,14 +1254,14 @@ usbd_task(dobj, arg)
                        if (ne == NULL)
                                goto exit;
                        
-                       usb2_transfer_stop(ne->ne_xfer[0]);
-                       usb2_transfer_start(ne->ne_xfer[0]);
+                       usbd_transfer_stop(ne->ne_xfer[0]);
+                       usbd_transfer_start(ne->ne_xfer[0]);
                        break;
                case NDISUSB_TASK_VENDOR:
                        ne = (urb->uu_vcreq.uvc_trans_flags &
                            USBD_TRANSFER_DIRECTION_IN) ?
                            &sc->ndisusb_dread_ep : &sc->ndisusb_dwrite_ep;
-                       usb2_transfer_start(ne->ne_xfer[0]);
+                       usbd_transfer_start(ne->ne_xfer[0]);
                        break;
                default:
                        break;
@@ -1437,7 +1437,7 @@ USBD_ParseConfigurationDescriptorEx(conf
        struct usb_descriptor *next = NULL;
        usb_interface_descriptor_t *desc;
 
-       while ((next = usb2_desc_foreach(conf, next)) != NULL) {
+       while ((next = usb_desc_foreach(conf, next)) != NULL) {
                desc = (usb_interface_descriptor_t *)next;
                if (desc->bDescriptorType != UDESC_INTERFACE)
                        continue;

Modified: head/sys/dev/ata/ata-usb.c
==============================================================================
--- head/sys/dev/ata/ata-usb.c  Mon Jun 15 00:33:18 2009        (r194227)
+++ head/sys/dev/ata/ata-usb.c  Mon Jun 15 01:02:43 2009        (r194228)
@@ -288,7 +288,7 @@ atausb2_probe(device_t dev)
                /* give other drivers a try first */
                return (ENXIO);
        }
-       id = usb2_get_interface_descriptor(uaa->iface);
+       id = usbd_get_interface_descriptor(uaa->iface);
        if ((!id) || (id->bInterfaceClass != UICLASS_MASS)) {
                return (ENXIO);
        }
@@ -328,16 +328,16 @@ atausb2_attach(device_t dev)
        uint8_t has_intr;
        int err;
 
-       device_set_usb2_desc(dev);
+       device_set_usb_desc(dev);
 
        sc->dev = dev;
        sc->maxlun = 0;
        sc->locked_ch = NULL;
        sc->restart_ch = NULL;
-       sc->usb2_speed = usb2_get_speed(uaa->device);
+       sc->usb2_speed = usbd_get_speed(uaa->device);
        mtx_init(&sc->locked_mtx, "ATAUSB lock", NULL, (MTX_DEF | MTX_RECURSE));
 
-       id = usb2_get_interface_descriptor(uaa->iface);
+       id = usbd_get_interface_descriptor(uaa->iface);
        switch (id->bInterfaceProtocol) {
        case UIPROTO_MASS_BBB:
        case UIPROTO_MASS_BBB_OLD:
@@ -380,7 +380,7 @@ atausb2_attach(device_t dev)
            (strcmp(subclass, "ATAPI") && strcmp(subclass, "SCSI"))) {
                goto detach;
        }
-       err = usb2_transfer_setup(uaa->device, &uaa->info.bIfaceIndex,
+       err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex,
            sc->xfer, atausb2_config, ATAUSB_T_BBB_MAX, sc,
            &sc->locked_mtx);
 
@@ -389,7 +389,7 @@ atausb2_attach(device_t dev)
 
        if (err) {
                device_printf(sc->dev, "could not setup required "
-                   "transfers, %s\n", usb2_errstr(err));
+                   "transfers, %s\n", usbd_errstr(err));
                goto detach;
        }
        /* get number of devices so we can add matching channels */
@@ -398,12 +398,12 @@ atausb2_attach(device_t dev)
        USETW(request.wValue, 0);
        USETW(request.wIndex, sc->iface_no);
        USETW(request.wLength, sizeof(maxlun));
-       err = usb2_do_request(uaa->device, &Giant, &request, &maxlun);
+       err = usbd_do_request(uaa->device, &Giant, &request, &maxlun);
 
        if (err) {
                if (bootverbose) {
                        device_printf(sc->dev, "get maxlun not supported %s\n",
-                           usb2_errstr(err));
+                           usbd_errstr(err));
                }
        } else {
                sc->maxlun = maxlun;
@@ -438,7 +438,7 @@ atausb2_detach(device_t dev)
 
        /* teardown our statemachine */
 
-       usb2_transfer_unsetup(sc->xfer, ATAUSB_T_MAX);
+       usbd_transfer_unsetup(sc->xfer, ATAUSB_T_MAX);
 
        /* detach & delete all children, if any */
 
@@ -460,7 +460,7 @@ atausb2_transfer_start(struct atausb2_so
        }
        if (sc->xfer[xfer_no]) {
                sc->last_xfer_no = xfer_no;
-               usb2_transfer_start(sc->xfer[xfer_no]);
+               usbd_transfer_start(sc->xfer[xfer_no]);
        } else {
                atausb2_cancel_request(sc);
        }
@@ -485,11 +485,11 @@ atausb2_t_bbb_reset1_callback(struct usb
                req.wIndex[1] = 0;
                USETW(req.wLength, 0);
 
-               usb2_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
+               usbd_copy_in(xfer->frbuffers, 0, &req, sizeof(req));
 
                xfer->frlengths[0] = sizeof(req);
                xfer->nframes = 1;
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:                        /* Error */
@@ -527,7 +527,7 @@ tr_transferred:
                return;
 
        case USB_ST_SETUP:
-               if (usb2_clear_stall_callback(xfer, sc->xfer[stall_xfer])) {
+               if (usbd_clear_stall_callback(xfer, sc->xfer[stall_xfer])) {
                        goto tr_transferred;
                }
                return;
@@ -575,10 +575,10 @@ atausb2_t_bbb_command_callback(struct us
                        bzero(sc->cbw.cdb, 16);
                        bcopy(request->u.atapi.ccb, sc->cbw.cdb, 12);   /* XXX 
SOS */
 
-                       usb2_copy_in(xfer->frbuffers, 0, &sc->cbw, 
sizeof(sc->cbw));
+                       usbd_copy_in(xfer->frbuffers, 0, &sc->cbw, 
sizeof(sc->cbw));
 
                        xfer->frlengths[0] = sizeof(sc->cbw);
-                       usb2_start_hardware(xfer);
+                       usbd_transfer_submit(xfer);
                }
                return;
 
@@ -598,7 +598,7 @@ atausb2_t_bbb_data_read_callback(struct 
        switch (USB_GET_STATE(xfer)) {
        case USB_ST_TRANSFERRED:
 
-               usb2_copy_out(xfer->frbuffers, 0,
+               usbd_copy_out(xfer->frbuffers, 0,
                    sc->ata_data, xfer->actlen);
 
                sc->ata_bytecount -= xfer->actlen;
@@ -625,7 +625,7 @@ atausb2_t_bbb_data_read_callback(struct 
                xfer->timeout = sc->timeout;
                xfer->frlengths[0] = max_bulk;
 
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:                        /* Error */
@@ -675,10 +675,10 @@ atausb2_t_bbb_data_write_callback(struct
                xfer->timeout = sc->timeout;
                xfer->frlengths[0] = max_bulk;
 
-               usb2_copy_in(xfer->frbuffers, 0,
+               usbd_copy_in(xfer->frbuffers, 0,
                    sc->ata_data, max_bulk);
 
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:                        /* Error */
@@ -712,7 +712,7 @@ atausb2_t_bbb_status_callback(struct usb
                if (xfer->actlen < sizeof(sc->csw)) {
                        bzero(&sc->csw, sizeof(sc->csw));
                }
-               usb2_copy_out(xfer->frbuffers, 0, &sc->csw, xfer->actlen);
+               usbd_copy_out(xfer->frbuffers, 0, &sc->csw, xfer->actlen);
 
                if (request->flags & (ATA_R_READ | ATA_R_WRITE)) {
                        request->donecount = sc->ata_donecount;
@@ -780,7 +780,7 @@ atausb2_t_bbb_status_callback(struct usb
 
        case USB_ST_SETUP:
                xfer->frlengths[0] = xfer->max_data_length;
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:
@@ -828,7 +828,7 @@ atausb2_tr_error(struct usb_xfer *xfer)
 
                if (atausbdebug) {
                        device_printf(sc->dev, "transfer failed, %s, in state 
%d "
-                           "-> BULK reset\n", usb2_errstr(xfer->error),
+                           "-> BULK reset\n", usbd_errstr(xfer->error),
                            sc->last_xfer_no);
                }
        }
@@ -903,7 +903,7 @@ ata_usbchannel_begin_transaction(struct 
                sc->ata_data = request->data;
                sc->ata_donecount = 0;
 
-               usb2_transfer_start(sc->xfer[sc->last_xfer_no]);
+               usbd_transfer_start(sc->xfer[sc->last_xfer_no]);
                error = ATA_OP_CONTINUES;
        } else {
                request->result = EIO;

Modified: head/sys/dev/if_ndis/if_ndis_usb.c
==============================================================================
--- head/sys/dev/if_ndis/if_ndis_usb.c  Mon Jun 15 00:33:18 2009        
(r194227)
+++ head/sys/dev/if_ndis/if_ndis_usb.c  Mon Jun 15 01:02:43 2009        
(r194228)
@@ -211,12 +211,12 @@ ndisusb_detach(device_t self)
        ndis_pnpevent_nic(self, NDIS_PNP_EVENT_SURPRISE_REMOVED);
 
        if (sc->ndisusb_status & NDISUSB_STATUS_SETUP_EP) {
-               usb2_transfer_unsetup(sc->ndisusb_dread_ep.ne_xfer, 1);
-               usb2_transfer_unsetup(sc->ndisusb_dwrite_ep.ne_xfer, 1);
+               usbd_transfer_unsetup(sc->ndisusb_dread_ep.ne_xfer, 1);
+               usbd_transfer_unsetup(sc->ndisusb_dwrite_ep.ne_xfer, 1);
        }
        for (i = 0; i < NDISUSB_ENDPT_MAX; i++) {
                ne = &sc->ndisusb_ep[i];
-               usb2_transfer_unsetup(ne->ne_xfer, 1);
+               usbd_transfer_unsetup(ne->ne_xfer, 1);
        }
 
        (void)ndis_detach(self);

Modified: head/sys/dev/sound/usb/uaudio.c
==============================================================================
--- head/sys/dev/sound/usb/uaudio.c     Mon Jun 15 00:33:18 2009        
(r194227)
+++ head/sys/dev/sound/usb/uaudio.c     Mon Jun 15 01:02:43 2009        
(r194228)
@@ -547,7 +547,7 @@ uaudio_probe(device_t dev)
 
        if ((uaa->info.bInterfaceClass == UICLASS_AUDIO) &&
            (uaa->info.bInterfaceSubClass == UISUBCLASS_AUDIOCONTROL)) {
-               if (usb2_test_quirk(uaa, UQ_BAD_AUDIO))
+               if (usb_test_quirk(uaa, UQ_BAD_AUDIO))
                        return (ENXIO);
                else
                        return (0);
@@ -567,23 +567,23 @@ uaudio_attach(device_t dev)
        sc->sc_rec_chan.priv_sc = sc;
        sc->sc_udev = uaa->device;
 
-       if (usb2_test_quirk(uaa, UQ_AUDIO_SWAP_LR))
+       if (usb_test_quirk(uaa, UQ_AUDIO_SWAP_LR))
                sc->sc_uq_audio_swap_lr = 1;
 
-       if (usb2_test_quirk(uaa, UQ_AU_INP_ASYNC))
+       if (usb_test_quirk(uaa, UQ_AU_INP_ASYNC))
                sc->sc_uq_au_inp_async = 1;
 
-       if (usb2_test_quirk(uaa, UQ_AU_NO_XU))
+       if (usb_test_quirk(uaa, UQ_AU_NO_XU))
                sc->sc_uq_au_no_xu = 1;
 
-       if (usb2_test_quirk(uaa, UQ_BAD_ADC))
+       if (usb_test_quirk(uaa, UQ_BAD_ADC))
                sc->sc_uq_bad_adc = 1;
 
        umidi_init(dev);
 
-       device_set_usb2_desc(dev);
+       device_set_usb_desc(dev);
 
-       id = usb2_get_interface_descriptor(uaa->iface);
+       id = usbd_get_interface_descriptor(uaa->iface);
 
        uaudio_chan_fill_info(sc, uaa->device);
 
@@ -728,7 +728,7 @@ repeat:
 
        if (error) {
                device_printf(dev, "Waiting for sound application to exit!\n");
-               usb2_pause_mtx(NULL, 2 * hz);
+               usb_pause_mtx(NULL, 2 * hz);
                goto repeat;            /* try again */
        }
        return (0);                     /* success */
@@ -783,7 +783,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
        const struct usb2_audio_streaming_endpoint_descriptor *sed = NULL;
        const usb2_endpoint_descriptor_audio_t *ed1 = NULL;
        const usb2_endpoint_descriptor_audio_t *ed2 = NULL;
-       struct usb_config_descriptor *cd = usb2_get_config_descriptor(udev);
+       struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev);
        struct usb_interface_descriptor *id;
        const struct uaudio_format *p_fmt;
        struct uaudio_chan *chan;
@@ -800,7 +800,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
        uint8_t audio_if = 0;
        uint8_t sample_size;
 
-       while ((desc = usb2_desc_foreach(cd, desc))) {
+       while ((desc = usb_desc_foreach(cd, desc))) {
 
                if ((desc->bDescriptorType == UDESC_INTERFACE) &&
                    (desc->bLength >= sizeof(*id))) {
@@ -832,7 +832,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
                                 */
 
                                if ((sc->sc_midi_chan.valid == 0) &&
-                                   usb2_get_iface(udev, curidx)) {
+                                   usbd_get_iface(udev, curidx)) {
                                        sc->sc_midi_chan.iface_index = curidx;
                                        sc->sc_midi_chan.iface_alt_index = 
alt_index;
                                        sc->sc_midi_chan.valid = 1;
@@ -994,7 +994,7 @@ uaudio_chan_fill_info_sub(struct uaudio_
                                    &sc->sc_rec_chan :
                                    &sc->sc_play_chan;
 
-                               if ((chan->valid == 0) && usb2_get_iface(udev, 
curidx)) {
+                               if ((chan->valid == 0) && usbd_get_iface(udev, 
curidx)) {
 
                                        chan->valid = 1;
 #if USB_DEBUG
@@ -1061,7 +1061,7 @@ uaudio_chan_fill_info(struct uaudio_soft
 {
        uint32_t rate = uaudio_default_rate;
        uint32_t z;
-       uint16_t fps = usb2_get_isoc_fps(udev);
+       uint16_t fps = usbd_get_isoc_fps(udev);
        uint8_t bits = uaudio_default_bits;
        uint8_t y;
        uint8_t channels = uaudio_default_channels;
@@ -1172,7 +1172,7 @@ tr_transferred:
                        if (n > total) {
                                n = total;
                        }
-                       usb2_copy_in(xfer->frbuffers, offset, ch->cur, n);
+                       usbd_copy_in(xfer->frbuffers, offset, ch->cur, n);
 
                        total -= n;
                        ch->cur += n;
@@ -1183,7 +1183,7 @@ tr_transferred:
                        }
                }
 
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                break;
 
        default:                        /* Error */
@@ -1249,7 +1249,7 @@ tr_transferred:
                                if (m > p_len[n]) {
                                        m = p_len[n];
                                }
-                               usb2_copy_out(xfer->frbuffers, offset1, 
ch->cur, m);
+                               usbd_copy_out(xfer->frbuffers, offset1, 
ch->cur, m);
 
                                p_len[n] -= m;
                                offset1 += m;
@@ -1282,7 +1282,7 @@ tr_transferred:
                        DPRINTF("no buffer!\n");
                        return;
                }
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:                        /* Error */
@@ -1361,13 +1361,13 @@ uaudio_chan_init(struct uaudio_softc *sc
        DPRINTF("endpoint=0x%02x, speed=%d, iface=%d alt=%d\n",
            endpoint, ch->sample_rate, iface_index, alt_index);
 
-       err = usb2_set_alt_interface_index(sc->sc_udev, iface_index, alt_index);
+       err = usbd_set_alt_interface_index(sc->sc_udev, iface_index, alt_index);
        if (err) {
                DPRINTF("setting of alternate index failed: %s!\n",
-                   usb2_errstr(err));
+                   usbd_errstr(err));
                goto error;
        }
-       usb2_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);
 
        /*
         * If just one sampling rate is supported,
@@ -1383,7 +1383,7 @@ uaudio_chan_init(struct uaudio_softc *sc
                        DPRINTF("setting of sample rate failed! (continuing 
anyway)\n");
                }
        }
-       if (usb2_transfer_setup(sc->sc_udev, &iface_index, ch->xfer,
+       if (usbd_transfer_setup(sc->sc_udev, &iface_index, ch->xfer,
            ch->usb2_cfg, UAUDIO_NCHANBUFS, ch, ch->pcm_mtx)) {
                DPRINTF("could not allocate USB transfers!\n");
                goto error;
@@ -1402,7 +1402,7 @@ uaudio_chan_free(struct uaudio_chan *ch)
                free(ch->buf, M_DEVBUF);
                ch->buf = NULL;
        }
-       usb2_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS);
+       usbd_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS);
 
        ch->valid = 0;
 
@@ -1521,10 +1521,10 @@ uaudio_chan_start(struct uaudio_chan *ch
 #error "please update code"
 #endif
        if (ch->xfer[0]) {
-               usb2_transfer_start(ch->xfer[0]);
+               usbd_transfer_start(ch->xfer[0]);
        }
        if (ch->xfer[1]) {
-               usb2_transfer_start(ch->xfer[1]);
+               usbd_transfer_start(ch->xfer[1]);
        }
        return (0);
 }
@@ -1535,8 +1535,8 @@ uaudio_chan_stop(struct uaudio_chan *ch)
 #if (UAUDIO_NCHANBUFS != 2)
 #error "please update code"
 #endif
-       usb2_transfer_stop(ch->xfer[0]);
-       usb2_transfer_stop(ch->xfer[1]);
+       usbd_transfer_stop(ch->xfer[0]);
+       usbd_transfer_stop(ch->xfer[1]);
        return (0);
 }
 
@@ -2677,7 +2677,7 @@ uaudio_mixer_fill_info(struct uaudio_sof
     void *desc)
 {
        const struct usb2_audio_control_descriptor *acdp;
-       struct usb_config_descriptor *cd = usb2_get_config_descriptor(udev);
+       struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev);
        const struct usb_descriptor *dp;
        const struct usb2_audio_unit *au;
        struct uaudio_terminal_node *iot = NULL;
@@ -2685,7 +2685,7 @@ uaudio_mixer_fill_info(struct uaudio_sof
        uint8_t ID_max = 0;             /* inclusive */
        uint8_t i;
 
-       desc = usb2_desc_foreach(cd, desc);
+       desc = usb_desc_foreach(cd, desc);
 
        if (desc == NULL) {
                DPRINTF("no Audio Control header\n");
@@ -2724,7 +2724,7 @@ uaudio_mixer_fill_info(struct uaudio_sof
                DPRINTF("no memory!\n");
                goto done;
        }
-       while ((desc = usb2_desc_foreach(cd, desc))) {
+       while ((desc = usb_desc_foreach(cd, desc))) {
 
                dp = desc;
 
@@ -2939,9 +2939,9 @@ uaudio_mixer_get(struct usb_device *udev
        USETW(req.wIndex, mc->wIndex);
        USETW(req.wLength, len);
 
-       err = usb2_do_request(udev, &Giant, &req, data);
+       err = usbd_do_request(udev, &Giant, &req, data);
        if (err) {
-               DPRINTF("err=%s\n", usb2_errstr(err));
+               DPRINTF("err=%s\n", usbd_errstr(err));
                return (0);
        }
        if (len < 1) {
@@ -3011,13 +3011,13 @@ tr_setup:
                                        if (len > 1) {
                                                buf[1] = (mc->wData[chan] >> 8) 
& 0xFF;
                                        }
-                                       usb2_copy_in(xfer->frbuffers, 0, &req, 
sizeof(req));
-                                       usb2_copy_in(xfer->frbuffers + 1, 0, 
buf, len);
+                                       usbd_copy_in(xfer->frbuffers, 0, &req, 
sizeof(req));
+                                       usbd_copy_in(xfer->frbuffers + 1, 0, 
buf, len);
 
                                        xfer->frlengths[0] = sizeof(req);
                                        xfer->frlengths[1] = len;
                                        xfer->nframes = xfer->frlengths[1] ? 2 
: 1;
-                                       usb2_start_hardware(xfer);
+                                       usbd_transfer_submit(xfer);
                                        return;
                                }
                        }
@@ -3033,7 +3033,7 @@ tr_setup:
                break;
 
        default:                        /* Error */
-               DPRINTF("error=%s\n", usb2_errstr(xfer->error));
+               DPRINTF("error=%s\n", usbd_errstr(xfer->error));
                if (xfer->error == USB_ERR_CANCELLED) {
                        /* do nothing - we are detaching */
                        break;
@@ -3059,7 +3059,7 @@ uaudio_set_speed(struct usb_device *udev
        data[1] = speed >> 8;
        data[2] = speed >> 16;
 
-       return (usb2_do_request(udev, &Giant, &req, data));
+       return (usbd_do_request(udev, &Giant, &req, data));
 }
 
 static int
@@ -3105,7 +3105,7 @@ uaudio_mixer_ctl_set(struct uaudio_softc
 
        /* start the transfer, if not already started */
 
-       usb2_transfer_start(sc->sc_mixer_xfer[0]);
+       usbd_transfer_start(sc->sc_mixer_xfer[0]);
 }
 
 static void
@@ -3142,7 +3142,7 @@ uaudio_mixer_init_sub(struct uaudio_soft
 {
        DPRINTF("\n");
 
-       if (usb2_transfer_setup(sc->sc_udev, &sc->sc_mixer_iface_index,
+       if (usbd_transfer_setup(sc->sc_udev, &sc->sc_mixer_iface_index,
            sc->sc_mixer_xfer, uaudio_mixer_config, 1, sc,
            mixer_get_lock(m))) {
                DPRINTFN(0, "could not allocate USB "
@@ -3163,7 +3163,7 @@ uaudio_mixer_uninit_sub(struct uaudio_so
 {
        DPRINTF("\n");
 
-       usb2_transfer_unsetup(sc->sc_mixer_xfer, 1);
+       usbd_transfer_unsetup(sc->sc_mixer_xfer, 1);
 
        return (0);
 }
@@ -3242,10 +3242,10 @@ umidi_read_clear_stall_callback(struct u
        struct umidi_chan *chan = xfer->priv_sc;
        struct usb_xfer *xfer_other = chan->xfer[1];
 
-       if (usb2_clear_stall_callback(xfer, xfer_other)) {
+       if (usbd_clear_stall_callback(xfer, xfer_other)) {
                DPRINTF("stall cleared\n");
                chan->flags &= ~UMIDI_FLAG_READ_STALL;
-               usb2_transfer_start(xfer_other);
+               usbd_transfer_start(xfer_other);
        }
 }
 
@@ -3272,14 +3272,14 @@ umidi_bulk_read_callback(struct usb_xfer
 
                while (xfer->actlen >= 4) {
 
-                       usb2_copy_out(xfer->frbuffers, pos, buf, 1);
+                       usbd_copy_out(xfer->frbuffers, pos, buf, 1);
 
                        cmd_len = umidi_cmd_to_len[buf[0] & 0xF];       /* 
command length */
                        cn = buf[0] >> 4;       /* cable number */
                        sub = &chan->sub[cn];
 
                        if (cmd_len && (cn < chan->max_cable) && 
sub->read_open) {
-                               usb2_fifo_put_data(sub->fifo.fp[USB_FIFO_RX], 
xfer->frbuffers,
+                               usb_fifo_put_data(sub->fifo.fp[USB_FIFO_RX], 
xfer->frbuffers,
                                    pos + 1, cmd_len, 1);
                        } else {
                                /* ignore the command */
@@ -3293,22 +3293,22 @@ umidi_bulk_read_callback(struct usb_xfer
                DPRINTF("start\n");
 
                if (chan->flags & UMIDI_FLAG_READ_STALL) {
-                       usb2_transfer_start(chan->xfer[3]);
+                       usbd_transfer_start(chan->xfer[3]);
                        return;
                }
                xfer->frlengths[0] = xfer->max_data_length;
-               usb2_start_hardware(xfer);
+               usbd_transfer_submit(xfer);
                return;
 
        default:
 tr_error:
 
-               DPRINTF("error=%s\n", usb2_errstr(xfer->error));
+               DPRINTF("error=%s\n", usbd_errstr(xfer->error));
 
                if (xfer->error != USB_ERR_CANCELLED) {
                        /* try to clear stall first */
                        chan->flags |= UMIDI_FLAG_READ_STALL;
-                       usb2_transfer_start(chan->xfer[3]);
+                       usbd_transfer_start(chan->xfer[3]);
                }
                return;
 
@@ -3321,10 +3321,10 @@ umidi_write_clear_stall_callback(struct 
        struct umidi_chan *chan = xfer->priv_sc;
        struct usb_xfer *xfer_other = chan->xfer[0];
 
-       if (usb2_clear_stall_callback(xfer, xfer_other)) {
+       if (usbd_clear_stall_callback(xfer, xfer_other)) {
                DPRINTF("stall cleared\n");
                chan->flags &= ~UMIDI_FLAG_WRITE_STALL;
-               usb2_transfer_start(xfer_other);
+               usbd_transfer_start(xfer_other);
        }
 }
 
@@ -3481,7 +3481,7 @@ umidi_bulk_write_callback(struct usb_xfe
                DPRINTF("start\n");
 
                if (chan->flags & UMIDI_FLAG_WRITE_STALL) {
-                       usb2_transfer_start(chan->xfer[2]);
+                       usbd_transfer_start(chan->xfer[2]);
                        return;
                }
                total_length = 0;       /* reset */
@@ -3497,7 +3497,7 @@ umidi_bulk_write_callback(struct usb_xfe
                        sub = &chan->sub[chan->curr_cable];
 
                        if (sub->write_open) {
-                               usb2_fifo_get_data(sub->fifo.fp[USB_FIFO_TX],
+                               usb_fifo_get_data(sub->fifo.fp[USB_FIFO_TX],
                                    xfer->frbuffers, total_length,
                                    1, &actlen, 0);
                        } else {
@@ -3505,7 +3505,7 @@ umidi_bulk_write_callback(struct usb_xfe
                        }
 
                        if (actlen) {
-                               usb2_copy_out(xfer->frbuffers, total_length, 
&buf, 1);
+                               usbd_copy_out(xfer->frbuffers, total_length, 
&buf, 1);
 
                                tr_any = 1;
 
@@ -3517,7 +3517,7 @@ umidi_bulk_write_callback(struct usb_xfe
                                            sub->temp_cmd[0], sub->temp_cmd[1],
                                            sub->temp_cmd[2], sub->temp_cmd[3]);
 
-                                       usb2_copy_in(xfer->frbuffers, 
total_length,
+                                       usbd_copy_in(xfer->frbuffers, 
total_length,
                                            sub->temp_cmd, 4);
 
                                        total_length += 4;
@@ -3543,18 +3543,18 @@ umidi_bulk_write_callback(struct usb_xfe
 
                if (total_length) {
                        xfer->frlengths[0] = total_length;
-                       usb2_start_hardware(xfer);
+                       usbd_transfer_submit(xfer);
                }
                return;
 
        default:                        /* Error */
 
-               DPRINTF("error=%s\n", usb2_errstr(xfer->error));
+               DPRINTF("error=%s\n", usbd_errstr(xfer->error));
 
                if (xfer->error != USB_ERR_CANCELLED) {
                        /* try to clear stall first */
                        chan->flags |= UMIDI_FLAG_WRITE_STALL;
-                       usb2_transfer_start(chan->xfer[2]);
+                       usbd_transfer_start(chan->xfer[2]);
                }
                return;
 
@@ -3587,7 +3587,7 @@ umidi_start_read(struct usb_fifo *fifo)
 {
        struct umidi_chan *chan = fifo->priv_sc0;
 
-       usb2_transfer_start(chan->xfer[1]);
+       usbd_transfer_start(chan->xfer[1]);
 }
 
 static void
@@ -3614,7 +3614,7 @@ umidi_start_write(struct usb_fifo *fifo)
 {
        struct umidi_chan *chan = fifo->priv_sc0;
 
-       usb2_transfer_start(chan->xfer[0]);
+       usbd_transfer_start(chan->xfer[0]);
 }
 
 static void
@@ -3629,8 +3629,8 @@ umidi_stop_write(struct usb_fifo *fifo)
 
        if (--(chan->write_open_refcount) == 0) {
                DPRINTF("(stopping write transfer)\n");
-               usb2_transfer_stop(chan->xfer[2]);
-               usb2_transfer_stop(chan->xfer[0]);
+               usbd_transfer_stop(chan->xfer[2]);
+               usbd_transfer_stop(chan->xfer[0]);
        }
 }
 
@@ -3641,7 +3641,7 @@ umidi_open(struct usb_fifo *fifo, int ff
        struct umidi_sub_chan *sub = umidi_sub_by_fifo(fifo);
 
        if (fflags & FREAD) {
-               if (usb2_fifo_alloc_buffer(fifo, 4, (1024 / 4))) {
+               if (usb_fifo_alloc_buffer(fifo, 4, (1024 / 4))) {
                        return (ENOMEM);
                }
                mtx_lock(fifo->priv_mtx);
@@ -3650,7 +3650,7 @@ umidi_open(struct usb_fifo *fifo, int ff
                mtx_unlock(fifo->priv_mtx);
        }
        if (fflags & FWRITE) {
-               if (usb2_fifo_alloc_buffer(fifo, 32, (1024 / 32))) {
+               if (usb_fifo_alloc_buffer(fifo, 32, (1024 / 32))) {
                        return (ENOMEM);
                }
                /* clear stall first */
@@ -3670,10 +3670,10 @@ static void
 umidi_close(struct usb_fifo *fifo, int fflags)
 {
        if (fflags & FREAD) {
-               usb2_fifo_free_buffer(fifo);
+               usb_fifo_free_buffer(fifo);
        }
        if (fflags & FWRITE) {
-               usb2_fifo_free_buffer(fifo);
+               usb_fifo_free_buffer(fifo);
        }
 }
 
@@ -3716,18 +3716,18 @@ umidi_probe(device_t dev)
        int error;
        uint32_t n;
 
-       if (usb2_set_alt_interface_index(sc->sc_udev, chan->iface_index,
+       if (usbd_set_alt_interface_index(sc->sc_udev, chan->iface_index,
            chan->iface_alt_index)) {
                DPRINTF("setting of alternate index failed!\n");
                goto detach;
        }
-       usb2_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 = usb2_transfer_setup(uaa->device, &chan->iface_index,
+       error = usbd_transfer_setup(uaa->device, &chan->iface_index,
            chan->xfer, umidi_config, UMIDI_N_TRANSFER,
            chan, &chan->mtx);
        if (error) {
-               DPRINTF("error=%s\n", usb2_errstr(error));
+               DPRINTF("error=%s\n", usbd_errstr(error));
                goto detach;
        }
        if ((chan->max_cable > UMIDI_CABLES_MAX) ||
@@ -3739,7 +3739,7 @@ umidi_probe(device_t dev)
 
                sub = &chan->sub[n];
 
-               error = usb2_fifo_attach(sc->sc_udev, chan, &chan->mtx,
+               error = usb_fifo_attach(sc->sc_udev, chan, &chan->mtx,
                    &umidi_fifo_methods, &sub->fifo, unit, n,
                    chan->iface_index,
                    UID_ROOT, GID_OPERATOR, 0644);
@@ -3757,7 +3757,7 @@ umidi_probe(device_t dev)
         * NOTE: at least one device will not work properly unless
         * the BULK pipe is open all the time.
         */
-       usb2_transfer_start(chan->xfer[1]);
+       usbd_transfer_start(chan->xfer[1]);
 
        mtx_unlock(&chan->mtx);
 
@@ -3775,17 +3775,17 @@ umidi_detach(device_t dev)
        uint32_t n;
 
        for (n = 0; n < UMIDI_CABLES_MAX; n++) {
-               usb2_fifo_detach(&chan->sub[n].fifo);
+               usb_fifo_detach(&chan->sub[n].fifo);
        }
 
        mtx_lock(&chan->mtx);
 
-       usb2_transfer_stop(chan->xfer[3]);
-       usb2_transfer_stop(chan->xfer[1]);
+       usbd_transfer_stop(chan->xfer[3]);
+       usbd_transfer_stop(chan->xfer[1]);
 
        mtx_unlock(&chan->mtx);
 
-       usb2_transfer_unsetup(chan->xfer, UMIDI_N_TRANSFER);
+       usbd_transfer_unsetup(chan->xfer, UMIDI_N_TRANSFER);
 
        mtx_destroy(&chan->mtx);
 

Modified: head/sys/dev/usb/controller/at91dci.c
==============================================================================
--- head/sys/dev/usb/controller/at91dci.c       Mon Jun 15 00:33:18 2009        
(r194227)
+++ head/sys/dev/usb/controller/at91dci.c       Mon Jun 15 01:02:43 2009        
(r194228)
@@ -260,7 +260,7 @@ at91dci_wakeup_peer(struct at91dci_softc
 
        /* wait 8 milliseconds */
        /* Wait for reset to complete. */
-       usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125);
+       usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125);
 
        AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0);
 }
@@ -321,7 +321,7 @@ at91dci_setup_rx(struct at91dci_td *td)
            td->fifo_reg, (void *)&req, sizeof(req));
 
        /* copy data into real buffer */
-       usb2_copy_in(td->pc, 0, &req, sizeof(req));
+       usbd_copy_in(td->pc, 0, &req, sizeof(req));
 
        td->offset = sizeof(req);
        td->remainder = 0;
@@ -442,7 +442,7 @@ repeat:
                return (0);             /* we are complete */
        }
        while (count > 0) {
-               usb2_get_page(td->pc, td->offset, &buf_res);
+               usbd_get_page(td->pc, td->offset, &buf_res);
 
                /* get correct length */
                if (buf_res.length > count) {
@@ -549,7 +549,7 @@ repeat:
        }
        while (count > 0) {
 
-               usb2_get_page(td->pc, td->offset, &buf_res);
+               usbd_get_page(td->pc, td->offset, &buf_res);
 
                /* get correct length */
                if (buf_res.length > count) {
@@ -865,7 +865,7 @@ at91dci_setup_standard_chain(struct usb_
 
        DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n",
            xfer->address, UE_GET_ADDR(xfer->endpointno),
-           xfer->sumlen, usb2_get_speed(xfer->xroot->udev));
+           xfer->sumlen, usbd_get_speed(xfer->xroot->udev));
 
        temp.max_frame_size = xfer->max_frame_size;
 
@@ -1046,11 +1046,11 @@ at91dci_start_standard_chain(struct usb_
                DPRINTFN(15, "enable interrupts on endpoint %d\n", ep_no);
 
                /* put transfer on interrupt queue */
-               usb2_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer);
+               usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer);
 
                /* start timeout, if any */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
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