Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2008 23:13:02 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185948 - in head/sys/dev/usb2: bluetooth controller core ethernet input misc serial sound storage template wlan
Message-ID:  <200812112313.mBBND2Xq079336@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Thu Dec 11 23:13:02 2008
New Revision: 185948
URL: http://svn.freebsd.org/changeset/base/185948

Log:
  Format and wrap function declarations.

Modified:
  head/sys/dev/usb2/bluetooth/ng_ubt2.c
  head/sys/dev/usb2/controller/at91dci.c
  head/sys/dev/usb2/controller/musb2_otg.c
  head/sys/dev/usb2/controller/uhci2.c
  head/sys/dev/usb2/controller/usb2_controller.c
  head/sys/dev/usb2/controller/uss820dci.c
  head/sys/dev/usb2/core/usb2_busdma.c
  head/sys/dev/usb2/core/usb2_busdma.h
  head/sys/dev/usb2/core/usb2_compat_linux.c
  head/sys/dev/usb2/core/usb2_compat_linux.h
  head/sys/dev/usb2/core/usb2_config_td.h
  head/sys/dev/usb2/core/usb2_core.h
  head/sys/dev/usb2/core/usb2_dev.c
  head/sys/dev/usb2/core/usb2_dev.h
  head/sys/dev/usb2/core/usb2_device.c
  head/sys/dev/usb2/core/usb2_device.h
  head/sys/dev/usb2/core/usb2_dynamic.h
  head/sys/dev/usb2/core/usb2_error.c
  head/sys/dev/usb2/core/usb2_generic.c
  head/sys/dev/usb2/core/usb2_handle_request.c
  head/sys/dev/usb2/core/usb2_hid.h
  head/sys/dev/usb2/core/usb2_hub.h
  head/sys/dev/usb2/core/usb2_lookup.h
  head/sys/dev/usb2/core/usb2_mbuf.h
  head/sys/dev/usb2/core/usb2_msctest.h
  head/sys/dev/usb2/core/usb2_parse.h
  head/sys/dev/usb2/core/usb2_process.h
  head/sys/dev/usb2/core/usb2_request.h
  head/sys/dev/usb2/core/usb2_sw_transfer.h
  head/sys/dev/usb2/core/usb2_transfer.c
  head/sys/dev/usb2/core/usb2_transfer.h
  head/sys/dev/usb2/ethernet/if_aue2.c
  head/sys/dev/usb2/ethernet/if_axe2.c
  head/sys/dev/usb2/ethernet/if_cdce2.c
  head/sys/dev/usb2/ethernet/if_cue2.c
  head/sys/dev/usb2/ethernet/if_kue2.c
  head/sys/dev/usb2/ethernet/if_udav2.c
  head/sys/dev/usb2/ethernet/usb2_ethernet.h
  head/sys/dev/usb2/input/ukbd2.c
  head/sys/dev/usb2/misc/udbp2.c
  head/sys/dev/usb2/misc/ufm2.c
  head/sys/dev/usb2/serial/uark2.c
  head/sys/dev/usb2/serial/ubsa2.c
  head/sys/dev/usb2/serial/ubser2.c
  head/sys/dev/usb2/serial/uchcom2.c
  head/sys/dev/usb2/serial/ucycom2.c
  head/sys/dev/usb2/serial/ufoma2.c
  head/sys/dev/usb2/serial/uftdi2.c
  head/sys/dev/usb2/serial/ugensa2.c
  head/sys/dev/usb2/serial/uipaq2.c
  head/sys/dev/usb2/serial/ulpt2.c
  head/sys/dev/usb2/serial/umct2.c
  head/sys/dev/usb2/serial/umodem2.c
  head/sys/dev/usb2/serial/umoscom2.c
  head/sys/dev/usb2/serial/uplcom2.c
  head/sys/dev/usb2/serial/usb2_serial.c
  head/sys/dev/usb2/serial/usb2_serial.h
  head/sys/dev/usb2/serial/uvisor2.c
  head/sys/dev/usb2/serial/uvscom2.c
  head/sys/dev/usb2/sound/uaudio2.c
  head/sys/dev/usb2/sound/uaudio2.h
  head/sys/dev/usb2/storage/umass2.c
  head/sys/dev/usb2/template/usb2_template.c
  head/sys/dev/usb2/wlan/if_rum2.c
  head/sys/dev/usb2/wlan/if_ural2.c
  head/sys/dev/usb2/wlan/if_zyd2.c

Modified: head/sys/dev/usb2/bluetooth/ng_ubt2.c
==============================================================================
--- head/sys/dev/usb2/bluetooth/ng_ubt2.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/bluetooth/ng_ubt2.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -193,10 +193,10 @@ static usb2_callback_t ubt_bulk_write_cl
 static usb2_callback_t ubt_isoc_read_callback;
 static usb2_callback_t ubt_isoc_write_callback;
 
-static int ubt_modevent(module_t mod, int event, void *data);
-static void ubt_intr_read_complete(node_p node, hook_p hook, void *arg1, int arg2);
-static void ubt_bulk_read_complete(node_p node, hook_p hook, void *arg1, int arg2);
-static void ubt_isoc_read_complete(node_p node, hook_p hook, void *arg1, int arg2);
+static int	ubt_modevent(module_t, int, void *);
+static void	ubt_intr_read_complete(node_p, hook_p, void *, int);
+static void	ubt_bulk_read_complete(node_p, hook_p, void *, int);
+static void	ubt_isoc_read_complete(node_p, hook_p, void *, int);
 
 /* USB config */
 static const struct usb2_config ubt_config_if_0[UBT_IF_0_N_TRANSFER] = {

Modified: head/sys/dev/usb2/controller/at91dci.c
==============================================================================
--- head/sys/dev/usb2/controller/at91dci.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/controller/at91dci.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -99,10 +99,10 @@ static at91dci_cmd_t at91dci_setup_rx;
 static at91dci_cmd_t at91dci_data_rx;
 static at91dci_cmd_t at91dci_data_tx;
 static at91dci_cmd_t at91dci_data_tx_sync;
-static void at91dci_device_done(struct usb2_xfer *xfer, usb2_error_t error);
-static void at91dci_do_poll(struct usb2_bus *bus);
-static void at91dci_root_ctrl_poll(struct at91dci_softc *sc);
-static void at91dci_standard_done(struct usb2_xfer *xfer);
+static void	at91dci_device_done(struct usb2_xfer *, usb2_error_t);
+static void	at91dci_do_poll(struct usb2_bus *);
+static void	at91dci_root_ctrl_poll(struct at91dci_softc *);
+static void	at91dci_standard_done(struct usb2_xfer *);
 
 static usb2_sw_transfer_func_t at91dci_root_intr_done;
 static usb2_sw_transfer_func_t at91dci_root_ctrl_done;

Modified: head/sys/dev/usb2/controller/musb2_otg.c
==============================================================================
--- head/sys/dev/usb2/controller/musb2_otg.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/controller/musb2_otg.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -93,11 +93,11 @@ static musbotg_cmd_t musbotg_setup_data_
 static musbotg_cmd_t musbotg_setup_status;
 static musbotg_cmd_t musbotg_data_rx;
 static musbotg_cmd_t musbotg_data_tx;
-static void musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error);
-static void musbotg_do_poll(struct usb2_bus *bus);
-static void musbotg_root_ctrl_poll(struct musbotg_softc *sc);
-static void musbotg_standard_done(struct usb2_xfer *xfer);
-static void musbotg_interrupt_poll(struct musbotg_softc *sc);
+static void	musbotg_device_done(struct usb2_xfer *, usb2_error_t);
+static void	musbotg_do_poll(struct usb2_bus *);
+static void	musbotg_root_ctrl_poll(struct musbotg_softc *);
+static void	musbotg_standard_done(struct usb2_xfer *);
+static void	musbotg_interrupt_poll(struct musbotg_softc *);
 
 static usb2_sw_transfer_func_t musbotg_root_intr_done;
 static usb2_sw_transfer_func_t musbotg_root_ctrl_done;

Modified: head/sys/dev/usb2/controller/uhci2.c
==============================================================================
--- head/sys/dev/usb2/controller/uhci2.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/controller/uhci2.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -139,13 +139,13 @@ extern struct usb2_pipe_methods uhci_roo
 extern struct usb2_pipe_methods uhci_root_intr_methods;
 
 static usb2_config_td_command_t uhci_root_ctrl_task;
-static void uhci_root_ctrl_poll(struct uhci_softc *sc);
-static void uhci_do_poll(struct usb2_bus *bus);
-static void uhci_device_done(struct usb2_xfer *xfer, usb2_error_t error);
-static void uhci_transfer_intr_enqueue(struct usb2_xfer *xfer);
-static void uhci_root_intr_check(void *arg);
-static void uhci_timeout(void *arg);
-static uint8_t uhci_check_transfer(struct usb2_xfer *xfer);
+static void	uhci_root_ctrl_poll(struct uhci_softc *);
+static void	uhci_do_poll(struct usb2_bus *);
+static void	uhci_device_done(struct usb2_xfer *, usb2_error_t);
+static void	uhci_transfer_intr_enqueue(struct usb2_xfer *);
+static void	uhci_root_intr_check(void *);
+static void	uhci_timeout(void *);
+static uint8_t	uhci_check_transfer(struct usb2_xfer *);
 
 void
 uhci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)

