When use ep1out interrupt endpoint to receive data in sdp, the max
packetsize of ep1out is set to 1024. But in cdns3 gadget driver, the
max packetsize is limited to 512 bytes in high speed. So we can't
implement data download through ep1out of cdns3 driver, here need
change the max packesize of interrupt endpoints to 1024.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
17f321b4a32cfaac52339172dc354729e641451a)
(cherry picked from commit
9d81e87f6fc37b42c28694f3938b1e1c37879904)
u32 bEndpointAddress = usb_ss_ep->num | usb_ss_ep->dir;
u32 interrupt_mask = 0;
bool is_iso_ep = (usb_ss_ep->type == USB_ENDPOINT_XFER_ISOC);
+ __maybe_unused bool is_int_ep =
+ (usb_ss_ep->type == USB_ENDPOINT_XFER_INT);
dev_dbg(&usb_ss->dev,
"%s: %s addr=0x%x, speed %d, is_iso_ep %d\n", __func__,
max_packet_size = (is_iso_ep ?
ENDPOINT_MAX_PACKET_SIZE_1024 :
ENDPOINT_MAX_PACKET_SIZE_512);
+#if defined(CONFIG_SPL_USB_SDP_SUPPORT) || defined(CONFIG_USB_FUNCTION_SDP)
+ if (is_int_ep)
+ max_packet_size = ENDPOINT_MAX_PACKET_SIZE_1024;
+#endif
break;
case USB_SPEED_WIRELESS: