From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 18:20:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 240E910659D2; Sun, 5 Apr 2009 18:20:39 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC178FC18; Sun, 5 Apr 2009 18:20:39 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n35IKdPQ027938; Sun, 5 Apr 2009 18:20:39 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n35IKcje027916; Sun, 5 Apr 2009 18:20:38 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904051820.n35IKcje027916@svn.freebsd.org> From: Andrew Thompson Date: Sun, 5 Apr 2009 18:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190734 - in head/sys: compat/ndis dev/sound/usb dev/usb dev/usb/bluetooth dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/serial dev/usb/storage dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2009 18:20:44 -0000 Author: thompsa Date: Sun Apr 5 18:20:38 2009 New Revision: 190734 URL: http://svn.freebsd.org/changeset/base/190734 Log: MFp4 //depot/projects/usb@159909 - make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky Modified: head/sys/compat/ndis/subr_usbd.c head/sys/dev/sound/usb/uaudio.c head/sys/dev/usb/bluetooth/ng_ubt.c head/sys/dev/usb/bluetooth/ubtbcmfw.c head/sys/dev/usb/controller/usb_controller.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/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdcereg.h 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_udav.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/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/usb_compat_linux.c head/sys/dev/usb/usb_core.h head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_device.h head/sys/dev/usb/usb_generic.c head/sys/dev/usb/usb_handle_request.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_hub.h head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/usb_transfer.c head/sys/dev/usb/usb_transfer.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/compat/ndis/subr_usbd.c ============================================================================== --- head/sys/compat/ndis/subr_usbd.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/compat/ndis/subr_usbd.c Sun Apr 5 18:20:38 2009 (r190734) @@ -93,20 +93,20 @@ static struct usb2_config usbd_default_e .endpoint = 0x00, /* control pipe */ .direction = UE_DIR_ANY, .if_index = 0, - .mh.bufsize = USBD_CTRL_READ_BUFFER_SIZE, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &usbd_ctrl_callback, - .mh.timeout = 5000, /* 5 seconds */ + .bufsize = USBD_CTRL_READ_BUFFER_SIZE, + .flags = { .short_xfer_ok = 1, }, + .callback = &usbd_ctrl_callback, + .timeout = 5000, /* 5 seconds */ }, [USBD_CTRL_WRITE_PIPE] = { .type = UE_CONTROL, .endpoint = 0x00, /* control pipe */ .direction = UE_DIR_ANY, .if_index = 0, - .mh.bufsize = USBD_CTRL_WRITE_BUFFER_SIZE, - .mh.flags = { .proxy_buffer = 1, }, - .mh.callback = &usbd_ctrl_callback, - .mh.timeout = 5000, /* 5 seconds */ + .bufsize = USBD_CTRL_WRITE_BUFFER_SIZE, + .flags = { .proxy_buffer = 1, }, + .callback = &usbd_ctrl_callback, + .timeout = 5000, /* 5 seconds */ } }; @@ -674,11 +674,11 @@ usbd_setup_endpoint(ip, ifidx, ep) cfg.type = UE_GET_XFERTYPE(ep->bmAttributes); cfg.endpoint = UE_GET_ADDR(ep->bEndpointAddress); cfg.direction = UE_GET_DIR(ep->bEndpointAddress); - cfg.mh.callback = &usbd_non_isoc_callback; - cfg.mh.bufsize = UGETW(ep->wMaxPacketSize); - cfg.mh.flags.proxy_buffer = 1; + cfg.callback = &usbd_non_isoc_callback; + cfg.bufsize = UGETW(ep->wMaxPacketSize); + cfg.flags.proxy_buffer = 1; if (UE_GET_DIR(ep->bEndpointAddress) == UE_DIR_IN) - cfg.mh.flags.short_xfer_ok = 1; + cfg.flags.short_xfer_ok = 1; status = usb2_transfer_setup(sc->ndisusb_dev, &ifidx, ne->ne_xfer, &cfg, 1, sc, &sc->ndisusb_mtx); Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/sound/usb/uaudio.c Sun Apr 5 18:20:38 2009 (r190734) @@ -400,20 +400,20 @@ static const struct usb2_config .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UAUDIO_MINFRAMES, - .mh.flags = {.short_xfer_ok = 1,}, - .mh.callback = &uaudio_chan_record_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UAUDIO_MINFRAMES, + .flags = {.short_xfer_ok = 1,}, + .callback = &uaudio_chan_record_callback, }, [1] = { .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UAUDIO_MINFRAMES, - .mh.flags = {.short_xfer_ok = 1,}, - .mh.callback = &uaudio_chan_record_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UAUDIO_MINFRAMES, + .flags = {.short_xfer_ok = 1,}, + .callback = &uaudio_chan_record_callback, }, }; @@ -423,20 +423,20 @@ static const struct usb2_config .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UAUDIO_MINFRAMES, - .mh.flags = {.short_xfer_ok = 1,}, - .mh.callback = &uaudio_chan_play_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UAUDIO_MINFRAMES, + .flags = {.short_xfer_ok = 1,}, + .callback = &uaudio_chan_play_callback, }, [1] = { .type = UE_ISOCHRONOUS, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UAUDIO_MINFRAMES, - .mh.flags = {.short_xfer_ok = 1,}, - .mh.callback = &uaudio_chan_play_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UAUDIO_MINFRAMES, + .flags = {.short_xfer_ok = 1,}, + .callback = &uaudio_chan_play_callback, }, }; @@ -446,9 +446,9 @@ static const struct usb2_config .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = (sizeof(struct usb2_device_request) + 4), - .mh.callback = &uaudio_mixer_write_cfg_callback, - .mh.timeout = 1000, /* 1 second */ + .bufsize = (sizeof(struct usb2_device_request) + 4), + .callback = &uaudio_mixer_write_cfg_callback, + .timeout = 1000, /* 1 second */ }, }; @@ -478,40 +478,40 @@ static const struct usb2_config .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = UMIDI_BULK_SIZE, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &umidi_bulk_write_callback, + .bufsize = UMIDI_BULK_SIZE, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &umidi_bulk_write_callback, }, [1] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = UMIDI_BULK_SIZE, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &umidi_bulk_read_callback, + .bufsize = UMIDI_BULK_SIZE, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &umidi_bulk_read_callback, }, [2] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.flags = {}, - .mh.callback = &umidi_write_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ + .bufsize = sizeof(struct usb2_device_request), + .flags = {}, + .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, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.flags = {}, - .mh.callback = &umidi_read_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ + .bufsize = sizeof(struct usb2_device_request), + .flags = {}, + .callback = &umidi_read_clear_stall_callback, + .timeout = 1000, /* 1 second */ + .interval = 50, /* 50ms */ }, }; Modified: head/sys/dev/usb/bluetooth/ng_ubt.c ============================================================================== --- head/sys/dev/usb/bluetooth/ng_ubt.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/bluetooth/ng_ubt.c Sun Apr 5 18:20:38 2009 (r190734) @@ -276,9 +276,9 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .if_index = 0, - .mh.bufsize = UBT_BULK_WRITE_BUFFER_SIZE, - .mh.flags = { .pipe_bof = 1, .force_short_xfer = 1, }, - .mh.callback = &ubt_bulk_write_callback, + .bufsize = UBT_BULK_WRITE_BUFFER_SIZE, + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, + .callback = &ubt_bulk_write_callback, }, /* Incoming bulk transfer - ACL packets */ [UBT_IF_0_BULK_DT_RD] = { @@ -286,9 +286,9 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .if_index = 0, - .mh.bufsize = UBT_BULK_READ_BUFFER_SIZE, - .mh.flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, - .mh.callback = &ubt_bulk_read_callback, + .bufsize = UBT_BULK_READ_BUFFER_SIZE, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, + .callback = &ubt_bulk_read_callback, }, /* Incoming interrupt transfer - HCI events */ [UBT_IF_0_INTR_DT_RD] = { @@ -296,9 +296,9 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .if_index = 0, - .mh.flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, - .mh.bufsize = UBT_INTR_BUFFER_SIZE, - .mh.callback = &ubt_intr_read_callback, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, + .bufsize = UBT_INTR_BUFFER_SIZE, + .callback = &ubt_intr_read_callback, }, /* Outgoing control transfer - HCI commands */ [UBT_IF_0_CTRL_DT_WR] = { @@ -306,9 +306,9 @@ static const struct usb2_config ubt_con .endpoint = 0x00, /* control pipe */ .direction = UE_DIR_ANY, .if_index = 0, - .mh.bufsize = UBT_CTRL_BUFFER_SIZE, - .mh.callback = &ubt_ctrl_write_callback, - .mh.timeout = 5000, /* 5 seconds */ + .bufsize = UBT_CTRL_BUFFER_SIZE, + .callback = &ubt_ctrl_write_callback, + .timeout = 5000, /* 5 seconds */ }, /* @@ -321,10 +321,10 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .if_index = 1, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UBT_ISOC_NFRAMES, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &ubt_isoc_read_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UBT_ISOC_NFRAMES, + .flags = { .short_xfer_ok = 1, }, + .callback = &ubt_isoc_read_callback, }, /* Incoming isochronous transfer #2 - SCO packets */ [UBT_IF_1_ISOC_DT_RD2] = { @@ -332,10 +332,10 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .if_index = 1, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UBT_ISOC_NFRAMES, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &ubt_isoc_read_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UBT_ISOC_NFRAMES, + .flags = { .short_xfer_ok = 1, }, + .callback = &ubt_isoc_read_callback, }, /* Outgoing isochronous transfer #1 - SCO packets */ [UBT_IF_1_ISOC_DT_WR1] = { @@ -343,10 +343,10 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .if_index = 1, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UBT_ISOC_NFRAMES, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &ubt_isoc_write_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UBT_ISOC_NFRAMES, + .flags = { .short_xfer_ok = 1, }, + .callback = &ubt_isoc_write_callback, }, /* Outgoing isochronous transfer #2 - SCO packets */ [UBT_IF_1_ISOC_DT_WR2] = { @@ -354,10 +354,10 @@ static const struct usb2_config ubt_con .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .if_index = 1, - .mh.bufsize = 0, /* use "wMaxPacketSize * frames" */ - .mh.frames = UBT_ISOC_NFRAMES, - .mh.flags = { .short_xfer_ok = 1, }, - .mh.callback = &ubt_isoc_write_callback, + .bufsize = 0, /* use "wMaxPacketSize * frames" */ + .frames = UBT_ISOC_NFRAMES, + .flags = { .short_xfer_ok = 1, }, + .callback = &ubt_isoc_write_callback, }, }; Modified: head/sys/dev/usb/bluetooth/ubtbcmfw.c ============================================================================== --- head/sys/dev/usb/bluetooth/ubtbcmfw.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/bluetooth/ubtbcmfw.c Sun Apr 5 18:20:38 2009 (r190734) @@ -118,10 +118,10 @@ static const struct usb2_config ubtbcmfw .endpoint = 0x02, /* fixed */ .direction = UE_DIR_OUT, .if_index = UBTBCMFW_IFACE_IDX, - .mh.bufsize = UBTBCMFW_BSIZE, - .mh.flags = { .pipe_bof = 1, .force_short_xfer = 1, + .bufsize = UBTBCMFW_BSIZE, + .flags = { .pipe_bof = 1, .force_short_xfer = 1, .proxy_buffer = 1, }, - .mh.callback = &ubtbcmfw_write_callback, + .callback = &ubtbcmfw_write_callback, }, [UBTBCMFW_INTR_DT_RD] = { @@ -129,10 +129,10 @@ static const struct usb2_config ubtbcmfw .endpoint = 0x01, /* fixed */ .direction = UE_DIR_IN, .if_index = UBTBCMFW_IFACE_IDX, - .mh.bufsize = UBTBCMFW_BSIZE, - .mh.flags = { .pipe_bof = 1, .short_xfer_ok = 1, + .bufsize = UBTBCMFW_BSIZE, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, .proxy_buffer = 1, }, - .mh.callback = &ubtbcmfw_read_callback, + .callback = &ubtbcmfw_read_callback, }, }; Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/controller/usb_controller.c Sun Apr 5 18:20:38 2009 (r190734) @@ -209,7 +209,6 @@ usb2_bus_explore(struct usb2_proc_msg *p * First update the USB power state! */ usb2_bus_powerd(bus); - /* * Explore the Root USB HUB. This call can sleep, * exiting Giant, which is actually Giant. @@ -328,6 +327,20 @@ usb2_bus_attach(struct usb2_proc_msg *pm USB_BUS_UNLOCK(bus); mtx_lock(&Giant); /* XXX not required by USB */ + /* default power_mask value */ + bus->hw_power_state = + USB_HW_POWER_CONTROL | + USB_HW_POWER_BULK | + USB_HW_POWER_INTERRUPT | + USB_HW_POWER_ISOC | + USB_HW_POWER_NON_ROOT_HUB; + + /* make sure power is set at least once */ + + if (bus->methods->set_hw_power != NULL) { + (bus->methods->set_hw_power) (bus); + } + /* Allocate the Root USB device */ child = usb2_alloc_device(bus->bdev, bus, NULL, 0, 0, 1, Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/input/uhid.c Sun Apr 5 18:20:38 2009 (r190734) @@ -316,27 +316,27 @@ static const struct usb2_config uhid_con .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = UHID_BSIZE, - .mh.callback = &uhid_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = UHID_BSIZE, + .callback = &uhid_intr_callback, }, [UHID_CTRL_DT_WR] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request) + UHID_BSIZE, - .mh.callback = &uhid_write_callback, - .mh.timeout = 1000, /* 1 second */ + .bufsize = sizeof(struct usb2_device_request) + UHID_BSIZE, + .callback = &uhid_write_callback, + .timeout = 1000, /* 1 second */ }, [UHID_CTRL_DT_RD] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request) + UHID_BSIZE, - .mh.callback = &uhid_read_callback, - .mh.timeout = 1000, /* 1 second */ + .bufsize = sizeof(struct usb2_device_request) + UHID_BSIZE, + .callback = &uhid_read_callback, + .timeout = 1000, /* 1 second */ }, }; Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/input/ukbd.c Sun Apr 5 18:20:38 2009 (r190734) @@ -562,28 +562,28 @@ static const struct usb2_config ukbd_con .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = &ukbd_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &ukbd_intr_callback, }, [UKBD_INTR_CS] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &ukbd_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ + .bufsize = sizeof(struct usb2_device_request), + .callback = &ukbd_clear_stall_callback, + .timeout = 1000, /* 1 second */ + .interval = 50, /* 50ms */ }, [UKBD_CTRL_LED] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request) + 1, - .mh.callback = &ukbd_set_leds_callback, - .mh.timeout = 1000, /* 1 second */ + .bufsize = sizeof(struct usb2_device_request) + 1, + .callback = &ukbd_set_leds_callback, + .timeout = 1000, /* 1 second */ }, }; Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/input/ums.c Sun Apr 5 18:20:38 2009 (r190734) @@ -312,9 +312,9 @@ static const struct usb2_config ums_conf .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = &ums_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &ums_intr_callback, }, }; Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/misc/udbp.c Sun Apr 5 18:20:38 2009 (r190734) @@ -192,39 +192,39 @@ static const struct usb2_config udbp_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = UDBP_BUFFERSIZE, - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &udbp_bulk_write_callback, - .mh.timeout = UDBP_TIMEOUT, + .bufsize = UDBP_BUFFERSIZE, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = &udbp_bulk_write_callback, + .timeout = UDBP_TIMEOUT, }, [UDBP_T_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = UDBP_BUFFERSIZE, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &udbp_bulk_read_callback, + .bufsize = UDBP_BUFFERSIZE, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &udbp_bulk_read_callback, }, [UDBP_T_WR_CS] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &udbp_bulk_write_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ + .bufsize = sizeof(struct usb2_device_request), + .callback = &udbp_bulk_write_clear_stall_callback, + .timeout = 1000, /* 1 second */ + .interval = 50, /* 50ms */ }, [UDBP_T_RD_CS] = { .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &udbp_bulk_read_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ + .bufsize = sizeof(struct usb2_device_request), + .callback = &udbp_bulk_read_clear_stall_callback, + .timeout = 1000, /* 1 second */ + .interval = 50, /* 50ms */ }, }; Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_aue.c Sun Apr 5 18:20:38 2009 (r190734) @@ -209,28 +209,28 @@ static const struct usb2_config aue_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = aue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = (MCLBYTES + 2), + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = aue_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [AUE_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 4 + ETHER_CRC_LEN), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = aue_bulk_read_callback, + .bufsize = (MCLBYTES + 4 + ETHER_CRC_LEN), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = aue_bulk_read_callback, }, [AUE_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = aue_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = aue_intr_callback, }, }; Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_axe.c Sun Apr 5 18:20:38 2009 (r190734) @@ -182,10 +182,10 @@ static const struct usb2_config axe_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = AXE_BULK_BUF_SIZE, - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = axe_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = AXE_BULK_BUF_SIZE, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = axe_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [AXE_BULK_DT_RD] = { @@ -195,19 +195,19 @@ static const struct usb2_config axe_conf #if (MCLBYTES < 2048) #error "(MCLBYTES < 2048)" #endif - .mh.bufsize = MCLBYTES, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = axe_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ + .bufsize = MCLBYTES, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = axe_bulk_read_callback, + .timeout = 0, /* no timeout */ }, [AXE_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = axe_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = axe_intr_callback, }, }; Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_cdce.c Sun Apr 5 18:20:38 2009 (r190734) @@ -96,59 +96,54 @@ SYSCTL_INT(_hw_usb2_cdce, OID_AUTO, debu static const struct usb2_config cdce_config[CDCE_N_TRANSFER] = { - [CDCE_BULK_A] = { + [CDCE_BULK_RX] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, + .direction = UE_DIR_RX, .if_index = 0, - /* Host Mode */ - .mh.frames = CDCE_FRAMES_MAX, - .mh.bufsize = (CDCE_FRAMES_MAX * MCLBYTES), - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,.ext_buffer = 1,}, - .mh.callback = cdce_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ - /* Device Mode */ - .md.frames = CDCE_FRAMES_MAX, - .md.bufsize = (CDCE_FRAMES_MAX * MCLBYTES), - .md.flags = {.pipe_bof = 1,.short_frames_ok = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, - .md.callback = cdce_bulk_read_callback, - .md.timeout = 0, /* no timeout */ + .frames = CDCE_FRAMES_MAX, + .bufsize = (CDCE_FRAMES_MAX * MCLBYTES), + .flags = {.pipe_bof = 1,.short_frames_ok = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, + .callback = cdce_bulk_read_callback, + .timeout = 0, /* no timeout */ + .usb_mode = USB_MODE_MAX, /* both modes */ }, - [CDCE_BULK_B] = { + [CDCE_BULK_TX] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_TX, .if_index = 0, - /* Host Mode */ - .mh.frames = CDCE_FRAMES_MAX, - .mh.bufsize = (CDCE_FRAMES_MAX * MCLBYTES), - .mh.flags = {.pipe_bof = 1,.short_frames_ok = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, - .mh.callback = cdce_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ - /* Device Mode */ - .md.frames = CDCE_FRAMES_MAX, - .md.bufsize = (CDCE_FRAMES_MAX * MCLBYTES), - .md.flags = {.pipe_bof = 1,.force_short_xfer = 1,.ext_buffer = 1,}, - .md.callback = cdce_bulk_write_callback, - .md.timeout = 10000, /* 10 seconds */ + .frames = CDCE_FRAMES_MAX, + .bufsize = (CDCE_FRAMES_MAX * MCLBYTES), + .flags = {.pipe_bof = 1,.force_short_xfer = 1,.ext_buffer = 1,}, + .callback = cdce_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ + .usb_mode = USB_MODE_MAX, /* both modes */ }, - [CDCE_INTR] = { + [CDCE_INTR_RX] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 1, - /* Host Mode */ - .mh.bufsize = CDCE_IND_SIZE_MAX, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, - .mh.callback = cdce_intr_read_callback, - .mh.timeout = 0, - /* Device Mode */ - .md.bufsize = CDCE_IND_SIZE_MAX, - .md.flags = {.pipe_bof = 1,.force_short_xfer = 1,.no_pipe_ok = 1,}, - .md.callback = cdce_intr_write_callback, - .md.timeout = 10000, /* 10 seconds */ + .bufsize = CDCE_IND_SIZE_MAX, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .callback = cdce_intr_read_callback, + .timeout = 0, + .usb_mode = USB_MODE_HOST, + }, + + [CDCE_INTR_TX] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_TX, + .if_index = 1, + .bufsize = CDCE_IND_SIZE_MAX, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,.no_pipe_ok = 1,}, + .callback = cdce_intr_write_callback, + .timeout = 10000, /* 10 seconds */ + .usb_mode = USB_MODE_DEVICE, }, }; @@ -416,8 +411,8 @@ cdce_start(struct usb2_ether *ue) /* * Start the USB transfers, if not already started: */ - usb2_transfer_start(sc->sc_xfer[CDCE_BULK_B]); - usb2_transfer_start(sc->sc_xfer[CDCE_BULK_A]); + usb2_transfer_start(sc->sc_xfer[CDCE_BULK_TX]); + usb2_transfer_start(sc->sc_xfer[CDCE_BULK_RX]); } static void @@ -557,13 +552,11 @@ cdce_init(struct usb2_ether *ue) ifp->if_drv_flags |= IFF_DRV_RUNNING; /* start interrupt transfer */ - usb2_transfer_start(sc->sc_xfer[CDCE_INTR]); + usb2_transfer_start(sc->sc_xfer[CDCE_INTR_RX]); + usb2_transfer_start(sc->sc_xfer[CDCE_INTR_TX]); /* stall data write direction, which depends on USB mode */ - if (usb2_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) - usb2_transfer_set_stall(sc->sc_xfer[CDCE_BULK_A]); - else - usb2_transfer_set_stall(sc->sc_xfer[CDCE_BULK_B]); + usb2_transfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); /* start data transfers */ cdce_start(ue); @@ -582,9 +575,10 @@ cdce_stop(struct usb2_ether *ue) /* * stop all the transfers, if not already stopped: */ - usb2_transfer_stop(sc->sc_xfer[CDCE_BULK_A]); - usb2_transfer_stop(sc->sc_xfer[CDCE_BULK_B]); - usb2_transfer_stop(sc->sc_xfer[CDCE_INTR]); + usb2_transfer_stop(sc->sc_xfer[CDCE_BULK_RX]); + usb2_transfer_stop(sc->sc_xfer[CDCE_BULK_TX]); + usb2_transfer_stop(sc->sc_xfer[CDCE_INTR_RX]); + usb2_transfer_stop(sc->sc_xfer[CDCE_INTR_TX]); } static void Modified: head/sys/dev/usb/net/if_cdcereg.h ============================================================================== --- head/sys/dev/usb/net/if_cdcereg.h Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_cdcereg.h Sun Apr 5 18:20:38 2009 (r190734) @@ -39,9 +39,10 @@ #define CDCE_IND_SIZE_MAX 32 /* bytes */ enum { - CDCE_BULK_A, - CDCE_BULK_B, - CDCE_INTR, + CDCE_BULK_RX, + CDCE_BULK_TX, + CDCE_INTR_RX, + CDCE_INTR_TX, CDCE_N_TRANSFER, }; Modified: head/sys/dev/usb/net/if_cue.c ============================================================================== --- head/sys/dev/usb/net/if_cue.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_cue.c Sun Apr 5 18:20:38 2009 (r190734) @@ -121,19 +121,19 @@ static const struct usb2_config cue_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,}, - .mh.callback = cue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = (MCLBYTES + 2), + .flags = {.pipe_bof = 1,}, + .callback = cue_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [CUE_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = cue_bulk_read_callback, + .bufsize = (MCLBYTES + 2), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = cue_bulk_read_callback, }, }; Modified: head/sys/dev/usb/net/if_kue.c ============================================================================== --- head/sys/dev/usb/net/if_kue.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_kue.c Sun Apr 5 18:20:38 2009 (r190734) @@ -163,20 +163,20 @@ static const struct usb2_config kue_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + 2 + 64), - .mh.flags = {.pipe_bof = 1,}, - .mh.callback = kue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = (MCLBYTES + 2 + 64), + .flags = {.pipe_bof = 1,}, + .callback = kue_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [KUE_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = kue_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ + .bufsize = (MCLBYTES + 2), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = kue_bulk_read_callback, + .timeout = 0, /* no timeout */ }, }; Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_rue.c Sun Apr 5 18:20:38 2009 (r190734) @@ -141,29 +141,29 @@ static const struct usb2_config rue_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = MCLBYTES, - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = rue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = MCLBYTES, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = rue_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [RUE_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 4), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = rue_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ + .bufsize = (MCLBYTES + 4), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = rue_bulk_read_callback, + .timeout = 0, /* no timeout */ }, [RUE_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = rue_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = rue_intr_callback, }, }; Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/net/if_udav.c Sun Apr 5 18:20:38 2009 (r190734) @@ -101,29 +101,29 @@ static const struct usb2_config udav_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = udav_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = (MCLBYTES + 2), + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = udav_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [UDAV_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 3), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = udav_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ + .bufsize = (MCLBYTES + 3), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = udav_bulk_read_callback, + .timeout = 0, /* no timeout */ }, [UDAV_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = udav_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = udav_intr_callback, }, }; Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/serial/u3g.c Sun Apr 5 18:20:38 2009 (r190734) @@ -116,18 +116,18 @@ static const struct usb2_config u3g_conf .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = U3G_BSIZE,/* bytes */ - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &u3g_write_callback, + .bufsize = U3G_BSIZE,/* bytes */ + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = &u3g_write_callback, }, [U3G_BULK_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = U3G_BSIZE,/* bytes */ - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &u3g_read_callback, + .bufsize = U3G_BSIZE,/* bytes */ + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &u3g_read_callback, }, }; Modified: head/sys/dev/usb/serial/uark.c ============================================================================== --- head/sys/dev/usb/serial/uark.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/serial/uark.c Sun Apr 5 18:20:38 2009 (r190734) @@ -106,18 +106,18 @@ static const struct usb2_config .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = UARK_BUF_SIZE, - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &uark_bulk_write_callback, + .bufsize = UARK_BUF_SIZE, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = &uark_bulk_write_callback, }, [UARK_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = UARK_BUF_SIZE, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &uark_bulk_read_callback, + .bufsize = UARK_BUF_SIZE, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &uark_bulk_read_callback, }, }; Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/serial/ubsa.c Sun Apr 5 18:20:38 2009 (r190734) @@ -188,27 +188,27 @@ static const struct usb2_config ubsa_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = UBSA_BSIZE, /* bytes */ - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &ubsa_write_callback, + .bufsize = UBSA_BSIZE, /* bytes */ + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = &ubsa_write_callback, }, [UBSA_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = UBSA_BSIZE, /* bytes */ - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &ubsa_read_callback, + .bufsize = UBSA_BSIZE, /* bytes */ + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = &ubsa_read_callback, }, [UBSA_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = &ubsa_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &ubsa_intr_callback, }, }; Modified: head/sys/dev/usb/serial/ubser.c ============================================================================== --- head/sys/dev/usb/serial/ubser.c Sun Apr 5 18:20:24 2009 (r190733) +++ head/sys/dev/usb/serial/ubser.c Sun Apr 5 18:20:38 2009 (r190734) @@ -156,18 +156,18 @@ static const struct usb2_config ubser_co .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &ubser_write_callback, + .bufsize = 0, /* use wMaxPacketSize */ + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = &ubser_write_callback, }, [UBSER_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***