svn commit: r194860 - in head: . share/man/man4 share/man/man9

Andrew Thompson thompsa at FreeBSD.org
Wed Jun 24 17:01:18 UTC 2009


Author: thompsa
Date: Wed Jun 24 17:01:17 2009
New Revision: 194860
URL: http://svn.freebsd.org/changeset/base/194860

Log:
  Move programming info from usb(4) to usbdi(9) and update for the usb stack
  changeover. Needs much more content still.

Modified:
  head/ObsoleteFiles.inc
  head/share/man/man4/usb.4
  head/share/man/man9/Makefile
  head/share/man/man9/usbdi.9

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Wed Jun 24 16:57:33 2009	(r194859)
+++ head/ObsoleteFiles.inc	Wed Jun 24 17:01:17 2009	(r194860)
@@ -14,6 +14,53 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20090624: update usbdi(9)
+OLD_FILES+=usr/share/man/man9/usbd_abort_default_pipe.9
+OLD_FILES+=usr/share/man/man9/usbd_abort_pipe.9
+OLD_FILES+=usr/share/man/man9/usbd_alloc_buffer.9
+OLD_FILES+=usr/share/man/man9/usbd_alloc_xfer.9
+OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall.9
+OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall_async.9
+OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_toggle.9
+OLD_FILES+=usr/share/man/man9/usbd_close_pipe.9
+OLD_FILES+=usr/share/man/man9/usbd_device2interface_handle.9
+OLD_FILES+=usr/share/man/man9/usbd_do_request_async.9
+OLD_FILES+=usr/share/man/man9/usbd_do_request_flags_pipe.9
+OLD_FILES+=usr/share/man/man9/usbd_endpoint_count.9
+OLD_FILES+=usr/share/man/man9/usbd_find_edesc.9
+OLD_FILES+=usr/share/man/man9/usbd_find_idesc.9
+OLD_FILES+=usr/share/man/man9/usbd_free_buffer.9
+OLD_FILES+=usr/share/man/man9/usbd_free_xfer.9
+OLD_FILES+=usr/share/man/man9/usbd_get_buffer.9
+OLD_FILES+=usr/share/man/man9/usbd_get_config.9
+OLD_FILES+=usr/share/man/man9/usbd_get_config_desc.9
+OLD_FILES+=usr/share/man/man9/usbd_get_config_desc_full.9
+OLD_FILES+=usr/share/man/man9/usbd_get_config_descriptor.9
+OLD_FILES+=usr/share/man/man9/usbd_get_device_descriptor.9
+OLD_FILES+=usr/share/man/man9/usbd_get_endpoint_descriptor.9
+OLD_FILES+=usr/share/man/man9/usbd_get_interface_altindex.9
+OLD_FILES+=usr/share/man/man9/usbd_get_interface_descriptor.9
+OLD_FILES+=usr/share/man/man9/usbd_get_no_alts.9
+OLD_FILES+=usr/share/man/man9/usbd_get_quirks.9
+OLD_FILES+=usr/share/man/man9/usbd_get_speed.9
+OLD_FILES+=usr/share/man/man9/usbd_get_string.9
+OLD_FILES+=usr/share/man/man9/usbd_get_string_desc.9
+OLD_FILES+=usr/share/man/man9/usbd_get_xfer_status.9
+OLD_FILES+=usr/share/man/man9/usbd_interface2device_handle.9
+OLD_FILES+=usr/share/man/man9/usbd_interface2endpoint_descriptor.9
+OLD_FILES+=usr/share/man/man9/usbd_interface_count.9
+OLD_FILES+=usr/share/man/man9/usbd_open_pipe.9
+OLD_FILES+=usr/share/man/man9/usbd_open_pipe_intr.9
+OLD_FILES+=usr/share/man/man9/usbd_pipe2device_handle.9
+OLD_FILES+=usr/share/man/man9/usbd_set_config_index.9
+OLD_FILES+=usr/share/man/man9/usbd_set_config_no.9
+OLD_FILES+=usr/share/man/man9/usbd_set_interface.9
+OLD_FILES+=usr/share/man/man9/usbd_setup_default_xfer.9
+OLD_FILES+=usr/share/man/man9/usbd_setup_isoc_xfer.9
+OLD_FILES+=usr/share/man/man9/usbd_setup_xfer.9
+OLD_FILES+=usr/share/man/man9/usbd_sync_transfer.9
+OLD_FILES+=usr/share/man/man9/usbd_transfer.9
+OLD_FILES+=usr/share/man/man9/usb_find_desc.9
 # 20090605: removal of clists
 OLD_FILES+=usr/include/sys/clist.h
 # 20090602: removal of window(1)

Modified: head/share/man/man4/usb.4
==============================================================================
--- head/share/man/man4/usb.4	Wed Jun 24 16:57:33 2009	(r194859)
+++ head/share/man/man4/usb.4	Wed Jun 24 17:01:17 2009	(r194860)
@@ -162,548 +162,6 @@ Any interface specific driver can attach
 .It
 If none is found, generic interface class drivers can attach.
 .El
-.Sh USB KERNEL PROGRAMMING
-Here is a list of commonly used functions:
-.Pp
-.
-.Ft "usb2_error_t"
-.Fo "usb2_transfer_setup"
-.Fa "udev"
-.Fa "ifaces"
-.Fa "pxfer"
-.Fa "setup_start"
-.Fa "n_setup"
-.Fa "priv_sc"
-.Fa "priv_mtx"
-.Fc
-.
-.Pp
-.
-.Ft "void"
-.Fo "usb2_transfer_unsetup"
-.Fa "pxfer"
-.Fa "n_setup"
-.Fc
-.
-.Pp
-.
-.Ft "void"
-.Fo "usb2_transfer_start"
-.Fa "xfer"
-.Fc
-.
-.Pp
-.
-.Ft "void"
-.Fo "usb2_transfer_stop"
-.Fa "xfer"
-.Fc
-.
-.Pp
-.
-.Ft "void"
-.Fo "usb2_transfer_drain"
-.Fa "xfer"
-.Fc
-.
-.
-.Sh DESCRIPTION
-The
-.Nm
-module implements the core functionality of the USB standard and many
-helper functions to make USB device driver programming easier and more
-safe.
-.
-The
-.Nm
-module supports both USB Host and USB Device side mode!
-.
-.Sh USB TRANSFER MANAGEMENT FUNCTIONS
-The USB standard defines four types of USB transfers.
-.
-Control transfers, Bulk transfers, Interrupt transfers and Isochronous
-transfers.
-.
-All the transfer types are managed using the following five functions:
-.
-.Pp
-.
-.Fn usb2_transfer_setup
-This function will allocate memory for and initialise an array of USB
-transfers and all required DMA memory.
-.
-This function can sleep or block waiting for resources to become
-available.
-.Fa udev
-is a pointer to "struct usb2_device".
-.Fa ifaces
-is an array of interface index numbers to use. See "if_index".
-.Fa pxfer
-is a pointer to an array of USB transfer pointers that are initialized
-to NULL, and then pointed to allocated USB transfers.
-.Fa setup_start
-is a pointer to an array of USB config structures.
-.Fa n_setup
-is a number telling the USB system how many USB transfers should be
-setup.
-.Fa priv_sc
-is the private softc pointer, which will be used to initialize
-"xfer->priv_sc".
-.Fa priv_mtx
-is the private mutex protecting the transfer structure and the
-softc. This pointer is used to initialize "xfer->priv_mtx".
-This function returns
-zero upon success. A non-zero return value indicates failure.
-.
-.Pp
-.
-.Fn usb2_transfer_unsetup
-This function will release the given USB transfers and all allocated
-resources associated with these USB transfers. 
-.Fa pxfer
-is a pointer to an array of USB transfer pointers, that may be NULL,
-that should be freed by the USB system.
-.Fa n_setup
-is a number telling the USB system how many USB transfers should be
-unsetup.
-.
-This function can sleep waiting for USB transfers to complete.
-.
-This function is NULL safe with regard to the USB transfer structure
-pointer.
-.
-It is not allowed to call this function from the USB transfer
-callback.
-.
-.Pp
-.
-.Fn usb2_transfer_start
-This function will start the USB transfer pointed to by
-.Fa xfer,
-if not already started.
-.
-This function is always non-blocking and must be called with the
-so-called private USB mutex locked.
-.
-This function is NULL safe with regard to the USB transfer structure
-pointer.
-.
-.Pp
-.
-.Fn usb2_transfer_stop
-This function will stop the USB transfer pointed to by
-.Fa xfer,
-if not already stopped.
-.
-This function is always non-blocking and must be called with the
-so-called private USB mutex locked.
-.
-This function can return before the USB callback has been called.
-.
-This function is NULL safe with regard to the USB transfer structure
-pointer.
-.
-If the transfer was in progress, the callback will called with
-"USB_ST_ERROR" and "xfer->error = USB_ERR_CANCELLED".
-.
-.Pp
-.
-.Fn usb2_transfer_drain
-This function will stop an USB transfer, if not already stopped and
-wait for any additional USB hardware operations to complete.
-.
-Buffers that are loaded into DMA using "usb2_set_frame_data()" can
-safely be freed after that this function has returned.
-.
-This function can block the caller and will not return before the USB
-callback has been called.
-.
-This function is NULL safe with regard to the USB transfer structure
-pointer.
-.
-.Sh USB TRANSFER CALLBACK
-.
-The USB callback has three states.
-.
-USB_ST_SETUP, USB_ST_TRANSFERRED and USB_ST_ERROR. USB_ST_SETUP is the
-initial state.
-.
-After the callback has been called with this state it will always be
-called back at a later stage in one of the other two states.
-.
-In the USB_ST_ERROR state the "error" field of the USB transfer
-structure is set to the error cause.
-.
-The USB callback should not restart the USB transfer in case the error
-cause is USB_ERR_CANCELLED.
-.
-The USB callback is protected from recursion.
-.
-That means one can start and stop whatever transfer from the callback
-of another transfer one desires.
-.
-Also the transfer that is currently called back.
-.
-Recursion is handled like this that when the callback that wants to
-recurse returns it is called one more time.
-.
-.
-.Pp
-.
-.Fn usb2_start_hardware
-This function should only be called from within the USB callback and
-is used to start the USB hardware.
-.
-Typical parameters that should be set in the USB transfer structure
-before this function is called are "frlengths[]", "nframes" and
-"frbuffers[]".
-.
-An USB transfer can have multiple frames consisting of one or more USB
-packets making up an I/O vector for all USB transfer types.
-.
-After the USB transfer is complete "frlengths[]" is updated to the
-actual USB transfer length for the given frame.
-.Bd -literal -offset indent
-void
-usb2_default_callback(struct usb2_xfer *xfer)
-{
-	switch (USB_GET_STATE(xfer)) {
-	case USB_ST_SETUP: 
-		/*
-		 * Setup xfer->frlengths[], xfer->nframes
-		 * and write data to xfer->frbuffers[], if any
-		 */
-		usb2_start_hardware(xfer);
-		break;
-
-	case USB_ST_TRANSFERRED: 
-		/* 
-		 * Read	data from xfer->frbuffers[], if any.
-		 * "xfer->frlengths[]" should now have been
-		 * updated to the actual length.
-		 */
-		break;
-
-	default: /* Error */
-		/*
-		 * Print error message and clear stall 
-		 * for example.
-		 */
-		break;
-	}
-	/* 
-	 * Here it is safe to do something without the private 
-	 * USB mutex locked.
-	 */
-	return;
-}
-.Ed
-.
-.Sh USB CONTROL TRANSFERS
-An USB control transfer has three parts.
-.
-First the SETUP packet, then DATA packet(s) and then a STATUS
-packet.
-.
-The SETUP packet is always pointed to by "xfer->frbuffers[0]" and the
-length is stored in "xfer->frlengths[0]" also if there should not be
-sent any SETUP packet! If an USB control transfer has no DATA stage,
-then "xfer->nframes" should be set to 1.
-.
-Else the default value is "xfer->nframes" equal to 2.
-.
-.Bd -literal -offset indent
-
-Example1: SETUP + STATUS
- xfer->nframes = 1;
- xfer->frlenghts[0] = 8;
- usb2_start_hardware(xfer);
-
-Example2: SETUP + DATA + STATUS
- xfer->nframes = 2;
- xfer->frlenghts[0] = 8;
- xfer->frlenghts[1] = 1;
- usb2_start_hardware(xfer);
-
-Example3: SETUP + DATA + STATUS - split
-1st callback:
- xfer->nframes = 1;
- xfer->frlenghts[0] = 8;
- usb2_start_hardware(xfer);
-
-2nd callback:
- /* IMPORTANT: frbuffers[0] must still point at the setup packet! */
- xfer->nframes = 2;
- xfer->frlenghts[0] = 0;
- xfer->frlenghts[1] = 1;
- usb2_start_hardware(xfer);
-
-Example4: SETUP + STATUS - split
-1st callback:
- xfer->nframes = 1;
- xfer->frlenghts[0] = 8;
- xfer->flags.manual_status = 1;
- usb2_start_hardware(xfer);
-
-2nd callback:
- xfer->nframes = 1;
- xfer->frlenghts[0] = 0;
- xfer->flags.manual_status = 0;
- usb2_start_hardware(xfer);
-
-.Ed
-.Sh USB TRANSFER CONFIG
-To simply the search for endpoints the
-.Nm
-module defines a USB config structure where it is possible to specify
-the characteristics of the wanted endpoint.
-.Bd -literal -offset indent
-
-struct usb2_config { 
-	bufsize,
-	callback
-	direction,
-	endpoint,
-	frames,
-	index flags,
-	interval,
-	timeout,
-	type,
-};
-
-.Ed
-.
-.Pp
-.Fa type
-field selects the USB pipe type.
-.
-Valid values are: UE_INTERRUPT, UE_CONTROL, UE_BULK,
-UE_ISOCHRONOUS.
-.
-The special value UE_BULK_INTR will select BULK and INTERRUPT pipes.
-.
-This field is mandatory.
-.
-.Pp
-.Fa endpoint
-field selects the USB endpoint number.
-.
-A value of 0xFF, "-1" or "UE_ADDR_ANY" will select the first matching
-endpoint.
-.
-This field is mandatory.
-.
-.Pp
-.Fa direction
-field selects the USB endpoint direction.
-.
-A value of "UE_DIR_ANY" will select the first matching endpoint.
-.
-Else valid values are: "UE_DIR_IN" and "UE_DIR_OUT".
-.
-"UE_DIR_IN" and "UE_DIR_OUT" can be binary OR'ed by "UE_DIR_SID" which
-means that the direction will be swapped in case of
-USB_MODE_DEVICE.
-.
-Note that "UE_DIR_IN" refers to the data transfer direction of the
-"IN" tokens and "UE_DIR_OUT" refers to the data transfer direction of
-the "OUT" tokens.
-.
-This field is mandatory.
-.
-.Pp
-.Fa interval
-field selects the interrupt interval.
-.
-The value of this field is given in milliseconds and is independent of
-device speed.
-.
-Depending on the endpoint type, this field has different meaning:
-.Bl -tag
-.It UE_INTERRUPT
-"0" use the default interrupt interval based on endpoint descriptor.
-"Else" use the given value for polling rate.
-.It UE_ISOCHRONOUS
-"0" use default. "Else" the value is ignored.
-.It UE_BULK
-.It UE_CONTROL
-"0" no transfer pre-delay. "Else" a delay as given by this field in
-milliseconds is inserted before the hardware is started when
-"usb2_start_hardware()" is called.
-.Pp
-NOTE: The transfer timeout, if any, is started after that the
-pre-delay has elapsed!
-.El
-.
-.Pp
-.Fa timeout
-field, if non-zero, will set the transfer timeout in milliseconds. If
-the "timeout" field is zero and the transfer type is ISOCHRONOUS a
-timeout of 250ms will be used.
-.
-.Pp
-.Fa frames
-field sets the maximum number of frames. If zero is specified it will
-yield the following results:
-.Bl -tag
-.It UE_BULK
-xfer->nframes = 1;
-.It UE_INTERRUPT
-xfer->nframes = 1;
-.It UE_CONTROL
-xfer->nframes = 2;
-.It UE_ISOCHRONOUS
-Not allowed. Will cause an error.
-.El
-.
-.Pp
-.Fa ep_index
-field allows you to give a number, in case more endpoints match the
-description, that selects which matching "ep_index" should be used.
-.
-.Pp
-.Fa if_index
-field allows you to select which of the interface numbers in the
-"ifaces" array parameter passed to "usb2_transfer_setup" that should
-be used when setting up the given USB transfer.
-.
-.Pp
-.Fa flags
-field has type "struct usb2_xfer_flags" and allows one to set initial
-flags an USB transfer. Valid flags are:
-.Bl -tag
-.It force_short_xfer
-This flag forces the last transmitted USB packet to be short.  A short
-packet has a length of less than "xfer->max_packet_size", which
-derives from "wMaxPacketSize". This flag can be changed during
-operation.
-.It short_xfer_ok
-This flag allows the received transfer length, "xfer->actlen" to be
-less than "xfer->sumlen" upon completion of a transfer.  This flag can
-be changed during operation.
-.It short_frames_ok
-This flag allows the reception of multiple short USB frames. This flag
-only has effect for BULK and INTERRUPT endpoints and if the number of
-frames received is greater than 1. This flag can be changed during
-operation.
-.It pipe_bof
-This flag causes a failing USB transfer to remain first in the PIPE
-queue except in the case of "xfer->error" equal to
-"USB_ERR_CANCELLED". No other USB transfers in the affected PIPE queue
-will be started until either:
-.Bl -tag
-.It 1
-The failing USB transfer is stopped using "usb2_transfer_stop()".
-.It 2
-The failing USB transfer performs a successful transfer.
-.El
-The purpose of this flag is to avoid races when multiple transfers are
-queued for execution on an USB endpoint, and the first executing
-transfer fails leading to the need for clearing of stall for
-example.
-.
-In this case this flag is used to prevent the following USB transfers
-from being executed at the same time the clear-stall command is
-executed on the USB control endpoint.
-.
-This flag can be changed during operation.
-.Pp
-"BOF" is short for "Block On Failure"
-.Pp
-NOTE: This flag should be set on all BULK and INTERRUPT USB transfers
-which use an endpoint that can be shared between userland and kernel.
-.
-.
-.It proxy_buffer
-Setting this flag will cause that the total buffer size will be
-rounded up to the nearest atomic hardware transfer size.
-.
-The maximum data length of any USB transfer is always stored in the
-"xfer->max_data_length".
-.
-For control transfers the USB kernel will allocate additional space
-for the 8-bytes of SETUP header.
-.
-These 8-bytes are not counted by the "xfer->max_data_length"
-variable.
-.
-This flag can not be changed during operation.
-.
-.
-.It ext_buffer
-Setting this flag will cause that no data buffer will be
-allocated.
-.
-Instead the USB client must supply a data buffer.
-.
-This flag can not be changed during operation.
-.
-.
-.It manual_status
-Setting this flag prevents an USB STATUS stage to be appended to the
-end of the USB control transfer.
-.
-If no control data is transferred this flag must be cleared.
-.
-Else an error will be returned to the USB callback.
-.
-This flag is mostly useful for the USB device side.
-.
-This flag can be changed during operation.
-.
-.
-.It no_pipe_ok
-Setting this flag causes the USB_ERR_NO_PIPE error to be ignored. This
-flag can not be changed during operation.
-.
-.
-.It stall_pipe
-.Bl -tag
-.It Device Side Mode
-Setting this flag will cause STALL pids to be sent to the endpoint
-belonging to this transfer before the transfer is started.
-.
-The transfer is started at the moment the host issues a clear-stall
-command on the STALL'ed endpoint.
-.
-This flag can be changed during operation.
-.It Host Side Mode
-Setting this flag will cause a clear-stall control request to be
-executed on the endpoint before the USB transfer is started.
-.El
-.Pp
-If this flag is changed outside the USB callback function you have to
-use the "usb2_transfer_set_stall()" and "usb2_transfer_clear_stall()"
-functions! This flag is automatically cleared after that the stall or
-clear stall has been executed.
-.
-.El
-.Pp
-.Fa bufsize
-field sets the total buffer size in bytes.
-.
-If this field is zero, "wMaxPacketSize" will be used, multiplied by
-the "frames" field if the transfer type is ISOCHRONOUS.
-.
-This is useful for setting up interrupt pipes.
-.
-This field is mandatory.
-.Pp
-NOTE: For control transfers "bufsize" includes the length of the
-request structure.
-.
-.Pp
-.Fa callback
-pointer sets the USB callback. This field is mandatory.
-.
-.
-.Sh USB LINUX COMPAT LAYER
-The
-.Nm
-module supports the Linux USB API.
-.
-.
-.
 .Sh SEE ALSO
 The
 .Tn USB
