usb-uhci: reorganize wait_qh into wait_pipe
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Nov 2011 09:22:59 +0000 (10:22 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 18 Nov 2011 02:01:32 +0000 (21:01 -0500)
commit31dfd3f20d66604d6959e86c97add01523f65883
tree597eb9b05523006cd669ed84d3aa288e1357c0ce
parent0082374caae8b8f0e235034d3ee2faaa48274d42
usb-uhci: reorganize wait_qh into wait_pipe

Four changes:

1) Add explicit GET_FLATPTR/SET_FLATPTR.

2) Pass the whole pipe to wait_qh so that we can get the iobase from there.

3) Clean up the pipe upon timeout, since that is the only sensible
thing to do: tds are on the stack, and leaving pointers to them in
the pipe is not a good idea.

4) Add a variable timeout argument, since bulk transfers might take more
than 500 ms.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
src/usb-uhci.c