On Mon, 4 Apr 2011, Felipe Balbi wrote: > Like I said before: HW requests me to give lengths which are divisible > by wMaxPacketSize. I can't quote parts of the HW docs here, but I *must* > give the HW sizes which are divisible by wMaxPacketSize in case of OUT > transfers. Ah, I didn't realize this. It's ironic then that Mian's patch reducing the size of the CBW request length was just submitted. Well, we can retract that patch easily enough if necessary... This hardware restriction doesn't affect only g_file_storage; you will have to take it into account with _every_ gadget driver. The only general solution is to use a bounce buffer. Collect all but the last partial packet in the gdaget's transfer buffer as usual, then use a private maxpacket-sized buffer for the remainder, which you then copy to the end of the transfer buffer. Alan Stern -- 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