Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2011 01:03:07 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228485 - head/sys/dev/sound/usb
Message-ID:  <201112140103.pBE137go075160@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec 14 01:03:07 2011
New Revision: 228485
URL: http://svn.freebsd.org/changeset/base/228485

Log:
  Use usbd_transfer_unsetup() instead of usbd_transfer_stop() so that
  we don't have to worry about locking.
  
  MFC after:	1 weeks

Modified:
  head/sys/dev/sound/usb/uaudio.c

Modified: head/sys/dev/sound/usb/uaudio.c
==============================================================================
--- head/sys/dev/sound/usb/uaudio.c	Wed Dec 14 00:48:20 2011	(r228484)
+++ head/sys/dev/sound/usb/uaudio.c	Wed Dec 14 01:03:07 2011	(r228485)
@@ -770,8 +770,10 @@ uaudio_detach(device_t dev)
 	 * will time out and close opened /dev/dspX.Y device(s), if
 	 * any.
 	 */
-	uaudio_chan_stop(&sc->sc_play_chan);
-	uaudio_chan_stop(&sc->sc_rec_chan);
+	if (sc->sc_play_chan.valid)
+		usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS);
+	if (sc->sc_rec_chan.valid)
+		usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS);
 
 	if (bus_generic_detach(dev) != 0) {
 		DPRINTF("detach failed!\n");



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