On Mon, Jan 14, 2013 at 11:42:09PM +0300, Sergei Shtylyov wrote: > Hello. > > On 01/14/2013 11:36 PM, Sergei Shtylyov wrote: > > > Serialize usb-storage operations with usbfs and 'cat /proc/bus/usb/devices', > > so that they cannot disturb storage by seemingly harmless control reads. > > > This patch was adapted from 2.4.28 patch by Pete Zaitcev -- which I even had to > > reconstruct as I have never found it in its final form. That patch dates back > > to 2004 and it unfortunately wasn't applied to 2.6 branch in the same form back > > then (it was applied in another form and then immediately reverted). Despite 8+ > > years passing from that moment, the vendors didn't stop producing USB devices > > that require this patch. Two recent examples are SanDisk Cruzer Slice 8GB and > > Kingston DataTraveller 100 G2 32GB. In the latter case, even the enumeration > > fails as the INQUIRY command takes 2.8 seconds to finish, so 'udev' also comes > > into action with its control requests, with neither completing normally. > > > Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> > > Cc: stable@xxxxxxxxxxxxxxx > > > Forgot to mention the side effect of the patch: one can't submit read and > write URB simultaneously via USBDEVFS_BULK ioctl(). That has been dealt in 2.4 > by later patch by Pete, which I can try to port if needed. That's not good, it would need to be part of this patch, we don't want to break that existing functionality. greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html