laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/simtrace2/+/27400 )
Change subject: Reduce bInterval of interrupt endpoints to avoid interrupt misses
......................................................................
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
---
M firmware/libcommon/source/usb.c
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/00/27400/1
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 @@
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 @@
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 @@
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 @@
CCID_EPT_NOTIFICATION),
.bmAttributes = USBEndpointDescriptor_INTERRUPT,
.wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS,
- .bInterval = 0x10,
+ .bInterval = 1,
},
/* Communication class interface standard descriptor */
@@ -593,7 +593,7 @@
SIMTRACE_USB_EP_PHONE_INT),
.bmAttributes = USBEndpointDescriptor_INTERRUPT,
.wMaxPacketSize = USBEndpointDescriptor_MAXINTERRUPTSIZE_FS,
- .bInterval = 0x10
+ .bInterval = 1
},
DFURT_IF_DESCRIPTOR(2, 0),
};
--
To view, visit
https://gerrit.osmocom.org/c/simtrace2/+/27400
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I5c272c31983de7201cfbd445c4484f6832d878ab
Gerrit-Change-Number: 27400
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange