[SeaBIOS] [PATCH 3/5] Minor - USB OHCI interrupt queue should be one larger.
Kevin O'Connor
kevin at koconnor.net
Wed Mar 10 02:25:06 CET 2010
One of the entries in the queue can't be used, so the total queue size
needs to be one larger than it currently is.
---
src/usb-ohci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/usb-ohci.c b/src/usb-ohci.c
index 28bbdc6..0048e2b 100644
--- a/src/usb-ohci.c
+++ b/src/usb-ohci.c
@@ -429,7 +429,7 @@ ohci_alloc_intr_pipe(struct usb_pipe *dummy, int frameexp)
int devaddr = dummy->devaddr | (dummy->ep << 7);
// Determine number of entries needed for 2 timer ticks.
int ms = 1<<frameexp;
- int count = DIV_ROUND_UP(PIT_TICK_INTERVAL * 1000 * 2, PIT_TICK_RATE * ms);
+ int count = DIV_ROUND_UP(PIT_TICK_INTERVAL * 1000 * 2, PIT_TICK_RATE * ms)+1;
struct ohci_pipe *pipe = malloc_low(sizeof(*pipe));
struct ohci_td *tds = malloc_low(sizeof(*tds) * count);
void *data = malloc_low(maxpacket * count);
--
1.6.6.1
More information about the SeaBIOS
mailing list