summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-07-17 01:58:33 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-07-17 01:58:33 -0700
commit713809497efa2b6edbb652f91c3aeff9a00b76db (patch)
tree1e37b2e0af58438c6ec888daa4354b85b83e2a8a /include/linux
parent9892c3b039477c6b5686811dc356ebd38069e697 (diff)
parent25b365ac8fdad39e81508ccbd8c0cc2db0be6cf8 (diff)
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/gregkh-2.5
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b5eec5fc1d09..e1186930c43e 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -80,7 +80,8 @@ struct usb_host_interface {
* @act_altsetting: index of current altsetting. this number is always
* less than num_altsetting. after the device is configured, each
* interface uses its default setting of zero.
- * @max_altsetting:
+ * @max_altsetting: the max number of altsettings for this interface.
+ * @driver: the USB driver that is bound to this interface.
* @minor: the minor number assigned to this interface, if this
* interface is bound to a driver that uses the USB major number.
* If this interface does not use the USB major, this field should
@@ -409,7 +410,11 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
* do (or don't) show up otherwise in the filesystem.
* @id_table: USB drivers use ID table to support hotplugging.
* Export this with MODULE_DEVICE_TABLE(usb,...). This must be set
- * or your driver's probe function will never get called.
+ * or your driver's probe function will never get called.
+ * @driver: the driver model core driver structure.
+ * @serialize: a semaphore used to serialize access to this driver. Used
+ * in the probe and disconnect functions. Only the USB core should use
+ * this lock.
*
* USB drivers must provide a name, probe() and disconnect() methods,
* and an id_table. Other driver fields are optional.
@@ -575,6 +580,8 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
* it likes with the URB, including resubmitting or freeing it.
* @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to
* collect the transfer status for each buffer.
+ * @timeout: If set to zero, the urb will never timeout. Otherwise this is
+ * the time in jiffies that this urb will timeout in.
*
* This structure identifies USB transfer requests. URBs must be allocated by
* calling usb_alloc_urb() and freed with a call to usb_free_urb().
@@ -677,10 +684,14 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
*/
struct urb
{
+ /* private, usb core and host controller only fields in the urb */
spinlock_t lock; /* lock for the 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 */
+ int bandwidth; /* bandwidth for INT/ISO request */
+
+ /* public, documented fields in the urb that can be used by drivers */
struct usb_device *dev; /* (in) pointer to associated device */
unsigned int pipe; /* (in) pipe information */
int status; /* (return) non-ISO status */
@@ -689,7 +700,6 @@ struct urb
dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
int transfer_buffer_length; /* (in) data buffer length */
int actual_length; /* (return) actual transfer length */
- int bandwidth; /* bandwidth for INT/ISO request */
unsigned char *setup_packet; /* (in) setup packet (control only) */
dma_addr_t setup_dma; /* (in) dma addr for setup_packet */
int start_frame; /* (modify) start frame (INT/ISO) */
@@ -891,8 +901,10 @@ struct usb_sg_request {
int status;
size_t bytes;
- // members not documented above are private to usbcore,
- // and are not provided for driver access!
+ /*
+ * members below are private to usbcore,
+ * and are not provided for driver access!
+ */
spinlock_t lock;
struct usb_device *dev;