usb: Rework timeouts
- Rework all timeouts to be more relaxed when doing big data transfers. - Fix a bug where async transfer would timeout sooner instead of infinite tries. Both showed up in Arch Linux, because of it's huge latency USB stack latency that can reach 1-2s. The rework will let every OS work without adding additional wait time in the gadget loops.
This commit is contained in:
@@ -309,7 +309,7 @@ static bool _fts_touch_read(touchpad_report_t *rpt)
|
||||
|
||||
static u8 _hid_transfer_start(usb_ctxt_t *usbs, u32 len)
|
||||
{
|
||||
u8 status = usb_ops.usb_device_ep1_in_write((u8 *)USB_EP_BULK_IN_BUF_ADDR, len, NULL, USB_XFER_SYNCED);
|
||||
u8 status = usb_ops.usb_device_ep1_in_write((u8 *)USB_EP_BULK_IN_BUF_ADDR, len, NULL, USB_XFER_SYNCED_CMD);
|
||||
if (status == USB_ERROR_XFER_ERROR)
|
||||
{
|
||||
usbs->set_text(usbs->label, "#FFDD00 Error:# EP IN transfer!");
|
||||
|
||||
Reference in New Issue
Block a user