Don't wait forever for USB data to be flushed.

MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2015-06-05 06:06:07 +00:00
parent 717a45fcae
commit b6630e5024

View File

@ -830,7 +830,8 @@ usb_fifo_close(struct usb_fifo *f, int fflags)
(!f->flag_iserror)) {
/* wait until all data has been written */
f->flag_sleeping = 1;
err = cv_wait_sig(&f->cv_io, f->priv_mtx);
err = cv_timedwait_sig(&f->cv_io, f->priv_mtx,
USB_MS_TO_TICKS(USB_DEFAULT_TIMEOUT));
if (err) {
DPRINTF("signal received\n");
break;