PERFORCE change 131433 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sat Dec 22 05:43:01 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131433
Change 131433 by hselasky at 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)) {
More information about the p4-projects
mailing list