svn commit: r188416 - head/sys/dev/usb2/sound

Andrew Thompson thompsa at FreeBSD.org
Mon Feb 9 14:11:04 PST 2009


Author: thompsa
Date: Mon Feb  9 22:11:02 2009
New Revision: 188416
URL: http://svn.freebsd.org/changeset/base/188416

Log:
  MFp4 //depot/projects/usb; 157069, 157255
  
   - Change "usb2_pause_mtx" so that it takes the timeout value in ticks
   - Make sure that attach waits for the generic probe to leave room for firware
     loader drivers and device specific USB Audio drivers like USB phone adapters
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb2/sound/uaudio2.c

Modified: head/sys/dev/usb2/sound/uaudio2.c
==============================================================================
--- head/sys/dev/usb2/sound/uaudio2.c	Mon Feb  9 22:09:21 2009	(r188415)
+++ head/sys/dev/usb2/sound/uaudio2.c	Mon Feb  9 22:11:02 2009	(r188416)
@@ -539,9 +539,12 @@ uaudio_probe(device_t dev)
 {
 	struct usb2_attach_arg *uaa = device_get_ivars(dev);
 
-	if (uaa->usb2_mode != USB_MODE_HOST) {
+	if (uaa->usb2_mode != USB_MODE_HOST)
 		return (ENXIO);
-	}
+
+	if (uaa->use_generic == 0)
+		return (ENXIO);
+
 	/* trigger on the control interface */
 
 	if ((uaa->info.bInterfaceClass == UICLASS_AUDIO) &&
@@ -725,9 +728,7 @@ repeat:
 
 	if (error) {
 		device_printf(dev, "Waiting for sound application to exit!\n");
-		mtx_lock(&Giant);
-		usb2_pause_mtx(&Giant, 2000);
-		mtx_unlock(&Giant);
+		usb2_pause_mtx(NULL, 2 * hz);
 		goto repeat;		/* try again */
 	}
 	return (0);			/* success */


More information about the svn-src-head mailing list