Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2007 13:43:00 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 131433 for review
Message-ID:  <200712221343.lBMDh0GR073419@repoman.freebsd.org>

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

Change 131433 by hselasky@hselasky_laptop001 on 2007/12/22 13:42:50

	
	Prevent problems with regard to clearing USB endpoint stall.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/ugen.c#34 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/ugen.c#34 (text+ko) ====

@@ -1862,6 +1862,20 @@
 			error = EINVAL;
 			break;
 		}
+		/*
+		 * Clearing the stall this way is not allowed, hence it does
+		 * not update the data toggle value in "struct usbd_pipe" !
+		 */
+		if (ur->ucr_request.bmRequestType == UT_WRITE_ENDPOINT) {
+			if (ur->ucr_request.wLength[0] ||
+			    ur->ucr_request.wLength[1]) {
+				error = EINVAL;
+			} else {
+				error = 0;
+				ur->ucr_actlen = 0;
+			}
+			break;
+		}
 		len = UGETW(ur->ucr_request.wLength);
 
 		if ((len < 0) || (len > 32767)) {



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