diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
commit | 8cb9f5acecaded019a9a55454a31dcf4328d0d1b (patch) | |
tree | 7c69e28b9b9b5ac2d9f928324a663becf2efa2d7 /usr/src/man/man9f/usb_pipe_xopen.9f | |
parent | 3a5445f1b9d90e4f1538503bd60913c8f302c17f (diff) | |
parent | 79809f9cf402f130667349b2d4007ecd65d63c6f (diff) | |
download | illumos-joyent-release-20170608.tar.gz |
[illumos-gate merge]release-20170608
commit 79809f9cf402f130667349b2d4007ecd65d63c6f
8269 dtrace stddev aggregation is normalized incorrectly
commit 22c8b9583d07895c16549075a53668d7bc988cf3
8108 zdb -l fails to read labels 2 and 3
commit 0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16
8056 zfs send size estimate is inaccurate for some zvols
commit dbfd9f930004c390a2ce2cf850c71b4f880eef9c
8156 dbuf_evict_notify() does not need dbuf_evict_lock
commit 690031d326342fa4ea28b5e80f1ad6a16281519d
8168 NULL pointer dereference in zfs_create()
commit 7c4ab494ff60bbbcc0889e71388ae63e903bbf57
8276 rpcbind leaks memory due to libumem per thread caching.
commit f176a0a4cd61cbd708a7f25dc30d221f4d5902ba
8270 dnlc_reverse_lookup() is unsafe at any speed
commit 72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2
8300 fix man page issues found by mandoc 1.14.1
commit cb4d790db8fe85bce9f9647fe4e1bdc274c7af1c
8337 gss: misleading-indentation
commit f53522305c07915a44e86f2455cc62e7aac27037
8324 more: misleading-indentation
Conflicts:
usr/src/uts/common/fs/lookup.c
usr/src/man/man3c/thrd_equal.3c
Diffstat (limited to 'usr/src/man/man9f/usb_pipe_xopen.9f')
-rw-r--r-- | usr/src/man/man9f/usb_pipe_xopen.9f | 134 |
1 files changed, 75 insertions, 59 deletions
diff --git a/usr/src/man/man9f/usb_pipe_xopen.9f b/usr/src/man/man9f/usb_pipe_xopen.9f index b9a2406252..4d403a786e 100644 --- a/usr/src/man/man9f/usb_pipe_xopen.9f +++ b/usr/src/man/man9f/usb_pipe_xopen.9f @@ -48,13 +48,15 @@ Pointer to provides hints on pipe usage. .It Fa flags .Sy USB_FLAGS_SLEEP -is only flag that is recognized. Wait for memory resources if -not immediately available. +is only flag that is recognized. +Wait for memory resources if not immediately available. .It Fa pipe_handle -Address to where new pipe handle is returned. (The handle is opaque.) +Address to where new pipe handle is returned. +(The handle is opaque.) .El .Sh DESCRIPTION -A pipe is a logical connection to an endpoint on a USB device. The +A pipe is a logical connection to an endpoint on a USB device. +The .Fn usb_pipe_xopen function creates such a logical connection and returns an initialized handle which refers to that connection. @@ -62,26 +64,34 @@ initialized handle which refers to that connection. The .Em USB 3.0 specification defines four endpoint types, each with a -corresponding type of pipe. Each of the four types of pipes uses its physical -connection resource differently. They are: +corresponding type of pipe. +Each of the four types of pipes uses its physical connection resource +differently. +They are: .Bl -tag -width Sy .It Sy Control Pipe Used for bursty, non-periodic, reliable, host-initiated request/response -communication, such as for command/status operations. These are guaranteed to -get approximately 10% of frame time and will get more if needed and if -available, but there is no guarantee on transfer promptness. Bidirectional. +communication, such as for command/status operations. +These are guaranteed to get approximately 10% of frame time and will get more if +needed and if available, but there is no guarantee on transfer promptness. +Bidirectional. .It Sy Bulk Pipe -Used for large, reliable, non-time-critical data transfers. These get the bus -on a bandwidth-available basis. Unidirectional. Sample uses include printer -data. +Used for large, reliable, non-time-critical data transfers. +These get the bus on a bandwidth-available basis. +Unidirectional. +Sample uses include printer data. .It Sy Interrupt Pipe Used for sending or receiving small amounts of reliable data infrequently but -with bounded service periods, as for interrupt handling. Unidirectional. +with bounded service periods, as for interrupt handling. +Unidirectional. .It Sy Isochronous Pipe -Used for large, unreliable, time-critical data transfers. Boasts a guaranteed -constant data rate as long as there is data, but there are no retries of failed -transfers. Interrupt and isochronous data are together guaranteed 90% of frame -time as needed. Unidirectional. Sample uses include audio. +Used for large, unreliable, time-critical data transfers. +Boasts a guaranteed constant data rate as long as there is data, but there are +no retries of failed transfers. +Interrupt and isochronous data are together guaranteed 90% of frame time as +needed. +Unidirectional. +Sample uses include audio. .El .Pp The type of endpoint to which a pipe connects (and therefore the pipe type) is @@ -97,26 +107,28 @@ Prior to the .Em USB 3.0 specification, only the .Xr usb_ep_descr 9S -was required to identify all of the attributes of a given pipe. Starting -with +was required to identify all of the attributes of a given pipe. +Starting with .Em USB 3.0 there are additional endpoint companion descriptors required to open a -pipe. To support SuperSpeed devices, the new +pipe. +To support SuperSpeed devices, the new .Fn usb_pipe_xopen function must be used rather than the older .Fn usb_pipe_open -function. The +function. +The .Xr usb_ep_xdescr 9S structure can be automatically filled out and obtained by calling the .Xr usb_ep_xdescr_fill 9F function. .Pp -Opens to interrupt and isochronous pipes can fail -if the required bandwidth cannot be guaranteed. +Opens to interrupt and isochronous pipes can fail if the required bandwidth +cannot be guaranteed. .Pp The polling interval for periodic (interrupt or isochronous) pipes, carried by -the endpoint argument's bInterval field, must be within range. Valid ranges -are: +the endpoint argument's bInterval field, must be within range. +Valid ranges are: .Pp Full speed: range of 1-255 maps to 1-255 ms. .Pp @@ -127,11 +139,11 @@ High speed: range of 1-16 maps to (2**(bInterval-1)) * 125us. Super speed: range of 1-16 maps to (2**(bInterval-1)) * 125us. .Pp Adequate bandwidth during transfers is guaranteed for all periodic pipes which -are opened successfully. Interrupt and isochronous pipes have guaranteed -latency times, so bandwidth for them is allocated when they are opened. +are opened successfully. +Interrupt and isochronous pipes have guaranteed latency times, so bandwidth for +them is allocated when they are opened. .Po -Please -refer to Sections +Please refer to Sections .Em 4.4.7 and .Em 4.4.8 @@ -141,21 +153,21 @@ specification which address isochronous and interrupt transfers. .Pc Opens of interrupt and isochronous pipes fail if inadequate bandwidth is -available to support their guaranteed latency time. Because periodic -pipe bandwidth is allocated on pipe open, open periodic pipes only when -needed. +available to support their guaranteed latency time. +Because periodic pipe bandwidth is allocated on pipe open, open periodic pipes +only when needed. .Pp The bandwidth required by a device varies based on polling interval, the maximum packet size .Pq Sy wMaxPacketSize -and the device speed. Unallocated -bandwidth remaining for new devices depends on the bandwidth already allocated -for previously opened periodic pipes. +and the device speed. +Unallocated bandwidth remaining for new devices depends on the bandwidth already +allocated for previously opened periodic pipes. .Pp The .Em pipe_policy -parameter provides a hint as to pipe usage and must be -specified. It is a +parameter provides a hint as to pipe usage and must be specified. +It is a .Em usb_pipe_policy_t which contains the following fields: .Bd -literal -offset indent @@ -166,10 +178,10 @@ The .Sy pp_max_async_reqs member is a hint indicating how many asynchronous operations requiring their own kernel thread will be concurrently in progress, the highest -number of threads ever needed at one time. Allow at least one for -synchronous callback handling and as many as are needed to accommodate -the anticipated parallelism of asynchronous* calls to the following -functions: +number of threads ever needed at one time. +Allow at least one for synchronous callback handling and as many as are needed +to accommodate the anticipated parallelism of asynchronous* calls to the +following functions: .Xr usb_pipe_close 9F , .Xr usb_set_cfg 9F , .Xr usb_set_alt_if 9F , @@ -180,30 +192,31 @@ functions: and .Xr usb_pipe_stop_isoc_polling 9F . .Pp -Setting to too small a value can deadlock the pipe. Asynchronous calls -are calls made without the +Setting to too small a value can deadlock the pipe. +Asynchronous calls are calls made without the .Sy USB_FLAGS_SLEEP -flag being passed. Note that -a large number of callbacks becomes an issue mainly when blocking +flag being passed. +Note that a large number of callbacks becomes an issue mainly when blocking functions are called from callback handlers. .Pp The control pipe to the default endpoints (endpoints for both directions with addr 0, sometimes called the default control pipe or default pipe) comes -pre-opened by the hub. A client driver receives the default control pipe handle -through +pre-opened by the hub. +A client driver receives the default control pipe handle through .Xr usb_get_dev_data 9F . A client driver cannot open the default -control pipe manually. Note that the same control pipe may be shared among -several drivers when a device has multiple interfaces and each interface is -operated by its own driver. +control pipe manually. +Note that the same control pipe may be shared among several drivers when a +device has multiple interfaces and each interface is operated by its own driver. .Pp All explicit pipe opens are exclusive; attempts to open an opened pipe fail. .Pp On success, the pipe_handle argument points to an opaque handle of the opened -pipe. On failure, it is set to NULL. +pipe. +On failure, it is set to NULL. .Sh CONTEXT -May be called from user or kernel context regardless of arguments. May also be -called from interrupt context if the +May be called from user or kernel context regardless of arguments. +May also be called from interrupt context if the .Sy USB_FLAGS_SLEEP option is not set. .Sh RETURN VALUES @@ -213,22 +226,25 @@ Open succeeded. .It Sy USB_NO_RESOURCES Insufficient resources were available. .It Sy USB_NO_BANDWIDTH -Insufficient bandwidth available. (isochronous and interrupt pipes). +Insufficient bandwidth available. +(isochronous and interrupt pipes). .It Sy USB_INVALID_CONTEXT Called from interrupt handler with USB_FLAGS_SLEEP set. .It Sy USB_INVALID_ARGS -dip and/or pipe_handle is NULL. Pipe_policy is NULL. +dip and/or pipe_handle is NULL. +Pipe_policy is NULL. .It Sy USB_INVALID_PERM -Endpoint is NULL, signifying the default control pipe. A client driver cannot -open the default control pipe. +Endpoint is NULL, signifying the default control pipe. +A client driver cannot open the default control pipe. .It Sy USB_NOT_SUPPORTED Isochronous or interrupt endpoint with maximum packet size of zero is not supported. .It Sy USB_HC_HARDWARE_ERROR Host controller is in an error state. .It Sy USB_FAILURE -Pipe is already open. Host controller not in an operational state. Polling -interval +Pipe is already open. +Host controller not in an operational state. +Polling interval .Pq Sy Bep_descr bInterval No field is out of range (intr or isoc pipes). .Pp |