Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2009 20:13:29 GMT
From:      Sylvestre Gallon <syl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 164896 for review
Message-ID:  <200906222013.n5MKDTlu058057@repoman.freebsd.org>

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

Change 164896 by syl@syl_atuin on 2009/06/22 20:12:52

	- Fix a bug in usb_generic for isochronous control transfer (find by Hans Petter Selasky).
	- Update test2 code.

Affected files ...

.. //depot/projects/soc2009/syl_usb/libusb-tests/transfers/test1/test1.c#6 edit
.. //depot/projects/soc2009/syl_usb/libusb-tests/transfers/test2/test2.c#6 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_generic.c#6 edit

Differences ...

==== //depot/projects/soc2009/syl_usb/libusb-tests/transfers/test1/test1.c#6 (text+ko) ====

@@ -28,11 +28,8 @@
 		dev = libusb_get_device(devh);
 		ret = libusb_control_transfer(devh, 0xa1, 0x03, 0x00, 0x00, data, 2, 10);
 		printf("end tr\n");
-		if (ret == LIBUSB_TRANSFER_COMPLETED) {
-			printf("data = 0x%.2x 0x%.2x\n", data[0], data[1]);
-		} else {
-			printf("transfer failed with 0x%.8x error code\n", ret);
-		}
+		printf("data = 0x%.2x 0x%.2x\n", data[0], data[1]);
+		printf("transfer failed with 0x%.8x error code\n", ret);
 	} else {
 		fprintf(stderr, "\nNo device match or lack of permissions.\n");
 	}

==== //depot/projects/soc2009/syl_usb/libusb-tests/transfers/test2/test2.c#6 (text+ko) ====


==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_generic.c#6 (text+ko) ====

@@ -1070,7 +1070,7 @@
 		if (error) {
 			return (error);
 		}
-		if (length >= sizeof(*req)) {
+		if (length != sizeof(*req)) {
 			xfer->error = USB_ERR_INVAL;
 			goto complete;
 		}



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