Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_sg_wait(9) [centos man page]

USB_SG_WAIT(9)							   USB Core APIs						    USB_SG_WAIT(9)

usb_sg_wait - synchronously execute scatter/gather request SYNOPSIS
void usb_sg_wait(struct usb_sg_request * io); ARGUMENTS
io request block handle, as initialized with usb_sg_init. some fields become accessible when this call returns. CONTEXT
!in_interrupt () DESCRIPTION
This function blocks until the specified I/O operation completes. It leverages the grouping of the related I/O requests to get good transfer rates, by queueing the requests. At higher speeds, such queuing can significantly improve USB throughput. There are three kinds of completion for this function. (1) success, where io->status is zero. The number of io->bytes transferred is as requested. (2) error, where io->status is a negative errno value. The number of io->bytes transferred before the error is usually less than requested, and can be nonzero. (3) cancellation, a type of error with status -ECONNRESET that is initiated by usb_sg_cancel. When this function returns, all memory allocated through usb_sg_init or this call will have been freed. The request block parameter may still be passed to usb_sg_cancel, or it may be freed. It could also be reinitialized and then reused. DATA TRANSFER RATES
Bulk transfers are valid for full or high speed endpoints. The best full speed data rate is 19 packets of 64 bytes each per frame, or 1216 bytes per millisecond. The best high speed data rate is 13 packets of 512 bytes each per microframe, or 52 KBytes per millisecond. The reason to use interrupt transfers through this API would most likely be to reserve high speed bandwidth, where up to 24 KBytes per millisecond could be transferred. That capability is less useful for low or full speed interrupt endpoints, which allow at most one packet per millisecond, of at most 8 or 64 bytes (respectively). It is not necessary to call this function to reserve bandwidth for devices under an xHCI host controller, as the bandwidth is reserved when the configuration or interface alt setting is selected. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_SG_WAIT(9)

Check Out this Related Man Page

USB_SG_INIT(9)							   USB Core APIs						    USB_SG_INIT(9)

usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request SYNOPSIS
int usb_sg_init(struct usb_sg_request * io, struct usb_device * dev, unsigned pipe, unsigned period, struct scatterlist * sg, int nents, size_t length, gfp_t mem_flags); ARGUMENTS
io request block being initialized. until usb_sg_wait returns, treat this as a pointer to an opaque block of memory, dev the usb device that will send or receive the data pipe endpoint "pipe" used to transfer the data period polling rate for interrupt endpoints, in frames or (for high speed endpoints) microframes; ignored for bulk sg scatterlist entries nents how many entries in the scatterlist length how many bytes to send from the scatterlist, or zero to send every byte identified in the list. mem_flags SLAB_* flags affecting memory allocations in this call DESCRIPTION
Returns zero for success, else a negative errno value. This initializes a scatter/gather request, allocating resources such as I/O mappings and urb memory (except maybe memory used by USB controller drivers). The request must be issued using usb_sg_wait, which waits for the I/O to complete (or to be canceled) and then cleans up all resources allocated by usb_sg_init. The request may be canceled with usb_sg_cancel, either before or after usb_sg_wait is called. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 USB_SG_INIT(9)
Man Page

4 More Discussions You Might Find Interesting

1. IP Networking

How to improve throughput?

I have a 10Gbps network link connecting two machines A and B. I want to transfer 20GB data from A to B using TCP. With default setting, I can use 50% bandwidth. How to improve the throughput? Is there any way to make throughput as close to 10Gbps as possible? thanks~ :) (3 Replies)
Discussion started by: andrewust
3 Replies

2. Shell Programming and Scripting

[grep] how to grep a sentence which has quotation marks "sentence"

I would like to check with grep in this configuration file: { "alt-speed-down": 200, "alt-speed-enabled": true, "alt-speed-time-begin": 1140, "alt-speed-time-day": 127, "...something..." : true, ... } "alt-speed-enabled" (the third line of the file) is setted to... (2 Replies)
Discussion started by: ciro314
2 Replies

3. UNIX for Dummies Questions & Answers

Find the file which is growing at high speed

Hi, A log file which is growing at high speed, don't know the name of it. How to find the respective file? Many thanks. (2 Replies)
Discussion started by: venkatesht
2 Replies

4. War Stories

Right On Time, Somewhere

Things like this are teaching me a greater appreciation for network time... The huge gap between the speed of a satellite connection and its tiny bandwidth allowance means either being completely draconian or having to chide people to not abuse it all the time. We're somewhere inbetween, if a... (3 Replies)
Discussion started by: Corona688
3 Replies

Featured Tech Videos