This patch changes default value of maxburst to 1. When a connection is
established to highspeed not superspeed, the maxburst is set to 0.
So, we need to check and change default value of the maxburst before setting up
burst size of ep.

Signed-off-by: Chanho Park <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
---
 drivers/usb/dwc3/gadget.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 58fdfad..01f2d0e 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -437,6 +437,9 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, 
struct dwc3_ep *dep,
 
        memset(&params, 0x00, sizeof(params));
 
+       if (!comp_desc)
+               dep->endpoint.maxburst = 1;
+
        params.param0 = DWC3_DEPCFG_EP_TYPE(usb_endpoint_type(desc))
                | DWC3_DEPCFG_MAX_PACKET_SIZE(usb_endpoint_maxp(desc))
                | DWC3_DEPCFG_BURST_SIZE(dep->endpoint.maxburst - 1);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to