Modified: head/sys/dev/usb2/controller/usb2_controller.c
==============================================================================
--- head/sys/dev/usb2/controller/usb2_controller.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/controller/usb2_controller.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -48,11 +48,17 @@ static device_probe_t usb2_probe;
 static device_attach_t usb2_attach;
 static device_detach_t usb2_detach;
 
-static void usb2_attach_sub(device_t dev, struct usb2_bus *bus);
-static void usb2_post_init(void *arg);
-static void usb2_bus_mem_flush_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align);
-static void usb2_bus_mem_alloc_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align);
-static void usb2_bus_mem_free_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align);
+static void	usb2_attach_sub(device_t, struct usb2_bus *);
+static void	usb2_post_init(void *);
+static void	usb2_bus_mem_flush_all_cb(struct usb2_bus *,
+		    struct usb2_page_cache *, struct usb2_page *, uint32_t,
+		    uint32_t);
+static void	usb2_bus_mem_alloc_all_cb(struct usb2_bus *,
+		    struct usb2_page_cache *, struct usb2_page *, uint32_t,
+		    uint32_t);
+static void	usb2_bus_mem_free_all_cb(struct usb2_bus *,
+		    struct usb2_page_cache *, struct usb2_page *, uint32_t,
+		    uint32_t);
 
 /* static variables */
 

Modified: head/sys/dev/usb2/controller/uss820dci.c
==============================================================================
--- head/sys/dev/usb2/controller/uss820dci.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/controller/uss820dci.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -88,12 +88,13 @@ static uss820dci_cmd_t uss820dci_setup_r
 static uss820dci_cmd_t uss820dci_data_rx;
 static uss820dci_cmd_t uss820dci_data_tx;
 static uss820dci_cmd_t uss820dci_data_tx_sync;
-static void uss820dci_device_done(struct usb2_xfer *xfer, usb2_error_t error);
-static void uss820dci_do_poll(struct usb2_bus *bus);
-static void uss820dci_root_ctrl_poll(struct uss820dci_softc *sc);
-static void uss820dci_standard_done(struct usb2_xfer *xfer);
-static void uss820dci_intr_set(struct usb2_xfer *xfer, uint8_t set);
-static void uss820dci_update_shared_1(struct uss820dci_softc *sc, uint8_t reg, uint8_t keep_mask, uint8_t set_mask);
+static void	uss820dci_device_done(struct usb2_xfer *, usb2_error_t);
+static void	uss820dci_do_poll(struct usb2_bus *);
+static void	uss820dci_root_ctrl_poll(struct uss820dci_softc *);
+static void	uss820dci_standard_done(struct usb2_xfer *);
+static void	uss820dci_intr_set(struct usb2_xfer *, uint8_t);
+static void	uss820dci_update_shared_1(struct uss820dci_softc *, uint8_t,
+		    uint8_t, uint8_t);
 
 static usb2_sw_transfer_func_t uss820dci_root_intr_done;
 static usb2_sw_transfer_func_t uss820dci_root_ctrl_done;

Modified: head/sys/dev/usb2/core/usb2_busdma.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_busdma.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_busdma.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -39,22 +39,22 @@
 #include <dev/usb2/controller/usb2_controller.h>
 #include <dev/usb2/controller/usb2_bus.h>
 
-static void usb2_dma_tag_create(struct usb2_dma_tag *udt, uint32_t size, uint32_t align);
-static void usb2_dma_tag_destroy(struct usb2_dma_tag *udt);
+static void	usb2_dma_tag_create(struct usb2_dma_tag *, uint32_t, uint32_t);
+static void	usb2_dma_tag_destroy(struct usb2_dma_tag *);
 
 #ifdef __FreeBSD__
-static void usb2_dma_lock_cb(void *arg, bus_dma_lock_op_t op);
-static int32_t usb2_m_copy_in_cb(void *arg, void *src, uint32_t count);
-static void usb2_pc_alloc_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error);
-static void usb2_pc_load_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error);
-static void usb2_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error, uint8_t isload);
-
+static void	usb2_dma_lock_cb(void *, bus_dma_lock_op_t);
+static int32_t	usb2_m_copy_in_cb(void *, void *, uint32_t);
+static void	usb2_pc_alloc_mem_cb(void *, bus_dma_segment_t *, int, int);
+static void	usb2_pc_load_mem_cb(void *, bus_dma_segment_t *, int, int);
+static void	usb2_pc_common_mem_cb(void *, bus_dma_segment_t *, int, int,
+		    uint8_t);
 #endif
 
 #ifdef __NetBSD__
-static int32_t usb2_m_copy_in_cb(void *arg, caddr_t src, uint32_t count);
-static void usb2_pc_common_mem_cb(struct usb2_page_cache *pc, bus_dma_segment_t *segs, int nseg, int error, uint8_t isload);
-
+static int32_t	usb2_m_copy_in_cb(void *, caddr_t, uint32_t);
+static void	usb2_pc_common_mem_cb(struct usb2_page_cache *,
+		    bus_dma_segment_t *, int, int, uint8_t);
 #endif
 
 /*------------------------------------------------------------------------*

Modified: head/sys/dev/usb2/core/usb2_busdma.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_busdma.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_busdma.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -143,24 +143,38 @@ struct usb2_dma_tag {
 
 /* function prototypes */
 
-int	usb2_uiomove(struct usb2_page_cache *pc, struct uio *uio, uint32_t pc_offset, uint32_t len);
-struct usb2_dma_tag *usb2_dma_tag_find(struct usb2_dma_parent_tag *udpt, uint32_t size, uint32_t align);
-uint8_t	usb2_pc_alloc_mem(struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align);
+int	usb2_uiomove(struct usb2_page_cache *pc, struct uio *uio,
+	    uint32_t pc_offset, uint32_t len);
+struct usb2_dma_tag *usb2_dma_tag_find(struct usb2_dma_parent_tag *udpt,
+	    uint32_t size, uint32_t align);
+uint8_t	usb2_pc_alloc_mem(struct usb2_page_cache *pc, struct usb2_page *pg,
+	    uint32_t size, uint32_t align);
 uint8_t	usb2_pc_dmamap_create(struct usb2_page_cache *pc, uint32_t size);
-uint8_t	usb2_pc_load_mem(struct usb2_page_cache *pc, uint32_t size, uint8_t sync);
+uint8_t	usb2_pc_load_mem(struct usb2_page_cache *pc, uint32_t size,
+	    uint8_t sync);
 void	usb2_bdma_done_event(struct usb2_dma_parent_tag *udpt);
 void	usb2_bdma_post_sync(struct usb2_xfer *xfer);
 void	usb2_bdma_pre_sync(struct usb2_xfer *xfer);
 void	usb2_bdma_work_loop(struct usb2_xfer_queue *pq);
-void	usb2_bzero(struct usb2_page_cache *cache, uint32_t offset, uint32_t len);
-void	usb2_copy_in(struct usb2_page_cache *cache, uint32_t offset, const void *ptr, uint32_t len);
-int	usb2_copy_in_user(struct usb2_page_cache *cache, uint32_t offset, const void *ptr, uint32_t len);
-void	usb2_copy_out(struct usb2_page_cache *cache, uint32_t offset, void *ptr, uint32_t len);
-int	usb2_copy_out_user(struct usb2_page_cache *cache, uint32_t offset, void *ptr, uint32_t len);
-void	usb2_dma_tag_setup(struct usb2_dma_parent_tag *udpt, struct usb2_dma_tag *udt, bus_dma_tag_t dmat, struct mtx *mtx, usb2_dma_callback_t *func, struct usb2_xfer_root *info, uint8_t ndmabits, uint8_t nudt);
+void	usb2_bzero(struct usb2_page_cache *cache, uint32_t offset,
+	    uint32_t len);
+void	usb2_copy_in(struct usb2_page_cache *cache, uint32_t offset,
+	    const void *ptr, uint32_t len);
+int	usb2_copy_in_user(struct usb2_page_cache *cache, uint32_t offset,
+	    const void *ptr, uint32_t len);
+void	usb2_copy_out(struct usb2_page_cache *cache, uint32_t offset,
+	    void *ptr, uint32_t len);
+int	usb2_copy_out_user(struct usb2_page_cache *cache, uint32_t offset,
+	    void *ptr, uint32_t len);
+void	usb2_dma_tag_setup(struct usb2_dma_parent_tag *udpt,
+	    struct usb2_dma_tag *udt, bus_dma_tag_t dmat, struct mtx *mtx,
+	    usb2_dma_callback_t *func, struct usb2_xfer_root *info,
+	    uint8_t ndmabits, uint8_t nudt);
 void	usb2_dma_tag_unsetup(struct usb2_dma_parent_tag *udpt);
