On Thu, 19 Nov 2009, Alexey Kuznetsov wrote: > Hello! > > > Alexey, have you seen the patches I posted? > > Sorry, I have not. > > > > It does what you want to accomplish and more. > > Yes, it looks like this. > > I am no expert in this area and cannot tell exactly. > > I can only suggest a practical way to test the patch: you take some USB flash > (the older and the slower is the better, usb1.1 flash is the best), > then do the following: > > for (;;) { > usb_detach_kernel_driver_np(handle, 0); > usleep(1000*(random() % 10000)); > usb_attach_kernel_driver_np(handle, 0); > usleep(1000*(random() % 10000)); > } > > (handle is libusb handle for the device) > > Unpatched kernels crash almost instantly. Using an old kernel without any patches, the test crashed twice: once after 10 iterations and once after 49 iterations. Using a new kernel with my patches, the test ran okay for 100 iterations. Not an exhaustive check, to be sure, but a good sign. The test is rather slow, since each iteration requires an average of 10 seconds. The patches were submitted during October and I still haven't received any feedback at all from James Bottomley regarding them. In fact, James hasn't responded to any of my emails for several months. Andrew, can you do anything to help get these four patches reviewed and (hopefully) merged? They are: http://marc.info/?l=linux-scsi&m=125675695827770&w=2 http://marc.info/?l=linux-scsi&m=125675696627788&w=2 http://marc.info/?l=linux-scsi&m=125675698027801&w=2 http://marc.info/?l=linux-scsi&m=125675699627826&w=2 Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html