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>
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;