-void	usb2_get_page(struct usb2_page_cache *pc, uint32_t offset, struct usb2_page_search *res);
-void	usb2_m_copy_in(struct usb2_page_cache *cache, uint32_t dst_offset, struct mbuf *m, uint32_t src_offset, uint32_t src_len);
+void	usb2_get_page(struct usb2_page_cache *pc, uint32_t offset,
+	    struct usb2_page_search *res);
+void	usb2_m_copy_in(struct usb2_page_cache *cache, uint32_t dst_offset,
+	    struct mbuf *m, uint32_t src_offset, uint32_t src_len);
 void	usb2_pc_cpu_flush(struct usb2_page_cache *pc);
 void	usb2_pc_cpu_invalidate(struct usb2_page_cache *pc);
 void	usb2_pc_dmamap_destroy(struct usb2_page_cache *pc);

Modified: head/sys/dev/usb2/core/usb2_compat_linux.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_compat_linux.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_compat_linux.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -67,14 +67,17 @@ static usb2_callback_t usb_linux_non_iso
 
 static usb_complete_t usb_linux_wait_complete;
 
-static uint16_t usb_max_isoc_frames(struct usb_device *dev);
-static int usb_start_wait_urb(struct urb *urb, uint32_t timeout, uint16_t *p_actlen);
-static const struct usb_device_id *usb_linux_lookup_id(const struct usb_device_id *id, struct usb2_attach_arg *uaa);
-static struct usb_driver *usb_linux_get_usb_driver(struct usb_linux_softc *sc);
-static struct usb_device *usb_linux_create_usb_device(struct usb2_device *udev, device_t dev);
-static void usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface);
-static void usb_linux_complete(struct usb2_xfer *xfer);
-static int usb_unlink_urb_sub(struct urb *urb, uint8_t drain);
+static uint16_t	usb_max_isoc_frames(struct usb_device *);
+static int	usb_start_wait_urb(struct urb *, uint32_t, uint16_t *);
+static const struct usb_device_id *usb_linux_lookup_id(
+		    const struct usb_device_id *, struct usb2_attach_arg *);
+static struct	usb_driver *usb_linux_get_usb_driver(struct usb_linux_softc *);
+static struct	usb_device *usb_linux_create_usb_device(struct usb2_device *,
+		    device_t);
+static void	usb_linux_cleanup_interface(struct usb_device *,
+		    struct usb_interface *);
+static void	usb_linux_complete(struct usb2_xfer *);
+static int	usb_unlink_urb_sub(struct urb *, uint8_t);
 
 /*------------------------------------------------------------------------*
  * FreeBSD USB interface

Modified: head/sys/dev/usb2/core/usb2_compat_linux.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_compat_linux.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_compat_linux.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -439,16 +439,23 @@ struct urb {
 int	usb_submit_urb(struct urb *urb, uint16_t mem_flags);
 int	usb_unlink_urb(struct urb *urb);
 int	usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe);
-int	usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *pipe, uint8_t request, uint8_t requesttype, uint16_t value, uint16_t index, void *data, uint16_t size, uint32_t timeout);
-int	usb_set_interface(struct usb_device *dev, uint8_t ifnum, uint8_t alternate);
-int	usb_setup_endpoint(struct usb_device *dev, struct usb_host_endpoint *uhe, uint32_t bufsize);
+int	usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *pipe,
+	    uint8_t request, uint8_t requesttype, uint16_t value,
+	    uint16_t index, void *data, uint16_t size, uint32_t timeout);
+int	usb_set_interface(struct usb_device *dev, uint8_t ifnum,
+	    uint8_t alternate);
+int	usb_setup_endpoint(struct usb_device *dev,
+	    struct usb_host_endpoint *uhe, uint32_t bufsize);
 
-struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep);
+struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev,
+	    uint8_t type, uint8_t ep);
 struct urb *usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
-struct usb_host_interface *usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index);
+struct usb_host_interface *usb_altnum_to_altsetting(
+	    const struct usb_interface *intf, uint8_t alt_index);
 struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
 
-void   *usb_buffer_alloc(struct usb_device *dev, uint32_t size, uint16_t mem_flags, uint8_t *dma_addr);
+void   *usb_buffer_alloc(struct usb_device *dev, uint32_t size,
+	    uint16_t mem_flags, uint8_t *dma_addr);
 void   *usb_get_intfdata(struct usb_interface *intf);
 
 void	usb_buffer_free(struct usb_device *dev, uint32_t size, void *addr, uint8_t dma_addr);

Modified: head/sys/dev/usb2/core/usb2_config_td.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_config_td.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_config_td.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -60,10 +60,15 @@ struct usb2_config_td {
 
 /* prototypes */
 
-uint8_t	usb2_config_td_setup(struct usb2_config_td *ctd, void *priv_sc, struct mtx *priv_mtx, usb2_config_td_end_of_commands_t *p_func_eoc, uint16_t item_size, uint16_t item_count);
+uint8_t	usb2_config_td_setup(struct usb2_config_td *ctd, void *priv_sc,
+	    struct mtx *priv_mtx, usb2_config_td_end_of_commands_t *p_func_eoc,
+	    uint16_t item_size, uint16_t item_count);
 void	usb2_config_td_drain(struct usb2_config_td *ctd);
 void	usb2_config_td_unsetup(struct usb2_config_td *ctd);
-void	usb2_config_td_queue_command(struct usb2_config_td *ctd, usb2_config_td_command_t *pre_func, usb2_config_td_command_t *post_func, uint16_t command_sync, uint16_t command_ref);
+void	usb2_config_td_queue_command(struct usb2_config_td *ctd,
+	    usb2_config_td_command_t *pre_func,
+	    usb2_config_td_command_t *post_func, uint16_t command_sync,
+	    uint16_t command_ref);
 uint8_t	usb2_config_td_is_gone(struct usb2_config_td *ctd);
 uint8_t	usb2_config_td_sleep(struct usb2_config_td *ctd, uint32_t timeout);
 uint8_t	usb2_config_td_sync(struct usb2_config_td *ctd);

Modified: head/sys/dev/usb2/core/usb2_core.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_core.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_core.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -426,17 +426,28 @@ typedef struct malloc_type *usb2_malloc_
 /* prototypes */
 
 const char *usb2_errstr(usb2_error_t error);
-struct usb2_config_descriptor *usb2_get_config_descriptor(struct usb2_device *udev);
-struct usb2_device_descriptor *usb2_get_device_descriptor(struct usb2_device *udev);
-struct usb2_interface *usb2_get_iface(struct usb2_device *udev, uint8_t iface_index);
-struct usb2_interface_descriptor *usb2_get_interface_descriptor(struct usb2_interface *iface);
-uint8_t	usb2_clear_stall_callback(struct usb2_xfer *xfer1, struct usb2_xfer *xfer2);
+struct usb2_config_descriptor *usb2_get_config_descriptor(
+	    struct usb2_device *udev);
+struct usb2_device_descriptor *usb2_get_device_descriptor(
+	    struct usb2_device *udev);
+struct usb2_interface *usb2_get_iface(struct usb2_device *udev,
+	    uint8_t iface_index);
+struct usb2_interface_descriptor *usb2_get_interface_descriptor(
+	    struct usb2_interface *iface);
+uint8_t	usb2_clear_stall_callback(struct usb2_xfer *xfer1,
+	    struct usb2_xfer *xfer2);
 uint8_t	usb2_get_interface_altindex(struct usb2_interface *iface);
-usb2_error_t usb2_set_alt_interface_index(struct usb2_device *udev, uint8_t iface_index, uint8_t alt_index);
+usb2_error_t usb2_set_alt_interface_index(struct usb2_device *udev,
+	    uint8_t iface_index, uint8_t alt_index);
 uint8_t	usb2_get_speed(struct usb2_device *udev);
-usb2_error_t usb2_transfer_setup(struct usb2_device *udev, const uint8_t *ifaces, struct usb2_xfer **pxfer, const struct usb2_config *setup_start, uint16_t n_setup, void *priv_sc, struct mtx *priv_mtx);
-void	usb2_set_frame_data(struct usb2_xfer *xfer, void *ptr, uint32_t frindex);
-void	usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset, uint32_t frindex);
+usb2_error_t usb2_transfer_setup(struct usb2_device *udev,
+	    const uint8_t *ifaces, struct usb2_xfer **pxfer,
+	    const struct usb2_config *setup_start, uint16_t n_setup,
+	    void *priv_sc, struct mtx *priv_mtx);
+void	usb2_set_frame_data(struct usb2_xfer *xfer, void *ptr,
+	    uint32_t frindex);
+void	usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset,
+	    uint32_t frindex);
 void	usb2_start_hardware(struct usb2_xfer *xfer);
 void	usb2_transfer_clear_stall(struct usb2_xfer *xfer);
 void	usb2_transfer_drain(struct usb2_xfer *xfer);
@@ -444,10 +455,13 @@ void	usb2_transfer_set_stall(struct usb2
 void	usb2_transfer_start(struct usb2_xfer *xfer);
 void	usb2_transfer_stop(struct usb2_xfer *xfer);
 void	usb2_transfer_unsetup(struct usb2_xfer **pxfer, uint16_t n_setup);
-usb2_error_t usb2_ref_device(struct file *fp, struct usb2_location *ploc, uint32_t devloc);
+usb2_error_t usb2_ref_device(struct file *fp, struct usb2_location *ploc,
+	    uint32_t devloc);
 void	usb2_unref_device(struct usb2_location *ploc);
-void	usb2_set_parent_iface(struct usb2_device *udev, uint8_t iface_index, uint8_t parent_index);
-void	usb2_set_iface_perm(struct usb2_device *udev, uint8_t iface_index, uint32_t uid, uint32_t gid, uint16_t mode);
+void	usb2_set_parent_iface(struct usb2_device *udev, uint8_t iface_index,
+	    uint8_t parent_index);
+void	usb2_set_iface_perm(struct usb2_device *udev, uint8_t iface_index,
+	    uint32_t uid, uint32_t gid, uint16_t mode);
 uint8_t	usb2_get_bus_index(struct usb2_device *udev);
 uint8_t	usb2_get_device_index(struct usb2_device *udev);
 

Modified: head/sys/dev/usb2/core/usb2_dev.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_dev.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_dev.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -72,19 +72,22 @@ SYSCTL_INT(_hw_usb2_dev, OID_AUTO, debug
 
 /* prototypes */
 
-static uint32_t usb2_path_convert_one(const char **pp);
-static uint32_t usb2_path_convert(const char *path);
-static int usb2_check_access(int fflags, struct usb2_perm *puser);
-static int usb2_fifo_open(struct usb2_fifo *f, struct file *fp, struct thread *td, int fflags);
-static void usb2_fifo_close(struct usb2_fifo *f, struct thread *td, int fflags);
-static void usb2_dev_init(void *arg);
-static void usb2_dev_init_post(void *arg);
-static void usb2_dev_uninit(void *arg);
-static int usb2_fifo_uiomove(struct usb2_fifo *f, void *cp, int n, struct uio *uio);
-static void usb2_fifo_check_methods(struct usb2_fifo_methods *pm);
-static void usb2_clone(void *arg, USB_UCRED char *name, int namelen, struct cdev **dev);
-static struct usb2_fifo *usb2_fifo_alloc(void);
-static struct usb2_pipe *usb2_dev_get_pipe(struct usb2_device *udev, uint8_t iface_index, uint8_t ep_index, uint8_t dir);
+static uint32_t	usb2_path_convert_one(const char **);
+static uint32_t	usb2_path_convert(const char *);
+static int	usb2_check_access(int, struct usb2_perm *);
+static int	usb2_fifo_open(struct usb2_fifo *, struct file *,
+		    struct thread *, int);
+static void	usb2_fifo_close(struct usb2_fifo *, struct thread *, int);
+static void	usb2_dev_init(void *);
+static void	usb2_dev_init_post(void *);
+static void	usb2_dev_uninit(void *);
+static int	usb2_fifo_uiomove(struct usb2_fifo *, void *, int,
+		    struct uio *);
+static void	usb2_fifo_check_methods(struct usb2_fifo_methods *);
+static void	usb2_clone(void *, USB_UCRED char *, int, struct cdev **);
+static struct	usb2_fifo *usb2_fifo_alloc(void);
+static struct	usb2_pipe *usb2_dev_get_pipe(struct usb2_device *, uint8_t,
+		    uint8_t, uint8_t);
 
 static d_fdopen_t usb2_fdopen;
 static d_close_t usb2_close;

Modified: head/sys/dev/usb2/core/usb2_dev.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_dev.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_dev.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -130,27 +130,39 @@ struct usb2_fifo_sc {
 
 int	usb2_fifo_wait(struct usb2_fifo *fifo);
 void	usb2_fifo_signal(struct usb2_fifo *fifo);
-int	usb2_fifo_alloc_buffer(struct usb2_fifo *f, uint32_t bufsize, uint16_t nbuf);
+int	usb2_fifo_alloc_buffer(struct usb2_fifo *f, uint32_t bufsize,
+	    uint16_t nbuf);
 void	usb2_fifo_free_buffer(struct usb2_fifo *f);
-int	usb2_fifo_attach(struct usb2_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb2_fifo_methods *pm, struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit, uint8_t iface_index);
+int	usb2_fifo_attach(struct usb2_device *udev, void *priv_sc,
+	    struct mtx *priv_mtx, struct usb2_fifo_methods *pm,
+	    struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit,
+	    uint8_t iface_index);
 void	usb2_fifo_detach(struct usb2_fifo_sc *f_sc);
 uint32_t usb2_fifo_put_bytes_max(struct usb2_fifo *fifo);
-void	usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, uint32_t offset, uint32_t len, uint8_t what);
-void	usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr, uint32_t len, uint8_t what);
+void	usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc,
+	    uint32_t offset, uint32_t len, uint8_t what);
+void	usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr,
+	    uint32_t len, uint8_t what);
 uint8_t	usb2_fifo_put_data_buffer(struct usb2_fifo *f, void *ptr, uint32_t len);
 void	usb2_fifo_put_data_error(struct usb2_fifo *fifo);
-uint8_t	usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, uint32_t offset, uint32_t len, uint32_t *actlen, uint8_t what);
-uint8_t	usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr, uint32_t len, uint32_t *actlen, uint8_t what);
-uint8_t	usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr, uint32_t *plen);
+uint8_t	usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc,
+	    uint32_t offset, uint32_t len, uint32_t *actlen, uint8_t what);
+uint8_t	usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr,
+	    uint32_t len, uint32_t *actlen, uint8_t what);
+uint8_t	usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr,
+	    uint32_t *plen);
 void	usb2_fifo_get_data_error(struct usb2_fifo *fifo);
 uint8_t	usb2_fifo_opened(struct usb2_fifo *fifo);
 void	usb2_fifo_free(struct usb2_fifo *f);
 void	usb2_fifo_reset(struct usb2_fifo *f);
-int	usb2_check_thread_perm(struct usb2_device *udev, struct thread *td, int fflags, uint8_t iface_index, uint8_t ep_index);
+int	usb2_check_thread_perm(struct usb2_device *udev, struct thread *td,
+	    int fflags, uint8_t iface_index, uint8_t ep_index);
 void	usb2_fifo_wakeup(struct usb2_fifo *f);
-struct usb2_symlink *usb2_alloc_symlink(const char *target, const char *fmt,...);
+struct usb2_symlink *usb2_alloc_symlink(const char *target,
+	    const char *fmt,...);
 void	usb2_free_symlink(struct usb2_symlink *ps);
 uint32_t usb2_lookup_symlink(const char *src_ptr, uint8_t src_len);
-int	usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry, uint32_t user_len);
+int	usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry,
+	    uint32_t user_len);
 
 #endif					/* _USB2_DEV_H_ */

Modified: head/sys/dev/usb2/core/usb2_device.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_device.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_device.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -56,18 +56,24 @@
 
 /* function prototypes */
 
-static void usb2_fill_pipe_data(struct usb2_device *udev, uint8_t iface_index, struct usb2_endpoint_descriptor *edesc, struct usb2_pipe *pipe);
-static void usb2_free_pipe_data(struct usb2_device *udev, uint8_t iface_index, uint8_t iface_mask);
-static void usb2_free_iface_data(struct usb2_device *udev);
-static void usb2_detach_device_sub(struct usb2_device *udev, device_t *ppdev, uint8_t free_subdev);
-static uint8_t usb2_probe_and_attach_sub(struct usb2_device *udev, struct usb2_attach_arg *uaa);
-static void usb2_init_attach_arg(struct usb2_device *udev, struct usb2_attach_arg *uaa);
-static void usb2_suspend_resume_sub(struct usb2_device *udev, device_t dev, uint8_t do_suspend);
-static void usb2_clear_stall_proc(struct usb2_proc_msg *_pm);
-static void usb2_check_strings(struct usb2_device *udev);
-static usb2_error_t usb2_fill_iface_data(struct usb2_device *udev, uint8_t iface_index, uint8_t alt_index);
-static void usb2_notify_addq(const char *type, struct usb2_device *udev);
-static void usb2_fifo_free_wrap(struct usb2_device *udev, uint8_t iface_index, uint8_t flag);
+static void	usb2_fill_pipe_data(struct usb2_device *, uint8_t,
+		    struct usb2_endpoint_descriptor *, struct usb2_pipe *);
+static void	usb2_free_pipe_data(struct usb2_device *, uint8_t, uint8_t);
+static void	usb2_free_iface_data(struct usb2_device *);
+static void	usb2_detach_device_sub(struct usb2_device *, device_t *,
+		    uint8_t);
+static uint8_t	usb2_probe_and_attach_sub(struct usb2_device *,
+		    struct usb2_attach_arg *);
+static void	usb2_init_attach_arg(struct usb2_device *,
+		    struct usb2_attach_arg *);
+static void	usb2_suspend_resume_sub(struct usb2_device *, device_t,
+		    uint8_t);
+static void	usb2_clear_stall_proc(struct usb2_proc_msg *_pm);
+static void	usb2_check_strings(struct usb2_device *);
+static usb2_error_t usb2_fill_iface_data(struct usb2_device *, uint8_t,
+		    uint8_t);
+static void	usb2_notify_addq(const char *type, struct usb2_device *);
+static void	usb2_fifo_free_wrap(struct usb2_device *, uint8_t, uint8_t);
 
 /* static structures */
 

