projects
/
seabios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
usb-uhci: fix race against host controller
[seabios.git]
/
src
/
usb-uhci.c
diff --git
a/src/usb-uhci.c
b/src/usb-uhci.c
index 47026952b6b57cc2fbd7d3d0d624533ada12078e..242f3ba5aa8c24060e5b16f8c74dc9ab9f418704 100644
(file)
--- a/
src/usb-uhci.c
+++ b/
src/usb-uhci.c
@@
-483,16
+483,8
@@
uhci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize)
data += transfer;
datasize -= transfer;
}
data += transfer;
datasize -= transfer;
}
- int i;
- for (i=0; i<STACKTDS; i++) {
- struct uhci_td *td = &tds[tdpos++ % STACKTDS];
- int ret = wait_td(td);
- if (ret)
- goto fail;
- }
-
SET_FLATPTR(pipe->toggle, !!toggle);
SET_FLATPTR(pipe->toggle, !!toggle);
- return
0
;
+ return
wait_pipe(pipe, 5000)
;
fail:
dprintf(1, "uhci_send_bulk failed\n");
SET_FLATPTR(pipe->qh.element, UHCI_PTR_TERM);
fail:
dprintf(1, "uhci_send_bulk failed\n");
SET_FLATPTR(pipe->qh.element, UHCI_PTR_TERM);