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 /include | |
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 'include')
-rw-r--r-- | include/linux/usb.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 10278d18709c..f92cdf0c1457 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1129,8 +1129,8 @@ extern int usb_disabled(void); | |||
1129 | * Note: URB_DIR_IN/OUT is automatically set in usb_submit_urb(). | 1129 | * Note: URB_DIR_IN/OUT is automatically set in usb_submit_urb(). |
1130 | */ | 1130 | */ |
1131 | #define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */ | 1131 | #define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */ |
1132 | #define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame | 1132 | #define URB_ISO_ASAP 0x0002 /* iso-only; use the first unexpired |
1133 | * ignored */ | 1133 | * slot in the schedule */ |
1134 | #define URB_NO_TRANSFER_DMA_MAP 0x0004 /* urb->transfer_dma valid on submit */ | 1134 | #define URB_NO_TRANSFER_DMA_MAP 0x0004 /* urb->transfer_dma valid on submit */ |
1135 | #define URB_NO_FSBR 0x0020 /* UHCI-specific */ | 1135 | #define URB_NO_FSBR 0x0020 /* UHCI-specific */ |
1136 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ | 1136 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ |
@@ -1309,15 +1309,20 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1309 | * the transfer interval in the endpoint descriptor is logarithmic. | 1309 | * the transfer interval in the endpoint descriptor is logarithmic. |
1310 | * Device drivers must convert that value to linear units themselves.) | 1310 | * Device drivers must convert that value to linear units themselves.) |
1311 | * | 1311 | * |
1312 | * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling | 1312 | * If an isochronous endpoint queue isn't already running, the host |
1313 | * the host controller to schedule the transfer as soon as bandwidth | 1313 | * controller will schedule a new URB to start as soon as bandwidth |
1314 | * utilization allows, and then set start_frame to reflect the actual frame | 1314 | * utilization allows. If the queue is running then a new URB will be |
1315 | * selected during submission. Otherwise drivers must specify the start_frame | 1315 | * scheduled to start in the first transfer slot following the end of the |
1316 | * and handle the case where the transfer can't begin then. However, drivers | 1316 | * preceding URB, if that slot has not already expired. If the slot has |
1317 | * won't know how bandwidth is currently allocated, and while they can | 1317 | * expired (which can happen when IRQ delivery is delayed for a long time), |
1318 | * find the current frame using usb_get_current_frame_number () they can't | 1318 | * the scheduling behavior depends on the URB_ISO_ASAP flag. If the flag |
1319 | * know the range for that frame number. (Ranges for frame counter values | 1319 | * is clear then the URB will be scheduled to start in the expired slot, |
1320 | * are HC-specific, and can go from 256 to 65536 frames from "now".) | 1320 | * implying that some of its packets will not be transferred; if the flag |
1321 | * is set then the URB will be scheduled in the first unexpired slot, | ||
1322 | * breaking the queue's synchronization. Upon URB completion, the | ||
1323 | * start_frame field will be set to the (micro)frame number in which the | ||
1324 | * transfer was scheduled. Ranges for frame counter values are HC-specific | ||
1325 | * and can go from as low as 256 to as high as 65536 frames. | ||
1321 | * | 1326 | * |
1322 | * Isochronous URBs have a different data transfer model, in part because | 1327 | * Isochronous URBs have a different data transfer model, in part because |
1323 | * the quality of service is only "best effort". Callers provide specially | 1328 | * the quality of service is only "best effort". Callers provide specially |