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
This commit is contained in:
Harald Welte 2022-01-26 13:56:44 +01:00
parent c3f366b55e
commit 755387ee31
1 changed files with 5 additions and 5 deletions

View File

@ -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),
};