diff options
author | Harald Welte <laforge@osmocom.org> | 2022-01-26 13:56:44 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-03-03 19:06:09 +0100 |
commit | 755387ee31d8638089dd2791de82e4737dc79333 (patch) | |
tree | 28af214c23ce19ff2129ea556c7937ab7c8098cb | |
parent | c3f366b55e1273cc41d0b306058ba8bca912a414 (diff) |
Reduce bInterval of interrupt endpoints to avoid interrupt misses
Particularly the VCC/RST/CLK changes can happen quite frequent, and
we were seeing quite a number of overflows of the usb_buf queue for EP06
(interrupt endpoint) in cardem.
I first tried increasing the maximum queue size to up to 10, but that
still didn't resolve those EP06 overflow error log messages.
Reducing the bInterval from 16 to 1 made them go away in all my
tests.
Change-Id: I5c272c31983de7201cfbd445c4484f6832d878ab
-rw-r--r-- | firmware/libcommon/source/usb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/libcommon/source/usb.c b/firmware/libcommon/source/usb.c index d86fc92..7a99b15 100644 --- a/firmware/libcommon/source/usb.c +++ b/firmware/libcommon/source/usb.c @@ -206,7 +206,7 @@ static const SIMTraceDriverConfigurationDescriptorSniffer SIMTRACE_USB_EP_CARD_INT), .bmAttributes = USBEndpointDescriptor_INTERRUPT, .wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS, - .bInterval = 0x10, + .bInterval = 1, }, DFURT_IF_DESCRIPTOR(1, 0), }; @@ -382,7 +382,7 @@ static const SIMTraceDriverConfigurationDescriptorPhone SIMTRACE_CARDEM_USB_EP_USIM1_INT), .bmAttributes = USBEndpointDescriptor_INTERRUPT, .wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS, - .bInterval = 0x10 + .bInterval = 1 }, #ifdef CARDEMU_SECOND_UART /* Communication class interface standard descriptor */ @@ -429,7 +429,7 @@ static const SIMTraceDriverConfigurationDescriptorPhone SIMTRACE_CARDEM_USB_EP_USIM2_INT), .bmAttributes = USBEndpointDescriptor_INTERRUPT, .wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS, - .bInterval = 0x10, + .bInterval = 1, }, DFURT_IF_DESCRIPTOR(2, 0), #else @@ -547,7 +547,7 @@ static const SIMTraceDriverConfigurationDescriptorMITM CCID_EPT_NOTIFICATION), .bmAttributes = USBEndpointDescriptor_INTERRUPT, .wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS, - .bInterval = 0x10, + .bInterval = 1, }, /* Communication class interface standard descriptor */ @@ -593,7 +593,7 @@ static const SIMTraceDriverConfigurationDescriptorMITM SIMTRACE_USB_EP_PHONE_INT), .bmAttributes = USBEndpointDescriptor_INTERRUPT, .wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS, - .bInterval = 0x10 + .bInterval = 1 }, DFURT_IF_DESCRIPTOR(2, 0), }; |