Author: hselasky
Date: Wed Jun 17 07:37:11 2015
New Revision: 284501
URL: https://svnweb.freebsd.org/changeset/base/284501

Log:
  MFC r284011:
  Don't wait forever for USB data to be flushed.

Modified:
  stable/9/sys/dev/usb/usb_dev.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/usb_dev.c
==============================================================================
--- stable/9/sys/dev/usb/usb_dev.c      Wed Jun 17 07:36:00 2015        
(r284500)
+++ stable/9/sys/dev/usb/usb_dev.c      Wed Jun 17 07:37:11 2015        
(r284501)
@@ -827,7 +827,8 @@ usb_fifo_close(struct usb_fifo *f, int f
                            (!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;
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to