Re: Linux USB file storage gadget with new UDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>> I modified the UDC driver to send out zero length data packet. Now the
>> linux host is able to see the USB gadget as a mass storage device and
>> read from USB gadget. However, writing to USB gadget fails. The
>> SCSI_WRITE_10 command often receives (-104). The usbmon trace showing
>> this failure is attached. Is the bulk-out endpoint unable to receive
>> command and data continuously, due to error in UDC driver?
>
> It looks like the data gets received okay.  I can't tell what's going
> wrong because you did not post the gadget log showing the WRITE
> commands.

When writing to USB gadget from Linux host, the SCSI_WRITE_10 command
is sent out from the Linux host, but the USB gadget receives zero
length packet. And after a long wait of 30 seconds, the Linux host
resets the connection (-104). The usbmon trace and the UDC driver log
are attached.

g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31

I think UDC driver receives the zero length packet on bulk out endpoint.

Thanks,
victor
# dmesg
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000<7>g_file_storage gadget: bulk_out_complete --> 0, 0/31

g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:
g_file_storage gadget: bulk_out_complete --> 0, 0/31
[start_transfer] 43425355 c5
ept1 out queue len 0x200, buffer 0xc133c000
g_file_storage gadget: bulk-out, length 0:

Attachment: usbmon_write_gadget2.log
Description: Binary data


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux