diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 4f33a58fa9d..105e3e9362d 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -555,6 +555,29 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, | |||
555 | /*-------------------------------------------------------------------------*/ | 555 | /*-------------------------------------------------------------------------*/ |
556 | 556 | ||
557 | /** | 557 | /** |
558 | * usb_endpoint_num - get the endpoint's number | ||
559 | * @epd: endpoint to be checked | ||
560 | * | ||
561 | * Returns @epd's number: 0 to 15. | ||
562 | */ | ||
563 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
564 | { | ||
565 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
566 | } | ||
567 | |||
568 | /** | ||
569 | * usb_endpoint_type - get the endpoint's transfer type | ||
570 | * @epd: endpoint to be checked | ||
571 | * | ||
572 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
573 | * to @epd's transfer type. | ||
574 | */ | ||
575 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
576 | { | ||
577 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
578 | } | ||
579 | |||
580 | /** | ||
558 | * usb_endpoint_dir_in - check if the endpoint has IN direction | 581 | * usb_endpoint_dir_in - check if the endpoint has IN direction |
559 | * @epd: endpoint to be checked | 582 | * @epd: endpoint to be checked |
560 | * | 583 | * |
@@ -1037,6 +1060,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1037 | * @urb_list: For use by current owner of the URB. | 1060 | * @urb_list: For use by current owner of the URB. |
1038 | * @anchor_list: membership in the list of an anchor | 1061 | * @anchor_list: membership in the list of an anchor |
1039 | * @anchor: to anchor URBs to a common mooring | 1062 | * @anchor: to anchor URBs to a common mooring |
1063 | * @ep: Points to the endpoint's data structure. Will eventually | ||
1064 | * replace @pipe. | ||
1040 | * @pipe: Holds endpoint number, direction, type, and more. | 1065 | * @pipe: Holds endpoint number, direction, type, and more. |
1041 | * Create these values with the eight macros available; | 1066 | * Create these values with the eight macros available; |
1042 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" | 1067 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" |
@@ -1212,6 +1237,7 @@ struct urb | |||
1212 | struct list_head anchor_list; /* the URB may be anchored by the driver */ | 1237 | struct list_head anchor_list; /* the URB may be anchored by the driver */ |
1213 | struct usb_anchor *anchor; | 1238 | struct usb_anchor *anchor; |
1214 | struct usb_device *dev; /* (in) pointer to associated device */ | 1239 | struct usb_device *dev; /* (in) pointer to associated device */ |
1240 | struct usb_host_endpoint *ep; /* (internal) pointer to endpoint struct */ | ||
1215 | unsigned int pipe; /* (in) pipe information */ | 1241 | unsigned int pipe; /* (in) pipe information */ |
1216 | int status; /* (return) non-ISO status */ | 1242 | int status; /* (return) non-ISO status */ |
1217 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ | 1243 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ |