Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Sep 2009 18:46:38 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 168376 for review
Message-ID:  <200909091846.n89Ikc91090128@repoman.freebsd.org>

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

Change 168376 by hselasky@hselasky_laptop001 on 2009/09/09 18:45:53

	
	USB CORE:
	 - Make sure the "control_act" flag is cleared in
	special usbd_transfer_stop/drain case. This fix
	only affect control endpoints, but not during
	normal operation. Only during error injection
	mode this fix makes a difference.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#165 edit

Differences ...

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

@@ -1332,7 +1332,9 @@
 	/* check if there is a length mismatch */
 
 	if (len > xfer->flags_int.control_rem) {
-		DPRINTFN(0, "Length greater than remaining length!\n");
+		DPRINTFN(0, "Length(%d) greater than "
+		    "remaining length(%d)!\n", len,
+		    xfer->flags_int.control_rem);
 		goto error;
 	}
 	/* check if we are doing a short transfer */
@@ -2190,6 +2192,8 @@
 	 */
 	if (!xfer->flags_int.transferring) {
 		DPRINTF("not transferring\n");
+		/* end of control transfer, if any */
+		xfer->flags_int.control_act = 0;
 		return;
 	}
 	/* only set transfer error if not already set */



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