@@ -712,6 +170,7 @@ specifications can be found at:
 .D1 Pa http://www.usb.org/developers/docs/
 .Pp
 .Xr libusb 3 ,
+.Xr usbdi 4 ,
 .Xr aue 4 ,
 .Xr axe 4 ,
 .Xr cue 4 ,

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Wed Jun 24 16:57:33 2009	(r194859)
+++ head/share/man/man9/Makefile	Wed Jun 24 17:01:17 2009	(r194860)
@@ -1210,55 +1210,58 @@ MLINKS+=uidinfo.9 uifind.9 \
 	uidinfo.9 uihashinit.9 \
 	uidinfo.9 uihold.9
 MLINKS+=uio.9 uiomove.9
-MLINKS+=usbdi.9 usbd_abort_default_pipe.9 \
-	usbdi.9 usbd_abort_pipe.9 \
-	usbdi.9 usbd_alloc_buffer.9 \
-	usbdi.9 usbd_alloc_xfer.9 \
-	usbdi.9 usbd_clear_endpoint_stall.9 \
-	usbdi.9 usbd_clear_endpoint_stall_async.9 \
-	usbdi.9 usbd_clear_endpoint_toggle.9 \
-	usbdi.9 usbd_close_pipe.9 \
-	usbdi.9 usbd_device2interface_handle.9 \
+MLINKS+=usbdi.9 usb_fifo_alloc_buffer.9 \
+	usbdi.9 usb_fifo_attach.9 \
+	usbdi.9 usb_fifo_detach.9 \
+	usbdi.9 usb_fifo_free_buffer.9 \
+	usbdi.9 usb_fifo_get_data.9 \
+	usbdi.9 usb_fifo_get_data_buffer.9 \
+	usbdi.9 usb_fifo_get_data_error.9 \
+	usbdi.9 usb_fifo_get_data_linear.9 \
+	usbdi.9 usb_fifo_put_bytes_max.9 \
+	usbdi.9 usb_fifo_put_data.9 \
+	usbdi.9 usb_fifo_put_data_buffer.9 \
+	usbdi.9 usb_fifo_put_data_error.9 \
+	usbdi.9 usb_fifo_put_data_linear.9 \
+	usbdi.9 usb_fifo_reset.9 \
+	usbdi.9 usb_fifo_softc.9 \
+	usbdi.9 usb_fifo_wakeup.9 \
 	usbdi.9 usbd_do_request.9 \
