Hi folks, while working on some recent problesm with dwc3 and high-speed, high-bandwidth periodic endpoints, we found this old problem with usb_endpoint_maxp() where it returns wMaxPacketSize completely, not only the lowest 11 bits. This series tries to solve that by introducing a new usb_endpoint_maxp_mult() helper which returns ((wMaxPacketSize[12:11] >> 11) + 1) and fixes usb_endpoint_maxp() to return only wMaxPacketSize[10:0]. While at that, we're also fixing dwc3 to set a TRB's PCM1 to the value of usb_endpoint_maxp_mult() - 1. I'm yet to fully test these latest changes (hence RFC), however allmodconfig builds fine on x86. Best Felipe Balbi (45): usb: add helper to extract bits 12:11 of wMaxPacketSize usb: gadget: composite: correctly initialize ep->maxpacket usb: gadget: composite: always set ep->mult to a sensible value usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs usb: dwc3: gadget: properly check ep cmd usb: dwc3: gadget: make use of No Response Update Transfer usb: dwc3: gadget: giveback request if we can't kick it usb: dwc3: gadget: conditionally disable Link State change events usb: dwc3: debug: decode control endpoint phase too usb: dwc3: gadget: remove redundant trace prints usb: dwc3: debug: move dwc3_ep0_state_string() to debug.h usb: dwc3: trace: print out ep0state also from XferComplete media: usbtv: core: make use of new usb_endpoint_maxp_mult() media: usb: uvc: make use of new usb_endpoint_maxp_mult() usb: chipidea: udc: make use of new usb_endpoint_maxp_mult() usb: core: devices: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult() usb: gadget: udc: mv_udc: make use of new usb_endpoint_maxp_mult() usb: host: ehci: make use of new usb_endpoint_maxp_mult() usb: host: xhci: make use of new usb_endpoint_maxp_mult() usb: misc: usbtest: make use of new usb_endpoint_maxp_mult() usb: musb: make use of new usb_endpoint_maxp_mult() usb: ch9: make usb_endpoint_maxp() return only packet size usb: host: xhci: purge GET_MAX_PACKET() media: usb: uvc: remove unnecessary & operation usb: chipidea: udc: remove unnecessary & operation usb: core: devices: remove unnecessary & operation usb: core: endpoint: remove unnecessary & operation usb: gadget: composite: remove unnecessary & operation usb: gadget: udc: atmel: remove unnecessary & operation usb: gadget: udc: bdc: remove unnecessary & operation usb: gadget: udc: dummy: remove unnecessary & operation usb: gadget: udc: net2272: remove unnecessary & operation usb: gadget: udc: net2280: remove unnecessary & operation usb: gadget: udc: s3c2410: remove unnecessary & operation usb: misc: usbtest: remove unnecessary & operation usb: ip: remove unnecessary & operation usb: gadget: udc: fsl: remove unnecessary & operation usb: gadget: udc: mv: remove unnecessary & operation usb: dwc3: trace: pretty print high-bandwidth transfers too drivers/media/usb/usbtv/usbtv-core.c | 7 ++- drivers/media/usb/uvc/uvc_video.c | 6 ++- drivers/usb/chipidea/udc.c | 4 +- drivers/usb/core/devices.c | 12 ++--- drivers/usb/core/endpoint.c | 3 +- drivers/usb/dwc3/core.h | 3 ++ drivers/usb/dwc3/debug.h | 40 ++++++++++++-- drivers/usb/dwc3/ep0.c | 37 +------------ drivers/usb/dwc3/gadget.c | 93 +++++++++++++++------------------ drivers/usb/dwc3/trace.h | 37 ++++++++++--- drivers/usb/gadget/composite.c | 9 +++- drivers/usb/gadget/function/uvc_video.c | 2 +- drivers/usb/gadget/udc/atmel_usba_udc.c | 4 +- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- drivers/usb/gadget/udc/dummy_hcd.c | 5 +- drivers/usb/gadget/udc/fsl_udc_core.c | 3 +- drivers/usb/gadget/udc/fusb300_udc.c | 2 +- drivers/usb/gadget/udc/gr_udc.c | 2 +- drivers/usb/gadget/udc/mv_udc_core.c | 3 +- drivers/usb/gadget/udc/net2272.c | 4 +- drivers/usb/gadget/udc/net2280.c | 6 +-- drivers/usb/gadget/udc/s3c2410_udc.c | 4 +- drivers/usb/host/ehci-sched.c | 2 +- drivers/usb/host/xhci-mem.c | 10 ++-- drivers/usb/host/xhci-mtk-sch.c | 4 +- drivers/usb/host/xhci-ring.c | 6 +-- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 5 -- drivers/usb/misc/usbtest.c | 6 +-- drivers/usb/musb/musb_gadget.c | 6 +-- drivers/usb/musb/musb_host.c | 2 +- drivers/usb/usbip/vudc_dev.c | 2 +- include/uapi/linux/usb/ch9.h | 24 ++++++++- 34 files changed, 194 insertions(+), 165 deletions(-) -- 2.10.0.440.g21f862b -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html