Modified: head/sys/dev/usb2/core/usb2_device.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_device.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_device.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -144,19 +144,30 @@ struct usb2_device {
 
 /* function prototypes */
 
-struct usb2_device *usb2_alloc_device(device_t parent_dev, struct usb2_bus *bus, struct usb2_device *parent_hub, uint8_t depth, uint8_t port_index, uint8_t port_no, uint8_t speed, uint8_t usb2_mode);
-struct usb2_pipe *usb2_get_pipe(struct usb2_device *udev, uint8_t iface_index, const struct usb2_config *setup);
+struct usb2_device *usb2_alloc_device(device_t parent_dev, struct usb2_bus *bus,
+		    struct usb2_device *parent_hub, uint8_t depth,
+		    uint8_t port_index, uint8_t port_no, uint8_t speed,
+		    uint8_t usb2_mode);
+struct usb2_pipe *usb2_get_pipe(struct usb2_device *udev, uint8_t iface_index,
+		    const struct usb2_config *setup);
 struct usb2_pipe *usb2_get_pipe_by_addr(struct usb2_device *udev, uint8_t ea_val);
-usb2_error_t usb2_interface_count(struct usb2_device *udev, uint8_t *count);
-usb2_error_t usb2_probe_and_attach(struct usb2_device *udev, uint8_t iface_index);
-usb2_error_t usb2_reset_iface_endpoints(struct usb2_device *udev, uint8_t iface_index);
-usb2_error_t usb2_set_config_index(struct usb2_device *udev, uint8_t index);
-usb2_error_t usb2_set_endpoint_stall(struct usb2_device *udev, struct usb2_pipe *pipe, uint8_t do_stall);
-usb2_error_t usb2_suspend_resume(struct usb2_device *udev, uint8_t do_suspend);
-void	usb2_detach_device(struct usb2_device *udev, uint8_t iface_index, uint8_t free_subdev);
+usb2_error_t	usb2_interface_count(struct usb2_device *udev, uint8_t *count);
+usb2_error_t	usb2_probe_and_attach(struct usb2_device *udev,
+		    uint8_t iface_index);
+usb2_error_t	usb2_reset_iface_endpoints(struct usb2_device *udev,
+		    uint8_t iface_index);
+usb2_error_t	usb2_set_config_index(struct usb2_device *udev, uint8_t index);
+usb2_error_t	usb2_set_endpoint_stall(struct usb2_device *udev,
+		    struct usb2_pipe *pipe, uint8_t do_stall);
+usb2_error_t	usb2_suspend_resume(struct usb2_device *udev,
+		    uint8_t do_suspend);
+void	usb2_detach_device(struct usb2_device *udev, uint8_t iface_index,
+	    uint8_t free_subdev);
 void	usb2_devinfo(struct usb2_device *udev, char *dst_ptr, uint16_t dst_len);
 void	usb2_free_device(struct usb2_device *udev);
-void   *usb2_find_descriptor(struct usb2_device *udev, void *id, uint8_t iface_index, uint8_t type, uint8_t type_mask, uint8_t subtype, uint8_t subtype_mask);
+void	*usb2_find_descriptor(struct usb2_device *udev, void *id,
+	    uint8_t iface_index, uint8_t type, uint8_t type_mask,
+	    uint8_t subtype, uint8_t subtype_mask);
 void	usb_linux_free_device(struct usb_device *dev);
 
 #endif					/* _USB2_DEVICE_H_ */

Modified: head/sys/dev/usb2/core/usb2_dynamic.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_dynamic.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_dynamic.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -35,11 +35,16 @@ struct usb2_device_request;
 
 /* typedefs */
 
-typedef usb2_error_t (usb2_temp_setup_by_index_t)(struct usb2_device *udev, uint16_t index);
-typedef uint8_t (usb2_test_quirk_t)(const struct usb2_lookup_info *info, uint16_t quirk);
-typedef int (usb2_quirk_ioctl_t)(unsigned long cmd, caddr_t data, int fflag, struct thread *td);
-typedef void (usb2_temp_get_desc_t)(struct usb2_device *udev, struct usb2_device_request *req, const void **pPtr, uint16_t *pLength);
-typedef void (usb2_temp_unsetup_t)(struct usb2_device *udev);
+typedef usb2_error_t	(usb2_temp_setup_by_index_t)(struct usb2_device *udev,
+			    uint16_t index);
+typedef uint8_t		(usb2_test_quirk_t)(const struct usb2_lookup_info *info,
+			    uint16_t quirk);
+typedef int		(usb2_quirk_ioctl_t)(unsigned long cmd, caddr_t data,
+			    int fflag, struct thread *td);
+typedef void		(usb2_temp_get_desc_t)(struct usb2_device *udev,
+			    struct usb2_device_request *req, const void **pPtr,
+			    uint16_t *pLength);
+typedef void		(usb2_temp_unsetup_t)(struct usb2_device *udev);
 
 /* global function pointers */
 

Modified: head/sys/dev/usb2/core/usb2_error.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_error.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_error.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -39,6 +39,5 @@ USB_MAKE_DEBUG_TABLE(USB_ERR);
 const char *
 usb2_errstr(usb2_error_t err)
 {
-	return ((err < USB_ERR_MAX) ?
-	    USB_ERR[err] : "USB_ERR_UNKNOWN");
+	return ((err < USB_ERR_MAX) ? USB_ERR[err] : "USB_ERR_UNKNOWN");
 }

Modified: head/sys/dev/usb2/core/usb2_generic.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_generic.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_generic.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -72,17 +72,19 @@ static usb2_fifo_cmd_t ugen_start_read;
 static usb2_fifo_cmd_t ugen_start_write;
 static usb2_fifo_cmd_t ugen_stop_io;
 
-static int ugen_transfer_setup(struct usb2_fifo *f, const struct usb2_config *setup, uint8_t n_setup);
-static int ugen_open_pipe_write(struct usb2_fifo *f);
-static int ugen_open_pipe_read(struct usb2_fifo *f);
-static int ugen_set_config(struct usb2_fifo *f, uint8_t index);
-static int ugen_set_interface(struct usb2_fifo *f, uint8_t iface_index, uint8_t alt_index);
-static int ugen_get_cdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *pgd);
-static int ugen_get_sdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *ugd);
-static int usb2_gen_fill_deviceinfo(struct usb2_fifo *f, struct usb2_device_info *di);
-static int ugen_re_enumerate(struct usb2_fifo *f);
-static int ugen_iface_ioctl(struct usb2_fifo *f, u_long cmd, void *addr, int fflags);
-static uint8_t ugen_fs_get_complete(struct usb2_fifo *f, uint8_t *pindex);
+static int	ugen_transfer_setup(struct usb2_fifo *,
+		     const struct usb2_config *, uint8_t);
+static int	ugen_open_pipe_write(struct usb2_fifo *);
+static int	ugen_open_pipe_read(struct usb2_fifo *);
+static int	ugen_set_config(struct usb2_fifo *, uint8_t);
+static int	ugen_set_interface(struct usb2_fifo *, uint8_t, uint8_t);
+static int	ugen_get_cdesc(struct usb2_fifo *, struct usb2_gen_descriptor *);
+static int	ugen_get_sdesc(struct usb2_fifo *, struct usb2_gen_descriptor *);
+static int	usb2_gen_fill_deviceinfo(struct usb2_fifo *,
+		    struct usb2_device_info *);
+static int	ugen_re_enumerate(struct usb2_fifo *);
+static int	ugen_iface_ioctl(struct usb2_fifo *, u_long, void *, int);
+static uint8_t	ugen_fs_get_complete(struct usb2_fifo *, uint8_t *);
 static int ugen_fs_uninit(struct usb2_fifo *f);
 
 /* structures */

Modified: head/sys/dev/usb2/core/usb2_handle_request.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_handle_request.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_handle_request.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -52,12 +52,15 @@ enum {
 
 /* function prototypes */
 
-static uint8_t usb2_handle_get_stall(struct usb2_device *udev, uint8_t ea_val);
-static usb2_error_t usb2_handle_remote_wakeup(struct usb2_xfer *xfer, uint8_t is_on);
-static usb2_error_t usb2_handle_request(struct usb2_xfer *xfer);
-static usb2_error_t usb2_handle_set_config(struct usb2_xfer *xfer, uint8_t conf_no);
-static usb2_error_t usb2_handle_set_stall(struct usb2_xfer *xfer, uint8_t ep, uint8_t do_stall);
-static usb2_error_t usb2_handle_iface_request(struct usb2_xfer *xfer, void **ppdata, uint16_t *plen, struct usb2_device_request req, uint16_t off, uint8_t state);
+static uint8_t usb2_handle_get_stall(struct usb2_device *, uint8_t);
+static usb2_error_t	 usb2_handle_remote_wakeup(struct usb2_xfer *, uint8_t);
+static usb2_error_t	 usb2_handle_request(struct usb2_xfer *);
+static usb2_error_t	 usb2_handle_set_config(struct usb2_xfer *, uint8_t);
+static usb2_error_t	 usb2_handle_set_stall(struct usb2_xfer *, uint8_t,
+			    uint8_t);
+static usb2_error_t	 usb2_handle_iface_request(struct usb2_xfer *, void **,
+			    uint16_t *, struct usb2_device_request, uint16_t,
+			    uint8_t);
 
 /*------------------------------------------------------------------------*
  *	usb2_handle_request_callback

Modified: head/sys/dev/usb2/core/usb2_hid.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_hid.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_hid.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -80,10 +80,16 @@ struct hid_data *hid_start_parse(const v
 void	hid_end_parse(struct hid_data *s);
 int	hid_get_item(struct hid_data *s, struct hid_item *h);
 int	hid_report_size(const void *buf, int len, enum hid_kind k, uint8_t *id);
-int	hid_locate(const void *desc, int size, uint32_t usage, enum hid_kind kind, struct hid_location *loc, uint32_t *flags);
-uint32_t hid_get_data(const uint8_t *buf, uint32_t len, struct hid_location *loc);
+int	hid_locate(const void *desc, int size, uint32_t usage,
+	    enum hid_kind kind, struct hid_location *loc, uint32_t *flags);
+uint32_t hid_get_data(const uint8_t *buf, uint32_t len,
+	    struct hid_location *loc);
 int	hid_is_collection(const void *desc, int size, uint32_t usage);
-struct usb2_hid_descriptor *hid_get_descriptor_from_usb(struct usb2_config_descriptor *cd, struct usb2_interface_descriptor *id);
-usb2_error_t usb2_req_get_hid_desc(struct usb2_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, usb2_malloc_type mem, uint8_t iface_index);
+struct usb2_hid_descriptor *hid_get_descriptor_from_usb(
+	    struct usb2_config_descriptor *cd,
+	    struct usb2_interface_descriptor *id);
+usb2_error_t usb2_req_get_hid_desc(struct usb2_device *udev, struct mtx *mtx,
+	    void **descp, uint16_t *sizep, usb2_malloc_type mem,
+	    uint8_t iface_index);
 
 #endif					/* _USB2_CORE_HID_H_ */

Modified: head/sys/dev/usb2/core/usb2_hub.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_hub.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_hub.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -65,10 +65,13 @@ struct usb2_hub {
 
 /* function prototypes */
 
-uint8_t	usb2_intr_schedule_adjust(struct usb2_device *udev, int16_t len, uint8_t slot);
+uint8_t	usb2_intr_schedule_adjust(struct usb2_device *udev, int16_t len,
+	    uint8_t slot);
 void	usb2_fs_isoc_schedule_init_all(struct usb2_fs_isoc_schedule *fss);
-void	usb2_bus_port_set_device(struct usb2_bus *bus, struct usb2_port *up, struct usb2_device *udev, uint8_t device_index);
-struct usb2_device *usb2_bus_port_get_device(struct usb2_bus *bus, struct usb2_port *up);
+void	usb2_bus_port_set_device(struct usb2_bus *bus, struct usb2_port *up,
+	    struct usb2_device *udev, uint8_t device_index);
+struct usb2_device *usb2_bus_port_get_device(struct usb2_bus *bus,
+	    struct usb2_port *up);
 void	usb2_needs_explore(struct usb2_bus *bus, uint8_t do_probe);
 void	usb2_needs_explore_all(void);
 

Modified: head/sys/dev/usb2/core/usb2_lookup.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_lookup.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_lookup.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -113,7 +113,10 @@ struct usb2_device_id {
 #define	USB_GET_DRIVER_INFO(did)		\
   (((const uint8_t *)((did)->driver_info)) - ((const uint8_t *)0))
 
-const struct usb2_device_id *usb2_lookup_id_by_info(const struct usb2_device_id *id, uint32_t sizeof_id, const struct usb2_lookup_info *info);
-int	usb2_lookup_id_by_uaa(const struct usb2_device_id *id, uint32_t sizeof_id, struct usb2_attach_arg *uaa);
+const struct usb2_device_id *usb2_lookup_id_by_info(
+	    const struct usb2_device_id *id, uint32_t sizeof_id,
+	    const struct usb2_lookup_info *info);
+int	usb2_lookup_id_by_uaa(const struct usb2_device_id *id,
+	    uint32_t sizeof_id, struct usb2_attach_arg *uaa);
 
 #endif					/* _USB2_LOOKUP_H_ */

Modified: head/sys/dev/usb2/core/usb2_mbuf.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_mbuf.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_mbuf.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -95,6 +95,7 @@ struct usb2_ifqueue {
   } while (0)
 
 /* prototypes */
-void   *usb2_alloc_mbufs(struct malloc_type *type, struct usb2_ifqueue *ifq, uint32_t block_size, uint16_t nblocks);
+void   *usb2_alloc_mbufs(struct malloc_type *type, struct usb2_ifqueue *ifq,
+	    uint32_t block_size, uint16_t nblocks);
 
 #endif					/* _USB2_MBUF_H_ */

Modified: head/sys/dev/usb2/core/usb2_msctest.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_msctest.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_msctest.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -27,8 +27,10 @@
 #ifndef _USB2_MSCTEST_H_
 #define	_USB2_MSCTEST_H_
 
-usb2_error_t usb2_test_autoinstall(struct usb2_device *udev, uint8_t iface_index, uint8_t do_eject);
-usb2_error_t usb2_test_huawei(struct usb2_device *udev, struct usb2_attach_arg *uaa);
+usb2_error_t usb2_test_autoinstall(struct usb2_device *udev,
+	    uint8_t iface_index, uint8_t do_eject);
+usb2_error_t usb2_test_huawei(struct usb2_device *udev,
+	    struct usb2_attach_arg *uaa);
 int	usb2_lookup_huawei(struct usb2_attach_arg *uaa);
 
 /* Huawei specific defines */

Modified: head/sys/dev/usb2/core/usb2_parse.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_parse.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_parse.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -27,9 +27,14 @@
 #ifndef _USB2_PARSE_H_
 #define	_USB2_PARSE_H_
 
-struct usb2_descriptor *usb2_desc_foreach(struct usb2_config_descriptor *cd, struct usb2_descriptor *desc);
-struct usb2_interface_descriptor *usb2_find_idesc(struct usb2_config_descriptor *cd, uint8_t iface_index, uint8_t alt_index);
-struct usb2_endpoint_descriptor *usb2_find_edesc(struct usb2_config_descriptor *cd, uint8_t iface_index, uint8_t alt_index, uint8_t ep_index);
+struct usb2_descriptor *usb2_desc_foreach(struct usb2_config_descriptor *cd,
+	    struct usb2_descriptor *desc);
+struct usb2_interface_descriptor *usb2_find_idesc(
+	    struct usb2_config_descriptor *cd, uint8_t iface_index,
+	    uint8_t alt_index);
+struct usb2_endpoint_descriptor *usb2_find_edesc(
+	    struct usb2_config_descriptor *cd, uint8_t iface_index,
+	    uint8_t alt_index, uint8_t ep_index);
 uint16_t usb2_get_no_endpoints(struct usb2_config_descriptor *cd);
 uint16_t usb2_get_no_alts(struct usb2_config_descriptor *cd, uint8_t ifaceno);
 

Modified: head/sys/dev/usb2/core/usb2_process.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_process.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_process.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -79,7 +79,8 @@ struct usb2_process {
 
 uint8_t	usb2_proc_cwait(struct usb2_process *up, int timeout);
 uint8_t	usb2_proc_is_gone(struct usb2_process *up);
-uint8_t	usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx, uint8_t prio);
+uint8_t	usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx,
+	    uint8_t prio);
 void	usb2_proc_csignal(struct usb2_process *up);
 void	usb2_proc_drain(struct usb2_process *up);
 void	usb2_proc_mwait(struct usb2_process *up, void *pm0, void *pm1);

Modified: head/sys/dev/usb2/core/usb2_request.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_request.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_request.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -27,32 +27,67 @@
 #ifndef _USB2_REQUEST_H_
 #define	_USB2_REQUEST_H_
 
-usb2_error_t usb2_do_request_flags(struct usb2_device *udev, struct mtx *mtx, struct usb2_device_request *req, void *data, uint32_t flags, uint16_t *actlen, uint32_t timeout);
-usb2_error_t usb2_req_clear_hub_feature(struct usb2_device *udev, struct mtx *mtx, uint16_t sel);
-usb2_error_t usb2_req_clear_port_feature(struct usb2_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel);
-usb2_error_t usb2_req_get_alt_interface_no(struct usb2_device *udev, struct mtx *mtx, uint8_t *alt_iface_no, uint8_t iface_index);
-usb2_error_t usb2_req_get_config(struct usb2_device *udev, struct mtx *mtx, uint8_t *pconf);
-usb2_error_t usb2_req_get_config_desc(struct usb2_device *udev, struct mtx *mtx, struct usb2_config_descriptor *d, uint8_t conf_index);
-usb2_error_t usb2_req_get_config_desc_full(struct usb2_device *udev, struct mtx *mtx, struct usb2_config_descriptor **ppcd, struct malloc_type *mtype, uint8_t conf_index);
-usb2_error_t usb2_req_get_desc(struct usb2_device *udev, struct mtx *mtx, void *desc, uint16_t min_len, uint16_t max_len, uint16_t id, uint8_t type, uint8_t index, uint8_t retries);
-usb2_error_t usb2_req_get_device_desc(struct usb2_device *udev, struct mtx *mtx, struct usb2_device_descriptor *d);
-usb2_error_t usb2_req_get_device_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_status *st);
-usb2_error_t usb2_req_get_hub_descriptor(struct usb2_device *udev, struct mtx *mtx, struct usb2_hub_descriptor *hd, uint8_t nports);
-usb2_error_t usb2_req_get_hub_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_hub_status *st);
-usb2_error_t usb2_req_get_port_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_port_status *ps, uint8_t port);
-usb2_error_t usb2_req_get_report(struct usb2_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id);
-usb2_error_t usb2_req_get_report_descriptor(struct usb2_device *udev, struct mtx *mtx, void *d, uint16_t size, uint8_t iface_index);
-usb2_error_t usb2_req_get_string_any(struct usb2_device *udev, struct mtx *mtx, char *buf, uint16_t len, uint8_t string_index);
-usb2_error_t usb2_req_get_string_desc(struct usb2_device *udev, struct mtx *mtx, void *sdesc, uint16_t max_len, uint16_t lang_id, uint8_t string_index);
-usb2_error_t usb2_req_reset_port(struct usb2_device *udev, struct mtx *mtx, uint8_t port);
-usb2_error_t usb2_req_set_address(struct usb2_device *udev, struct mtx *mtx, uint16_t addr);
-usb2_error_t usb2_req_set_alt_interface_no(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint8_t alt_no);
-usb2_error_t usb2_req_set_config(struct usb2_device *udev, struct mtx *mtx, uint8_t conf);
-usb2_error_t usb2_req_set_hub_feature(struct usb2_device *udev, struct mtx *mtx, uint16_t sel);
-usb2_error_t usb2_req_set_idle(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint8_t duration, uint8_t id);
-usb2_error_t usb2_req_set_port_feature(struct usb2_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel);
-usb2_error_t usb2_req_set_protocol(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint16_t report);
-usb2_error_t usb2_req_set_report(struct usb2_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id);
+usb2_error_t usb2_do_request_flags(struct usb2_device *udev, struct mtx *mtx,
+		    struct usb2_device_request *req, void *data, uint32_t flags,
+		    uint16_t *actlen, uint32_t timeout);
+usb2_error_t usb2_req_clear_hub_feature(struct usb2_device *udev,
+		    struct mtx *mtx, uint16_t sel);
+usb2_error_t usb2_req_clear_port_feature(struct usb2_device *udev,
+		    struct mtx *mtx, uint8_t port, uint16_t sel);
+usb2_error_t usb2_req_get_alt_interface_no(struct usb2_device *udev,
+		    struct mtx *mtx, uint8_t *alt_iface_no,
+		    uint8_t iface_index);
+usb2_error_t usb2_req_get_config(struct usb2_device *udev, struct mtx *mtx,
+		    uint8_t *pconf);
+usb2_error_t usb2_req_get_config_desc(struct usb2_device *udev, struct mtx *mtx,
+		    struct usb2_config_descriptor *d, uint8_t conf_index);
+usb2_error_t usb2_req_get_config_desc_full(struct usb2_device *udev,
+		    struct mtx *mtx, struct usb2_config_descriptor **ppcd,
+		    struct malloc_type *mtype, uint8_t conf_index);
+usb2_error_t usb2_req_get_desc(struct usb2_device *udev, struct mtx *mtx,
+		    void *desc, uint16_t min_len, uint16_t max_len, uint16_t id,
+		    uint8_t type, uint8_t index, uint8_t retries);
+usb2_error_t usb2_req_get_device_desc(struct usb2_device *udev, struct mtx *mtx,
+		    struct usb2_device_descriptor *d);
+usb2_error_t usb2_req_get_device_status(struct usb2_device *udev,
+		    struct mtx *mtx, struct usb2_status *st);
+usb2_error_t usb2_req_get_hub_descriptor(struct usb2_device *udev,
+		    struct mtx *mtx, struct usb2_hub_descriptor *hd,
+		    uint8_t nports);
+usb2_error_t usb2_req_get_hub_status(struct usb2_device *udev, struct mtx *mtx,
+		    struct usb2_hub_status *st);
+usb2_error_t usb2_req_get_port_status(struct usb2_device *udev, struct mtx *mtx,
+		    struct usb2_port_status *ps, uint8_t port);
+usb2_error_t usb2_req_get_report(struct usb2_device *udev, struct mtx *mtx,
+		    void *data, uint16_t len, uint8_t iface_index, uint8_t type,
+		    uint8_t id);
+usb2_error_t usb2_req_get_report_descriptor(struct usb2_device *udev,
+		    struct mtx *mtx, void *d, uint16_t size,
+		    uint8_t iface_index);
+usb2_error_t usb2_req_get_string_any(struct usb2_device *udev, struct mtx *mtx,
+		    char *buf, uint16_t len, uint8_t string_index);
+usb2_error_t usb2_req_get_string_desc(struct usb2_device *udev, struct mtx *mtx,
+		    void *sdesc, uint16_t max_len, uint16_t lang_id,
+		    uint8_t string_index);
+usb2_error_t usb2_req_reset_port(struct usb2_device *udev, struct mtx *mtx,
+		    uint8_t port);
+usb2_error_t usb2_req_set_address(struct usb2_device *udev, struct mtx *mtx,
+		    uint16_t addr);
+usb2_error_t usb2_req_set_alt_interface_no(struct usb2_device *udev,
+		    struct mtx *mtx, uint8_t iface_index, uint8_t alt_no);
+usb2_error_t usb2_req_set_config(struct usb2_device *udev, struct mtx *mtx,
+		    uint8_t conf);
+usb2_error_t usb2_req_set_hub_feature(struct usb2_device *udev, struct mtx *mtx,
+		    uint16_t sel);
+usb2_error_t usb2_req_set_idle(struct usb2_device *udev, struct mtx *mtx,
+		    uint8_t iface_index, uint8_t duration, uint8_t id);
+usb2_error_t usb2_req_set_port_feature(struct usb2_device *udev,
+		    struct mtx *mtx, uint8_t port, uint16_t sel);
+usb2_error_t usb2_req_set_protocol(struct usb2_device *udev, struct mtx *mtx,
+		    uint8_t iface_index, uint16_t report);
+usb2_error_t usb2_req_set_report(struct usb2_device *udev, struct mtx *mtx,
+		    void *data, uint16_t len, uint8_t iface_index,
+		    uint8_t type, uint8_t id);
 usb2_error_t usb2_req_re_enumerate(struct usb2_device *udev, struct mtx *mtx);
 
 #define	usb2_do_request(u,m,r,d) \

Modified: head/sys/dev/usb2/core/usb2_sw_transfer.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_sw_transfer.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_sw_transfer.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -56,6 +56,7 @@ struct usb2_sw_transfer {
 
 /* prototypes */
 
-void	usb2_sw_transfer(struct usb2_sw_transfer *std, usb2_sw_transfer_func_t *func);
+void	usb2_sw_transfer(struct usb2_sw_transfer *std,
+	    usb2_sw_transfer_func_t *func);
 
 #endif					/* _USB2_SW_TRANSFER_H_ */

Modified: head/sys/dev/usb2/core/usb2_transfer.c
==============================================================================
--- head/sys/dev/usb2/core/usb2_transfer.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_transfer.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -119,17 +119,17 @@ static const struct usb2_config usb2_con
 
 /* function prototypes */
 
-static void usb2_update_max_frame_size(struct usb2_xfer *xfer);
-static uint32_t usb2_get_dma_delay(struct usb2_bus *bus);
-static void usb2_transfer_unsetup_sub(struct usb2_xfer_root *info, uint8_t needs_delay);
-static void usb2_control_transfer_init(struct usb2_xfer *xfer);
-static uint8_t usb2_start_hardware_sub(struct usb2_xfer *xfer);
-static void usb2_callback_proc(struct usb2_proc_msg *_pm);
-static void usb2_callback_ss_done_defer(struct usb2_xfer *xfer);
-static void usb2_callback_wrapper(struct usb2_xfer_queue *pq);
-static void usb2_dma_delay_done_cb(void *arg);
-static void usb2_transfer_start_cb(void *arg);
-static uint8_t usb2_callback_wrapper_sub(struct usb2_xfer *xfer);
+static void	usb2_update_max_frame_size(struct usb2_xfer *);
+static uint32_t	usb2_get_dma_delay(struct usb2_bus *);
+static void	usb2_transfer_unsetup_sub(struct usb2_xfer_root *, uint8_t);
+static void	usb2_control_transfer_init(struct usb2_xfer *);
+static uint8_t	usb2_start_hardware_sub(struct usb2_xfer *);
+static void	usb2_callback_proc(struct usb2_proc_msg *);
+static void	usb2_callback_ss_done_defer(struct usb2_xfer *);
+static void	usb2_callback_wrapper(struct usb2_xfer_queue *);
+static void	usb2_dma_delay_done_cb(void *);
+static void	usb2_transfer_start_cb(void *);
+static uint8_t	usb2_callback_wrapper_sub(struct usb2_xfer *);
 
 /*------------------------------------------------------------------------*
  *	usb2_update_max_frame_size

Modified: head/sys/dev/usb2/core/usb2_transfer.h
==============================================================================
--- head/sys/dev/usb2/core/usb2_transfer.h	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/core/usb2_transfer.h	Thu Dec 11 23:13:02 2008	(r185948)
@@ -103,20 +103,26 @@ struct usb2_setup_params {
 /* function prototypes */
 
 uint8_t	usb2_transfer_pending(struct usb2_xfer *xfer);
-uint8_t	usb2_transfer_setup_sub_malloc(struct usb2_setup_params *parm, struct usb2_page_cache **ppc, uint32_t size, uint32_t align, uint32_t count);
-void	usb2_command_wrapper(struct usb2_xfer_queue *pq, struct usb2_xfer *xfer);
+uint8_t	usb2_transfer_setup_sub_malloc(struct usb2_setup_params *parm,
+	    struct usb2_page_cache **ppc, uint32_t size, uint32_t align,
+	    uint32_t count);
+void	usb2_command_wrapper(struct usb2_xfer_queue *pq,
+	    struct usb2_xfer *xfer);
 void	usb2_pipe_enter(struct usb2_xfer *xfer);
 void	usb2_pipe_start(struct usb2_xfer_queue *pq);
 void	usb2_transfer_dequeue(struct usb2_xfer *xfer);
 void	usb2_transfer_done(struct usb2_xfer *xfer, usb2_error_t error);
-void	usb2_transfer_enqueue(struct usb2_xfer_queue *pq, struct usb2_xfer *xfer);
+void	usb2_transfer_enqueue(struct usb2_xfer_queue *pq,
+	    struct usb2_xfer *xfer);
 void	usb2_transfer_setup_sub(struct usb2_setup_params *parm);
 void	usb2_default_transfer_setup(struct usb2_device *udev);
-void	usb2_clear_data_toggle(struct usb2_device *udev, struct usb2_pipe *pipe);
+void	usb2_clear_data_toggle(struct usb2_device *udev,
+	    struct usb2_pipe *pipe);
 void	usb2_do_poll(struct usb2_xfer **ppxfer, uint16_t max);
 usb2_callback_t usb2_do_request_callback;
 usb2_callback_t usb2_handle_request_callback;
 usb2_callback_t usb2_do_clear_stall_callback;
-void	usb2_transfer_timeout_ms(struct usb2_xfer *xfer, void (*cb) (void *arg), uint32_t ms);
+void	usb2_transfer_timeout_ms(struct usb2_xfer *xfer,
+	    void (*cb) (void *arg), uint32_t ms);
 
 #endif					/* _USB2_TRANSFER_H_ */

Modified: head/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_aue2.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/ethernet/if_aue2.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -190,13 +190,15 @@ static usb2_callback_t aue_bulk_read_cal
 static usb2_callback_t aue_bulk_write_clear_stall_callback;
 static usb2_callback_t aue_bulk_write_callback;
 
-static void aue_cfg_do_request(struct aue_softc *sc, struct usb2_device_request *req, void *data);
-static uint8_t aue_cfg_csr_read_1(struct aue_softc *sc, uint16_t reg);
-static uint16_t aue_cfg_csr_read_2(struct aue_softc *sc, uint16_t reg);
-static void aue_cfg_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val);
-static void aue_cfg_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val);
-static void aue_cfg_eeprom_getword(struct aue_softc *sc, uint8_t addr, uint8_t *dest);
-static void aue_cfg_read_eeprom(struct aue_softc *sc, uint8_t *dest, uint16_t off, uint16_t len);
+static void	aue_cfg_do_request(struct aue_softc *,
+		    struct usb2_device_request *, void *);
+static uint8_t	aue_cfg_csr_read_1(struct aue_softc *, uint16_t);
+static uint16_t	aue_cfg_csr_read_2(struct aue_softc *, uint16_t);
+static void	aue_cfg_csr_write_1(struct aue_softc *, uint16_t, uint8_t);
+static void	aue_cfg_csr_write_2(struct aue_softc *, uint16_t, uint16_t);
+static void	aue_cfg_eeprom_getword(struct aue_softc *, uint8_t, uint8_t *);
+static void	aue_cfg_read_eeprom(struct aue_softc *, uint8_t *, uint16_t,
+		    uint16_t);
 
 static miibus_readreg_t aue_cfg_miibus_readreg;
 static miibus_writereg_t aue_cfg_miibus_writereg;
