]> xenbits.xensource.com Git - seabios.git/commitdiff
Fix OHCI keyboard repeat key issue.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 29 May 2011 13:48:28 +0000 (09:48 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 29 May 2011 13:48:28 +0000 (09:48 -0400)
Mask toggleCarry and Halted flags in endpoint descriptor dword #2 so that
the remaining head pointer field is valid for comparing with the next
pointer.

Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/usb-ohci.c

index 86eba0d16787eda4f5141517c3b225a6c39eec1a..72b9f68b7f50f3b40cd0ca7af9d5d4855f340022 100644 (file)
@@ -501,7 +501,7 @@ ohci_poll_intr(struct usb_pipe *p, void *data)
 
     struct ohci_pipe *pipe = container_of(p, struct ohci_pipe, pipe);
     struct ohci_td *tds = GET_FLATPTR(pipe->tds);
-    struct ohci_td *head = (void*)GET_FLATPTR(pipe->ed.hwHeadP);
+    struct ohci_td *head = (void*)(GET_FLATPTR(pipe->ed.hwHeadP) & ~(ED_C|ED_H));
     struct ohci_td *tail = (void*)GET_FLATPTR(pipe->ed.hwTailP);
     int count = GET_FLATPTR(pipe->count);
     int pos = (tail - tds + 1) % count;