diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 11:56:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 11:56:17 -0400 |
commit | 6ed962a208cb72cff29a107d6c73247526017ddb (patch) | |
tree | 2bd574d8ab1db79b369735ba0519a66760019189 /include/linux | |
parent | c6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff) | |
parent | 55a46269ccedec140e2487a2344e8a247d48b385 (diff) |
Merge 3.1-rc4 into usb-next
This was done to resolve a conflict in this file:
drivers/usb/host/xhci-ring.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb.h | 2 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 73c7df489607..c19f9100c307 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1574,7 +1574,7 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) | |||
1574 | return 0; | 1574 | return 0; |
1575 | 1575 | ||
1576 | /* NOTE: only 0x07ff bits are for packet size... */ | 1576 | /* NOTE: only 0x07ff bits are for packet size... */ |
1577 | return le16_to_cpu(ep->desc.wMaxPacketSize); | 1577 | return usb_endpoint_maxp(&ep->desc); |
1578 | } | 1578 | } |
1579 | 1579 | ||
1580 | /* ----------------------------------------------------------------------- */ | 1580 | /* ----------------------------------------------------------------------- */ |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 0fd3fbdd8283..1ded281eff88 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define __LINUX_USB_CH9_H | 34 | #define __LINUX_USB_CH9_H |
35 | 35 | ||
36 | #include <linux/types.h> /* __u8 etc */ | 36 | #include <linux/types.h> /* __u8 etc */ |
37 | #include <asm/byteorder.h> /* le16_to_cpu */ | ||
37 | 38 | ||
38 | /*-------------------------------------------------------------------------*/ | 39 | /*-------------------------------------------------------------------------*/ |
39 | 40 | ||
@@ -143,6 +144,11 @@ | |||
143 | #define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */ | 144 | #define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */ |
144 | 145 | ||
145 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 | 146 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 |
147 | /* | ||
148 | * Suspend Options, Table 9-7 USB 3.0 spec | ||
149 | */ | ||
150 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) | ||
151 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) | ||
146 | 152 | ||
147 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ | 153 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ |
148 | 154 | ||
@@ -570,6 +576,17 @@ static inline int usb_endpoint_is_isoc_out( | |||
570 | return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); | 576 | return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); |
571 | } | 577 | } |
572 | 578 | ||
579 | /** | ||
580 | * usb_endpoint_maxp - get endpoint's max packet size | ||
581 | * @epd: endpoint to be checked | ||
582 | * | ||
583 | * Returns @epd's max packet | ||
584 | */ | ||
585 | static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) | ||
586 | { | ||
587 | return le16_to_cpu(epd->wMaxPacketSize); | ||
588 | } | ||
589 | |||
573 | /*-------------------------------------------------------------------------*/ | 590 | /*-------------------------------------------------------------------------*/ |
574 | 591 | ||
575 | /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ | 592 | /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ |