From: Kevin O'Connor Date: Wed, 31 Dec 2014 06:42:38 +0000 (-0500) Subject: uhci: Increase bulk transfer STACKTDS to 16 X-Git-Tag: rel-1.8.0~19 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6f86b8936edb948bb878e36f4a1761a5b124594e;p=seabios.git uhci: Increase bulk transfer STACKTDS to 16 Increase the number of simultaneous transfer descriptors that the driver will build for uhci. The old value of 4 was a leftover from when SeaBIOS had a tiny 512 byte extra stack - now that there is a 2K extra stack there is plenty of space for additional descriptors. Using a value of 16 should allow for an entire 1ms frame of bulk transfer content to be setup in advance (assuming the max packet size is 64 bytes). Signed-off-by: Kevin O'Connor --- diff --git a/src/hw/usb-uhci.c b/src/hw/usb-uhci.c index 7ef50d1..06a1d4e 100644 --- a/src/hw/usb-uhci.c +++ b/src/hw/usb-uhci.c @@ -500,7 +500,7 @@ uhci_send_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize return ret; } -#define STACKTDS 4 +#define STACKTDS 16 #define TDALIGN 16 int @@ -517,7 +517,7 @@ uhci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize) | (GET_LOWFLAT(pipe->pipe.ep) << 7)); int toggle = GET_LOWFLAT(pipe->toggle) ? TD_TOKEN_TOGGLE : 0; - // Allocate 4 tds on stack (16byte aligned) + // Allocate 16 tds on stack (16byte aligned) u8 tdsbuf[sizeof(struct uhci_td) * STACKTDS + TDALIGN - 1]; struct uhci_td *tds = (void*)ALIGN((u32)tdsbuf, TDALIGN); memset(tds, 0, sizeof(*tds) * STACKTDS);