Merge tag 'usb-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v4.10 merge window One big merge this time with a total of 166 non-merge commits. Most of the work, by far, is on dwc2 this time (68.2%) with dwc3 a far second (22.5%). The remaining 9.3% are scattered on gadget drivers. The most important changes for dwc2 are the peripheral side DMA support implemented by Synopsys folks and support for the new IOT dwc2 compatible core from Synopsys. In dwc3 land we have support for high-bandwidth, high-speed isochronous endpoints and some non-critical fixes for large scatter lists. Apart from these, we have our usual set of cleanups, non-critical fixes, etc.
This commit is contained in:
@@ -423,6 +423,12 @@ struct usb_endpoint_descriptor {
|
||||
#define USB_ENDPOINT_XFER_INT 3
|
||||
#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
|
||||
|
||||
#define USB_ENDPOINT_MAXP_MASK 0x07ff
|
||||
#define USB_EP_MAXP_MULT_SHIFT 11
|
||||
#define USB_EP_MAXP_MULT_MASK (3 << USB_EP_MAXP_MULT_SHIFT)
|
||||
#define USB_EP_MAXP_MULT(m) \
|
||||
(((m) & USB_EP_MAXP_MULT_MASK) >> USB_EP_MAXP_MULT_SHIFT)
|
||||
|
||||
/* The USB 3.0 spec redefines bits 5:4 of bmAttributes as interrupt ep type. */
|
||||
#define USB_ENDPOINT_INTRTYPE 0x30
|
||||
#define USB_ENDPOINT_INTR_PERIODIC (0 << 4)
|
||||
@@ -623,11 +629,25 @@ static inline int usb_endpoint_is_isoc_out(
|
||||
* usb_endpoint_maxp - get endpoint's max packet size
|
||||
* @epd: endpoint to be checked
|
||||
*
|
||||
* Returns @epd's max packet
|
||||
* Returns @epd's max packet bits [10:0]
|
||||
*/
|
||||
static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return __le16_to_cpu(epd->wMaxPacketSize);
|
||||
return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK;
|
||||
}
|
||||
|
||||
/**
|
||||
* usb_endpoint_maxp_mult - get endpoint's transactional opportunities
|
||||
* @epd: endpoint to be checked
|
||||
*
|
||||
* Return @epd's wMaxPacketSize[12:11] + 1
|
||||
*/
|
||||
static inline int
|
||||
usb_endpoint_maxp_mult(const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
int maxp = __le16_to_cpu(epd->wMaxPacketSize);
|
||||
|
||||
return USB_EP_MAXP_MULT(maxp) + 1;
|
||||
}
|
||||
|
||||
static inline int usb_endpoint_interrupt_type(
|
||||
|
Reference in New Issue
Block a user