Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 2009 13:23:11 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 155754 for review
Message-ID:  <200901071323.n07DNBA1091553@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155754

Change 155754 by hselasky@hselasky_laptop001 on 2009/01/07 13:22:11

	
	Make sure that the cancelled error code
	is always checked and result in a return
	from the USB callback.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#24 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#24 (text+ko) ====

@@ -2921,6 +2921,8 @@
 	uint8_t chan;
 	uint8_t buf[2];
 
+	DPRINTF("\n");
+
 	switch (USB_GET_STATE(xfer)) {
 	case USB_ST_TRANSFERRED:
 tr_transferred:
@@ -2980,11 +2982,14 @@
 		if (repeat) {
 			goto tr_setup;
 		}
-		return;
+		break;
 
 	default:			/* Error */
 		DPRINTF("error=%s\n", usb2_errstr(xfer->error));
-
+		if (xfer->error == USB_ERR_CANCELLED) {
+			/* do nothing - we are detaching */
+			break;
+		}
 		goto tr_transferred;
 	}
 }



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