@@ -213,15 +215,15 @@ static usb2_config_td_command_t aue_cfg_
 static usb2_config_td_command_t aue_cfg_pre_stop;
 static usb2_config_td_command_t aue_cfg_stop;
 
-static void aue_cfg_reset_pegasus_II(struct aue_softc *sc);
-static void aue_cfg_reset(struct aue_softc *sc);
-static void aue_start_cb(struct ifnet *ifp);
-static void aue_init_cb(void *arg);
-static void aue_start_transfers(struct aue_softc *sc);
-static int aue_ifmedia_upd_cb(struct ifnet *ifp);
-static void aue_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr);
-static int aue_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data);
-static void aue_watchdog(void *arg);
+static void	aue_cfg_reset_pegasus_II(struct aue_softc *);
+static void	aue_cfg_reset(struct aue_softc *);
+static void	aue_start_cb(struct ifnet *);
+static void	aue_init_cb(void *);
+static void	aue_start_transfers(struct aue_softc *);
+static int	aue_ifmedia_upd_cb(struct ifnet *);
+static void	aue_ifmedia_sts_cb(struct ifnet *, struct ifmediareq *);
+static int	aue_ioctl_cb(struct ifnet *, u_long, caddr_t);
+static void	aue_watchdog(void *);
 
 static const struct usb2_config aue_config[AUE_ENDPT_MAX] = {
 

Modified: head/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_axe2.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/ethernet/if_axe2.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -159,8 +159,6 @@ static usb2_callback_t axe_bulk_read_cal
 static usb2_callback_t axe_bulk_write_clear_stall_callback;
 static usb2_callback_t axe_bulk_write_callback;
 
-static void axe_cfg_cmd(struct axe_softc *sc, uint16_t cmd, uint16_t index, uint16_t val, void *buf);
-
 static miibus_readreg_t axe_cfg_miibus_readreg;
 static miibus_writereg_t axe_cfg_miibus_writereg;
 static miibus_statchg_t axe_cfg_miibus_statchg;
@@ -176,16 +174,18 @@ static usb2_config_td_command_t axe_cfg_
 static usb2_config_td_command_t axe_cfg_pre_stop;
 static usb2_config_td_command_t axe_cfg_stop;
 
-static int axe_ifmedia_upd_cb(struct ifnet *ifp);
-static void axe_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr);
-static void axe_cfg_reset(struct axe_softc *sc);
-static void axe_start_cb(struct ifnet *ifp);
-static void axe_start_transfers(struct axe_softc *sc);
-static void axe_init_cb(void *arg);
-static int axe_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data);
-static void axe_watchdog(void *arg);
-static void axe_cfg_ax88178_init(struct axe_softc *);
-static void axe_cfg_ax88772_init(struct axe_softc *);
+static int	axe_ifmedia_upd_cb(struct ifnet *);
+static void	axe_ifmedia_sts_cb(struct ifnet *, struct ifmediareq *);
+static void	axe_cfg_reset(struct axe_softc *);
+static void	axe_start_cb(struct ifnet *);
+static void	axe_start_transfers(struct axe_softc *);
+static void	axe_init_cb(void *);
+static int	axe_ioctl_cb(struct ifnet *, u_long, caddr_t);
+static void	axe_watchdog(void *);
+static void	axe_cfg_cmd(struct axe_softc *, uint16_t, uint16_t, uint16_t,
+		    void *);
+static void	axe_cfg_ax88178_init(struct axe_softc *);
+static void	axe_cfg_ax88772_init(struct axe_softc *);
 
 static const struct usb2_config axe_config[AXE_ENDPT_MAX] = {
 

Modified: head/sys/dev/usb2/ethernet/if_cdce2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_cdce2.c	Thu Dec 11 23:04:34 2008	(r185947)
+++ head/sys/dev/usb2/ethernet/if_cdce2.c	Thu Dec 11 23:13:02 2008	(r185948)
@@ -81,14 +81,14 @@ static usb2_callback_t cdce_bulk_read_ca
 static usb2_callback_t cdce_intr_read_callback;
 static usb2_callback_t cdce_intr_write_callback;
 
-static void cdce_start_cb(struct ifnet *ifp);
-static void cdce_start_transfers(struct cdce_softc *sc);
-static uint32_t cdce_m_crc32(struct mbuf *m, uint32_t src_offset, uint32_t src_len);
-static void cdce_stop(struct cdce_softc *sc);
-static int cdce_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812112313.mBBND2Xq079336>