David: I'm going to send all the changes I made over the weekend to you, since they fall under your bailiwick. You'll probably want to alter some of them, maybe even reject one of them entirely.
This patch for usbtest fixes three problems with test 10. (I didn't look at any of the other tests.) Misleading error messages are eliminated by unlinking URBs in the expected sequence (i.e., starting with the one after the most recently terminated URB). If there's an error in submission of the first test URB, don't wait for any URBs to complete. That happened in some of my tests, and of course the driver just hung. Free the usbtest_dev structure! This was a rather surprising memory leak. Alan Stern ===== usbtest.c 1.30 vs edited ===== --- 1.30/drivers/usb/misc/usbtest.c Mon Jul 14 16:35:15 2003 +++ edited/drivers/usb/misc/usbtest.c Mon Jul 21 09:34:02 2003 @@ -695,8 +695,9 @@ */ /* unlink whatever's still pending */ - for (i = 0; i < ctx->param->sglen; i++) { - struct urb *u = ctx->urb [i]; + for (i = 1; i < ctx->param->sglen; i++) { + struct urb *u = ctx->urb [ + (i + subcase->number) % ctx->param->sglen]; if (u == urb || !u->dev) continue; @@ -893,7 +894,8 @@ /* FIXME set timer and time out; provide a disconnect hook */ /* wait for the last one to complete */ - wait_for_completion (&context.complete); + if (context.pending > 0) + wait_for_completion (&context.complete); cleanup: for (i = 0; i < param->sglen; i++) { @@ -1374,6 +1376,7 @@ usb_set_intfdata (intf, NULL); info ("unbound %s", dev->id); + kfree (dev); } /* Basic testing only needs a device that can source or sink bulk traffic. ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel