cdcacm: Fix UART interface OUT endpoint MPS in descriptor.
3e3e450 reduced the buffer size for the UART interface OUT endpoint to 32B, but left wMaxPacketSize at 64B. This effectively configures the hardware to receive packets up to 32B in size while telling the host it can send larger packets. On reception of a larger packet, the usb core treats it as an error, drops the packet and replies with a STALL handshake. This commit fixes the issue by updating the descriptor to match the buffer configuration. Fixes #538
This commit is contained in:
parent
08bb4d5775
commit
d63e870e82
@ -188,7 +188,7 @@ static const struct usb_endpoint_descriptor uart_data_endp[] = {{
|
|||||||
.bDescriptorType = USB_DT_ENDPOINT,
|
.bDescriptorType = USB_DT_ENDPOINT,
|
||||||
.bEndpointAddress = 0x03,
|
.bEndpointAddress = 0x03,
|
||||||
.bmAttributes = USB_ENDPOINT_ATTR_BULK,
|
.bmAttributes = USB_ENDPOINT_ATTR_BULK,
|
||||||
.wMaxPacketSize = CDCACM_PACKET_SIZE,
|
.wMaxPacketSize = CDCACM_PACKET_SIZE / 2,
|
||||||
.bInterval = 1,
|
.bInterval = 1,
|
||||||
}, {
|
}, {
|
||||||
.bLength = USB_DT_ENDPOINT_SIZE,
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user