-	usbdi.9 usbd_do_request_async.9 \
 	usbdi.9 usbd_do_request_flags.9 \
-	usbdi.9 usbd_do_request_flags_pipe.9 \
-	usbdi.9 usbd_endpoint_count.9 \
 	usbdi.9 usbd_errstr.9 \
-	usbdi.9 usbd_find_edesc.9 \
-	usbdi.9 usbd_find_idesc.9 \
-	usbdi.9 usbd_free_buffer.9 \
-	usbdi.9 usbd_free_xfer.9 \
-	usbdi.9 usbd_get_buffer.9 \
-	usbdi.9 usbd_get_config.9 \
-	usbdi.9 usbd_get_config_desc.9 \
-	usbdi.9 usbd_get_config_desc_full.9 \
-	usbdi.9 usbd_get_config_descriptor.9 \
-	usbdi.9 usbd_get_device_descriptor.9 \
-	usbdi.9 usbd_get_endpoint_descriptor.9 \
-	usbdi.9 usbd_get_interface_altindex.9 \
-	usbdi.9 usbd_get_interface_descriptor.9 \
-	usbdi.9 usbd_get_no_alts.9 \
-	usbdi.9 usbd_get_quirks.9 \
-	usbdi.9 usbd_get_speed.9 \
-	usbdi.9 usbd_get_string.9 \
-	usbdi.9 usbd_get_string_desc.9 \
-	usbdi.9 usbd_get_xfer_status.9 \
-	usbdi.9 usbd_interface2device_handle.9 \
-	usbdi.9 usbd_interface2endpoint_descriptor.9 \
-	usbdi.9 usbd_interface_count.9 \
-	usbdi.9 usbd_open_pipe.9 \
-	usbdi.9 usbd_open_pipe_intr.9 \
-	usbdi.9 usbd_pipe2device_handle.9 \
-	usbdi.9 usbd_set_config_index.9 \
-	usbdi.9 usbd_set_config_no.9 \
-	usbdi.9 usbd_set_interface.9 \
-	usbdi.9 usbd_setup_default_xfer.9 \
-	usbdi.9 usbd_setup_isoc_xfer.9 \
-	usbdi.9 usbd_setup_xfer.9 \
-	usbdi.9 usbd_sync_transfer.9 \
-	usbdi.9 usbd_transfer.9 \
-	usbdi.9 usb_find_desc.9
+	usbdi.9 usbd_lookup_id_by_info.9 \
+	usbdi.9 usbd_lookup_id_by_uaa.9 \
+	usbdi.9 usbd_transfer_clear_stall.9 \
+	usbdi.9 usbd_transfer_drain.9 \
+	usbdi.9 usbd_transfer_pending.9 \
+	usbdi.9 usbd_transfer_poll.9 \
+	usbdi.9 usbd_transfer_setup.9 \
+	usbdi.9 usbd_transfer_start.9 \
+	usbdi.9 usbd_transfer_stop.9 \
+	usbdi.9 usbd_transfer_submit.9 \
+	usbdi.9 usbd_transfer_unsetup.9 \
+	usbdi.9 usbd_xfer_clr_flag.9 \
+	usbdi.9 usbd_xfer_frame_data.9 \
+	usbdi.9 usbd_xfer_frame_len.9 \
+	usbdi.9 usbd_xfer_get_frame.9 \
+	usbdi.9 usbd_xfer_get_priv.9 \
+	usbdi.9 usbd_xfer_is_stalled.9 \
+	usbdi.9 usbd_xfer_max_framelen.9 \
+	usbdi.9 usbd_xfer_max_frames.9 \
+	usbdi.9 usbd_xfer_max_len.9 \
+	usbdi.9 usbd_xfer_set_flag.9 \
+	usbdi.9 usbd_xfer_set_frame_data.9 \
+	usbdi.9 usbd_xfer_set_frame_len.9 \
+	usbdi.9 usbd_xfer_set_frame_offset.9 \
+	usbdi.9 usbd_xfer_set_frames.9 \
+	usbdi.9 usbd_xfer_set_interval.9 \
+	usbdi.9 usbd_xfer_set_priv.9 \
+	usbdi.9 usbd_xfer_set_stall.9 \
+	usbdi.9 usbd_xfer_set_timeout.9 \
+	usbdi.9 usbd_xfer_softc.9 \
+	usbdi.9 usbd_xfer_state.9 \
+	usbdi.9 usbd_xfer_state.9 \
+	usbdi.9 usbd_xfer_status.9
 MLINKS+=vcount.9 count_dev.9
 MLINKS+=vfsconf.9 vfs_modevent.9 \
 	vfsconf.9 vfs_register.9 \

