aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-12-31 01:42:38 -0500
committerKevin O'Connor <kevin@koconnor.net>2015-01-01 13:51:22 -0500
commit6f86b8936edb948bb878e36f4a1761a5b124594e (patch)
tree3841e42cd28532b3d605096b24831bccc3aa3745
parent1fdc26ec96d7bb1b356775f2c1ae10956f2bcd6f (diff)
downloadseabios-6f86b8936edb948bb878e36f4a1761a5b124594e.zip
seabios-6f86b8936edb948bb878e36f4a1761a5b124594e.tar.gz
seabios-6f86b8936edb948bb878e36f4a1761a5b124594e.tar.bz2
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 <kevin@koconnor.net>
-rw-r--r--src/hw/usb-uhci.c4
1 files changed, 2 insertions, 2 deletions
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);