summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2002-05-21 21:46:54 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-05-21 21:46:54 -0700
commit96479c1684b9818af5fbb6d4e6b3550ca1bc739d (patch)
tree7bc95c35b05e5099e3e8aeaf82b431e8888833cc /include/linux
parentbacf358b98458fc5a4d08b8b79f84e84d5545619 (diff)
[PATCH] usbcore, remove urb->next
Given the discussions of last week, this removes urb->next from the USB core API. This change simplifies the driver API by getting rid of a superfluous feature (and related new-developer confusion), gets rid of a hidden failure mode (drivers can now see resubmit failures), lets us get rid of a HCD feature that isn't consistently implemented, and so on. This will break some code. There are ISO drivers that don't use urb->next (like audio), but most video drivers do. My patch #2 fixes one such driver. My patch #3 fixes host controller drivers, most of which were already converted.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 7a62399fd5e8..8e8f953ed2c7 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -767,7 +767,6 @@ typedef void (*usb_complete_t)(struct urb *);
/**
* struct urb - USB Request Block
* @urb_list: For use by current owner of the URB.
- * @next: Used to link ISO requests into rings.
* @pipe: Holds endpoint number, direction, type, and max packet size.
* Create these values with the eight macros available;
* usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl"
@@ -827,7 +826,7 @@ typedef void (*usb_complete_t)(struct urb *);
*
* Initialization:
*
- * All URBs submitted must initialize dev, pipe, next (may be null),
+ * All URBs submitted must initialize dev, pipe,
* transfer_flags (may be zero), complete, timeout (may be zero).
* The USB_ASYNC_UNLINK transfer flag affects later invocations of
* the usb_unlink_urb() routine.
@@ -873,7 +872,9 @@ typedef void (*usb_complete_t)(struct urb *);
* the quality of service is only "best effort". Callers provide specially
* allocated URBs, with number_of_packets worth of iso_frame_desc structures
* at the end. Each such packet is an individual ISO transfer. Isochronous
- * URBs are normally submitted with urb->next fields set up as a ring, so
+ * URBs are normally queued (no flag like USB_BULK_QUEUE is needed) so that
+ * transfers are at least double buffered, and then explicitly resubmitted
+ * in completion handlers, so
* that data (such as audio or video) streams at as constant a rate as the
* host controller scheduler can support.
*
@@ -891,14 +892,15 @@ typedef void (*usb_complete_t)(struct urb *);
* When completion callback is invoked for non-isochronous URBs, the
* actual_length field tells how many bytes were transferred.
*
- * For interrupt and isochronous URBs, the URB provided to the callback
+ * For interrupt URBs, the URB provided to the callback
* function is still "owned" by the USB core subsystem unless the status
* indicates that the URB has been unlinked. Completion handlers should
* not modify such URBs until they have been unlinked.
*
* ISO transfer status is reported in the status and actual_length fields
* of the iso_frame_desc array, and the number of errors is reported in
- * error_count.
+ * error_count. Completion callbacks for ISO transfers will normally
+ * (re)submit URBs to ensure a constant transfer rate.
*/
struct urb
{
@@ -906,7 +908,6 @@ struct urb
atomic_t count; /* reference count of the URB */
void *hcpriv; /* private data for host controller */
struct list_head urb_list; /* list pointer to all active urbs */
- struct urb *next; /* (in) pointer to next URB */
struct usb_device *dev; /* (in) pointer to associated device */
unsigned int pipe; /* (in) pipe information */
int status; /* (return) non-ISO status */