summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack/usb_serial.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-08-12 20:35:01 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-08-12 20:35:01 +0000
commitf10a3c7bed9d7f0ba03cce37853aa7e9ecfc8bae (patch)
treeeeb58519a718f710fbbfefabe6fe0bcc54096497 /firmware/usbstack/usb_serial.c
parente783d0c82a6673d036a71f3eab3e69f95d4b0b37 (diff)
downloadrockbox-f10a3c7bed9d7f0ba03cce37853aa7e9ecfc8bae.tar.gz
rockbox-f10a3c7bed9d7f0ba03cce37853aa7e9ecfc8bae.tar.bz2
rockbox-f10a3c7bed9d7f0ba03cce37853aa7e9ecfc8bae.zip
Limit usb_serial packets to 32 bytes. It's unclear why this is needed, but usb serial packets larger than 96 bytes seem to never be sent.
Thanks to Amaury Pouly for investigating this git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22285 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack/usb_serial.c')
-rw-r--r--firmware/usbstack/usb_serial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c
index 6c654ad898..99b8bb2c3f 100644
--- a/firmware/usbstack/usb_serial.c
+++ b/firmware/usbstack/usb_serial.c
@@ -158,6 +158,9 @@ void usb_serial_disconnect(void)
static void sendout(void)
{
buffer_transitlength = MIN(buffer_length,BUFFER_SIZE-buffer_start);
+ /* For unknown reasons packets larger than 96 bytes are not sent. We play
+ * safe and limit to 32. TODO: find the real bug */
+ buffer_transitlength = MIN(buffer_transitlength,32);
if(buffer_transitlength > 0)
{
buffer_length -= buffer_transitlength;