Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 07:38:50 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r284502 - stable/8/sys/dev/usb
Message-ID:  <201506170738.t5H7coAN017790@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jun 17 07:38:50 2015
New Revision: 284502
URL: https://svnweb.freebsd.org/changeset/base/284502

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

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

Modified: stable/8/sys/dev/usb/usb_dev.c
==============================================================================
--- stable/8/sys/dev/usb/usb_dev.c	Wed Jun 17 07:37:11 2015	(r284501)
+++ stable/8/sys/dev/usb/usb_dev.c	Wed Jun 17 07:38:50 2015	(r284502)
@@ -816,7 +816,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506170738.t5H7coAN017790>