Fix OHCI keyboard repeat key issue.
[seabios.git] / 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;