On Thu, 9 May 2013, victor yeo wrote: > The "BUG: scheduling while atomic" is solved. Need to add extra > spinlock functions for req->complete() as below: > spin_unlock(&dev->lock); > req->complete(ep, req); > spin_lock(&dev->lock); Yes, I forgot to mention that. > Now, the SCSI_WRITE_10 command is received but the data is not > received. There is disconnect or port reset after SCSI_WRITE_10 > command. Please see below: > > [start_transfer] 613e2d71 61757463 > ept1 out queue len 0x200, buffer 0xc1338000 > g_file_storage gadget: bulk-out, length 31: > 00000000: 55 53 42 43 f6 00 00 00 00 02 00 00 00 00 0a 2a > 00000010: 00 00 00 00 01 00 00 01 00 00 00 00 80 b7 21 > EP1 OUT IRQ 0x28 > g_file_storage gadget: disconnect or port reset Obviously this "disconnect or port reset" message is related to the "EP1 OUT IRQ 0x28" line above. But why? It looks like another bug. I see you still haven't fixed the last three bytes in the bulk-out transfer. 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