Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: gadget: Remove FS bInterval_m1 limitation

The programming guide incorrectly stated that the DCFG.bInterval_m1 must
be set to 0 when operating in fullspeed. There's no such limitation for
all IPs. See DWC_usb3x programming guide section 3.2.2.1.

Fixes: a1679af85b2a ("usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1")
Cc: <stable@vger.kernel.org>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/5d4139ae89d810eb0a2d8577fb096fc88e87bfab.1618472454.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thinh Nguyen and committed by
Greg Kroah-Hartman
3232a3ce 5951b7c2

+6 -4
+6 -4
drivers/usb/dwc3/gadget.c
··· 607 607 u8 bInterval_m1; 608 608 609 609 /* 610 - * Valid range for DEPCFG.bInterval_m1 is from 0 to 13, and it 611 - * must be set to 0 when the controller operates in full-speed. 610 + * Valid range for DEPCFG.bInterval_m1 is from 0 to 13. 611 + * 612 + * NOTE: The programming guide incorrectly stated bInterval_m1 613 + * must be set to 0 when operating in fullspeed. Internally the 614 + * controller does not have this limitation. See DWC_usb3x 615 + * programming guide section 3.2.2.1. 612 616 */ 613 617 bInterval_m1 = min_t(u8, desc->bInterval - 1, 13); 614 - if (dwc->gadget->speed == USB_SPEED_FULL) 615 - bInterval_m1 = 0; 616 618 617 619 if (usb_endpoint_type(desc) == USB_ENDPOINT_XFER_INT && 618 620 dwc->gadget->speed == USB_SPEED_FULL)