Modified: head/share/man/man9/usbdi.9
==============================================================================
--- head/share/man/man9/usbdi.9	Wed Jun 24 16:57:33 2009	(r194859)
+++ head/share/man/man9/usbdi.9	Wed Jun 24 17:01:17 2009	(r194860)
@@ -24,1230 +24,615 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	$FreeBSD$
-.Dd December 30, 2005
+.Dd June 24, 2009
 .Os
 .Dt USBDI 9
 .Sh NAME
-.Nm usb_detach_wait ,
-.Nm usb_detach_wakeup ,
-.Nm usb_find_desc ,
-.Nm usbd_abort_default_pipe ,
-.Nm usbd_abort_pipe ,
-.Nm usbd_alloc_buffer ,
-.Nm usbd_alloc_xfer ,
-.Nm usbd_bulk_transfer ,
-.Nm usbd_clear_endpoint_stall ,
-.Nm usbd_clear_endpoint_stall_async ,
-.Nm usbd_clear_endpoint_toggle ,
-.Nm usbd_close_pipe ,
-.Nm usbd_device2interface_handle ,
-.Nm usbd_devinfo ,
+.Nm usb_fifo_alloc_buffer ,
+.Nm usb_fifo_attach ,
+.Nm usb_fifo_detach ,
+.Nm usb_fifo_free_buffer ,
+.Nm usb_fifo_get_data ,
+.Nm usb_fifo_get_data_buffer ,
+.Nm usb_fifo_get_data_error ,
+.Nm usb_fifo_get_data_linear ,
+.Nm usb_fifo_put_bytes_max ,
+.Nm usb_fifo_put_data ,
+.Nm usb_fifo_put_data_buffer ,
+.Nm usb_fifo_put_data_error ,
+.Nm usb_fifo_put_data_linear ,
+.Nm usb_fifo_reset ,
+.Nm usb_fifo_softc ,
+.Nm usb_fifo_wakeup ,
 .Nm usbd_do_request ,
-.Nm usbd_do_request_async ,
 .Nm usbd_do_request_flags ,
-.Nm usbd_do_request_flags_pipe ,
-.Nm usbd_dopoll ,
-.Nm usbd_endpoint_count ,
 .Nm usbd_errstr ,
-.Nm usbd_fill_deviceinfo ,
-.Nm usbd_find_edesc ,
-.Nm usbd_find_idesc ,
-.Nm usbd_free_buffer ,
-.Nm usbd_free_xfer ,
-.Nm usbd_get_buffer ,
-.Nm usbd_get_config ,
-.Nm usbd_get_config_desc ,
-.Nm usbd_get_config_desc_full ,
-.Nm usbd_get_config_descriptor ,
-.Nm usbd_get_device_descriptor ,
-.Nm usbd_get_endpoint_descriptor ,
-.Nm usbd_get_interface_altindex ,
-.Nm usbd_get_interface_descriptor ,
-.Nm usbd_get_no_alts ,
-.Nm usbd_get_quirks ,
-.Nm usbd_get_speed ,
-.Nm usbd_get_string ,
-.Nm usbd_get_string_desc ,
-.Nm usbd_get_xfer_status ,
-.Nm usbd_interface2device_handle ,
-.Nm usbd_interface2endpoint_descriptor ,
-.Nm usbd_interface_count ,
-.Nm usbd_intr_transfer ,
-.Nm usbd_open_pipe ,
-.Nm usbd_open_pipe_intr ,
-.Nm usbd_pipe2device_handle ,
-.Nm usbd_ratecheck ,
-.Nm usbd_set_config_index ,
-.Nm usbd_set_config_no ,
-.Nm usbd_set_interface ,
-.Nm usbd_set_polling ,
-.Nm usbd_setup_default_xfer ,
-.Nm usbd_setup_isoc_xfer ,
-.Nm usbd_setup_xfer ,
-.Nm usbd_sync_transfer ,
-.Nm usbd_transfer
+.Nm usbd_lookup_id_by_info ,
+.Nm usbd_lookup_id_by_uaa ,
+.Nm usbd_transfer_clear_stall ,
+.Nm usbd_transfer_drain ,
+.Nm usbd_transfer_pending ,
+.Nm usbd_transfer_poll ,
+.Nm usbd_transfer_setup ,
+.Nm usbd_transfer_start ,
+.Nm usbd_transfer_stop ,
+.Nm usbd_transfer_submit ,
+.Nm usbd_transfer_unsetup ,
+.Nm usbd_xfer_clr_flag ,
+.Nm usbd_xfer_frame_data ,
+.Nm usbd_xfer_frame_len ,
+.Nm usbd_xfer_get_frame ,
+.Nm usbd_xfer_get_priv ,
+.Nm usbd_xfer_is_stalled ,
+.Nm usbd_xfer_max_framelen ,
+.Nm usbd_xfer_max_frames ,
+.Nm usbd_xfer_max_len ,
+.Nm usbd_xfer_set_flag ,
+.Nm usbd_xfer_set_frame_data ,
+.Nm usbd_xfer_set_frame_len ,
+.Nm usbd_xfer_set_frame_offset ,
+.Nm usbd_xfer_set_frames ,
+.Nm usbd_xfer_set_interval ,
+.Nm usbd_xfer_set_priv ,
+.Nm usbd_xfer_set_stall ,
+.Nm usbd_xfer_set_timeout ,
+.Nm usbd_xfer_softc ,
+.Nm usbd_xfer_state ,
+.Nm usbd_xfer_state ,
+.Nm usbd_xfer_status
 .Nd Universal Serial Bus driver programming interface
 .Sh SYNOPSIS
 .In dev/usb/usb.h
 .In dev/usb/usbdi.h
 .In dev/usb/usbdi_util.h
