diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-10-01 10:31:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 14:10:24 -0400 |
commit | a03bede5c73a6876fa891cfe82a65460dc9f4698 (patch) | |
tree | 608948e319564fce6a5cf68bc3ad09c1cdf5e010 /drivers | |
parent | 72675479925f53af051ae8a78bcfafeaa47b3eef (diff) |
USB: update documentation for URB_ISO_ASAP
This patch (as1611) updates the USB documentation and kerneldoc to
give a more precise meaning for the URB_ISO_ASAP flag and to explain
more of the details of scheduling for isochronous URBs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/urb.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 9d912bfdcffe..3662287e2f4f 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c | |||
@@ -214,9 +214,25 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb); | |||
214 | * urb->interval is modified to reflect the actual transfer period used | 214 | * urb->interval is modified to reflect the actual transfer period used |
215 | * (normally some power of two units). And for isochronous urbs, | 215 | * (normally some power of two units). And for isochronous urbs, |
216 | * urb->start_frame is modified to reflect when the URB's transfers were | 216 | * urb->start_frame is modified to reflect when the URB's transfers were |
217 | * scheduled to start. Not all isochronous transfer scheduling policies | 217 | * scheduled to start. |
218 | * will work, but most host controller drivers should easily handle ISO | 218 | * |
219 | * queues going from now until 10-200 msec into the future. | 219 | * Not all isochronous transfer scheduling policies will work, but most |
220 | * host controller drivers should easily handle ISO queues going from now | ||
221 | * until 10-200 msec into the future. Drivers should try to keep at | ||
222 | * least one or two msec of data in the queue; many controllers require | ||
223 | * that new transfers start at least 1 msec in the future when they are | ||
224 | * added. If the driver is unable to keep up and the queue empties out, | ||
225 | * the behavior for new submissions is governed by the URB_ISO_ASAP flag. | ||
226 | * If the flag is set, or if the queue is idle, then the URB is always | ||
227 | * assigned to the first available (and not yet expired) slot in the | ||
228 | * endpoint's schedule. If the flag is not set and the queue is active | ||
229 | * then the URB is always assigned to the next slot in the schedule | ||
230 | * following the end of the endpoint's previous URB, even if that slot is | ||
231 | * in the past. When a packet is assigned in this way to a slot that has | ||
232 | * already expired, the packet is not transmitted and the corresponding | ||
233 | * usb_iso_packet_descriptor's status field will return -EXDEV. If this | ||
234 | * would happen to all the packets in the URB, submission fails with a | ||
235 | * -EXDEV error code. | ||
220 | * | 236 | * |
221 | * For control endpoints, the synchronous usb_control_msg() call is | 237 | * For control endpoints, the synchronous usb_control_msg() call is |
222 | * often used (in non-interrupt context) instead of this call. | 238 | * often used (in non-interrupt context) instead of this call. |