Skip to content

Commit

Permalink
Merge pull request #113 from js731ca/usb-gadget-fix
Browse files Browse the repository at this point in the history
fix super-speed handling
  • Loading branch information
jfdelnero authored Nov 4, 2024
2 parents 82389df + e49a106 commit f459eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/usb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void fill_ep_descriptor(mtp_ctx * ctx, usb_gadget * usbctx,struct usb_endpoint_d
if(flags & EP_BULK_MODE)
{
desc->bmAttributes = USB_ENDPOINT_XFER_BULK;
desc->wMaxPacketSize = ctx->usb_cfg.usb_max_packet_size;
desc->wMaxPacketSize = flags & EP_SS_MODE ? 1024 : 512;
}
else
{
Expand All @@ -238,10 +238,10 @@ void fill_ep_descriptor(mtp_ctx * ctx, usb_gadget * usbctx,struct usb_endpoint_d
ep_cfg_descriptor * ss_descriptor;

ss_descriptor = (ep_cfg_descriptor *)desc;
memset(&ss_descriptor->ep_desc_comp,0,sizeof(struct usb_ss_ep_comp_descriptor));

ss_descriptor->ep_desc_comp.bLength = sizeof(struct usb_ss_ep_comp_descriptor);
ss_descriptor->ep_desc_comp.bDescriptorType = USB_DT_SS_ENDPOINT_COMP;
ss_descriptor->ep_desc_comp.bMaxBurst = 15;
}
#endif

Expand Down

0 comments on commit f459eba

Please sign in to comment.