-.Pp
-.Ft void
-.Fn usb_detach_wait "device_ptr_t dv"
-.Ft void
-.Fn usb_detach_wakeup "device_ptr_t dv"
-.Ft "const usb_descriptor_t *"
-.Fn usb_find_desc "usbd_device_handle dev" "int type" "int subtype"
-.Ft usbd_status
-.Fn usbd_abort_default_pipe "usbd_device_handle dev"
-.Ft usbd_status
-.Fn usbd_abort_pipe "usbd_pipe_handle pipe"
-.Ft "void *"
-.Fn usbd_alloc_buffer "usbd_xfer_handle xfer" "u_int32_t size"
-.Ft usbd_xfer_handle
-.Fn usbd_alloc_xfer "usbd_device_handle dev"
-.Ft usbd_status
-.Fo usbd_bulk_transfer
-.Fa "usbd_xfer_handle xfer"
-.Fa "usbd_pipe_handle pipe"
-.Fa "u_int16_t flags"
-.Fa "u_int32_t timeout"
-.Fa "void *buf"
-.Fa "u_int32_t *size"
-.Fa "char *lbl"
-.Fc
-.Ft usbd_status
-.Fn usbd_clear_endpoint_stall "usbd_pipe_handle pipe"
-.Ft usbd_status
-.Fn usbd_clear_endpoint_stall_async "usbd_pipe_handle"
-.Ft void
-.Fn usbd_clear_endpoint_toggle "usbd_pipe_handle pipe"
-.Ft usbd_status
-.Fn usbd_close_pipe "usbd_pipe_handle pipe"
-.Ft usbd_status
-.Fo usbd_device2interface_handle
-.Fa "usbd_device_handle dev"
-.Fa "u_int8_t ifaceno"
-.Fa "usbd_interface_handle *iface"
-.Fc
-.Ft void
-.Fn usbd_devinfo "usbd_device_handle dev" "int showclass" "char *cp"
-.Ft usbd_status
-.Fo usbd_do_request
-.Fa "usbd_device_handle dev"
-.Fa "usb_device_request_t *req"
-.Fa "void *data"
-.Fc
-.Ft usbd_status
-.Fo usbd_do_request_async
-.Fa "usbd_device_handle dev"
-.Fa "usb_device_request_t *req"
-.Fa "void *data"
-.Fc
-.Ft usbd_status
-.Fo usbd_do_request_flags
-.Fa "usbd_device_handle dev"
-.Fa "usb_device_request_t *req"
-.Fa "void *data"
-.Fa "u_int16_t flags"
-.Fa "int *actlen"
-.Fa "u_int32_t timo"
-.Fc
-.Ft usbd_status
-.Fo usbd_do_request_flags_pipe
-.Fa "usbd_device_handle dev"
-.Fa "usbd_pipe_handle pipe"
-.Fa "usb_device_request_t *req"
-.Fa "void *data"
-.Fa "u_int16_t flags"
-.Fa "int *actlen"
-.Fa "u_int32_t timeout"
-.Fc
-.Ft void
-.Fn usbd_dopoll "usbd_interface_handle iface"
-.Ft usbd_status
-.Fn usbd_endpoint_count "usbd_interface_handle iface" "u_int8_t *count"
-.Ft "const char *"
-.Fn usbd_errstr "usbd_status err"
-.Ft void
-.Fo usbd_fill_deviceinfo
-.Fa "usbd_device_handle dev"
-.Fa "struct usb_device_info *di"
-.Fa "int usedev"
-.Fc
-.Ft "usb_endpoint_descriptor_t *"
-.Fo usbd_find_edesc
-.Fa "usb_config_descriptor_t *cd"
-.Fa "int ifaceidx"
-.Fa "int altidx"
-.Fa "int endptidx"
-.Fc
-.Ft "usb_interface_descriptor_t *"
-.Fn usbd_find_idesc "usb_config_descriptor_t *cd" "int ifaceidx" "int altidx"
-.Ft void
-.Fn usbd_free_buffer "usbd_xfer_handle xfer"
-.Ft usbd_status
-.Fn usbd_free_xfer "usbd_xfer_handle xfer"
-.Ft "void *"
-.Fn usbd_get_buffer "usbd_xfer_handle xfer"
-.Ft usbd_status
-.Fn usbd_get_config "usbd_device_handle dev" "u_int8_t *conf"
-.Ft usbd_status
-.Fo usbd_get_config_desc
-.Fa "usbd_device_handle dev"
-.Fa "int confidx"
-.Fa "usb_config_descriptor_t *d"
-.Fc
-.Ft usbd_status
-.Fo usbd_get_config_desc_full
-.Fa "usbd_device_handle dev"
-.Fa "int conf"
-.Fa "void *d"
-.Fa "int size"
-.Fc
-.Ft "usb_config_descriptor_t *"
-.Fn usbd_get_config_descriptor "usbd_device_handle dev"
-.Ft "usb_device_descriptor_t *"
-.Fn usbd_get_device_descriptor "usbd_device_handle dev"
-.Ft "usb_endpoint_descriptor_t *"
-.Fo usbd_get_endpoint_descriptor
-.Fa "usbd_interface_handle iface"
-.Fa "u_int8_t address"
-.Fc
-.Ft int
-.Fn usbd_get_interface_altindex "usbd_interface_handle iface"
-.Ft "usb_interface_descriptor_t *"
-.Fn usbd_get_interface_descriptor "usbd_interface_handle iface"
-.Ft int
-.Fn usbd_get_no_alts "usb_config_descriptor_t *cdesc" "int ifaceno"
-.Ft "const struct usbd_quirks *"
-.Fn usbd_get_quirks "usbd_device_handle dev"
-.Ft int
-.Fn usbd_get_speed "usbd_device_handle dev"
-.Ft usbd_status
-.Fn usbd_get_string "usbd_device_handle dev" "int si" "char *buf"
-.Ft usbd_status
-.Fo usbd_get_string_desc
-.Fa "usbd_device_handle dev"
-.Fa "int sindex"
-.Fa "int langid"
-.Fa "usb_string_descriptor_t *sdesc"
-.Fa "int *sizep"
-.Fc
-.Ft void
-.Fo usbd_get_xfer_status
-.Fa "usbd_xfer_handle xfer"
-.Fa "usbd_private_handle *priv"
-.Fa "void **buffer"
-.Fa "u_int32_t *count"
-.Fa "usbd_status *status"
-.Fc
-.Ft void
-.Fo usbd_interface2device_handle
-.Fa "usbd_interface_handle iface"
-.Fa "usbd_device_handle *dev"

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


More information about the svn-src-all mailing list