Re: Linux USB file storage gadget with new UDC

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

 



Hi,

>> >> Yes, ep0_complete() is called in UDC driver queue function, i just
>> >> added it in and ep0_complete() is called now. The dmesg output is
>> >> below.
>> >
>> > not in queue function, you should call it when completing.
>> >
>>
>> Is there any mistake in my understanding of ep0 setup data processing?
>>
>> 1. usb gadget HW IRQ is triggered if ep0 receives data
>> 2. fsg_setup() is called
>> 3. ep0_queue() is called
>> 4. UDC driver queue function is called
>> 5. UDC driver sends data to ep0 HW buffer
>> 6. UDC driver increments req->actual by the amount of transferred bytes
>> 7. UDC driver call ep0_complete()
>
> looks correct
>

Some progress, now i am able to see the dump_msg from ep0_complete().
It looks like the enumeration is ok, but the SCSI Inquiry command is
not received by the UDC driver. The do_scsi_command() in
fsg_main_thread() is not called. Is this another bug in my UDC driver?

****below is the debug message from file storage gadget****

g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 01 00 00 40 00
g_file_storage gadget: get device descriptor
g_file_storage gadget: ep0-in, length 18:
00000000: 12 01 00 02 00 00 00 40 25 05 a5 a4 33 03 01 02
00000010: 00 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 01 00 00 12 00
g_file_storage gadget: get device descriptor
g_file_storage gadget: ep0-in, length 18:
00000000: 12 01 00 02 00 00 00 40 25 05 a5 a4 33 03 01 02
00000010: 00 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 02 00 00 ff 00
g_file_storage gadget: get configuration descriptor
g_file_storage gadget: ep0-in, length 32:
00000000: 09 02 20 00 01 01 04 c0 01 09 04 00 00 02 08 06
00000010: 50 05 07 05 81 02 00 02 00 07 05 01 02 00 02 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 03 00 00 ff 00
g_file_storage gadget: ep0-in, length 4:
00000000: 04 03 09 04
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 02 03 09 04 ff 00
g_file_storage gadget: get string descriptor
g_file_storage gadget: ep0-in, length 54:
00000000: 36 03 46 00 69 00 6c 00 65 00 2d 00 62 00 61 00
00000010: 63 00 6b 00 65 00 64 00 20 00 53 00 74 00 6f 00
00000020: 72 00 61 00 67 00 65 00 20 00 47 00 61 00 64 00
00000030: 67 00 65 00 74 00
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 01 00 00 12 00
g_file_storage gadget: get device descriptor
g_file_storage gadget: ep0-in, length 18:
00000000: 12 01 00 02 00 00 00 40 25 05 a5 a4 33 03 01 02
00000010: 00 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 02 00 00 09 00
g_file_storage gadget: get configuration descriptor
g_file_storage gadget: ep0-in, length 9:
00000000: 09 02 20 00 01 01 04 c0 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 00 02 00 00 20 00
g_file_storage gadget: get configuration descriptor
g_file_storage gadget: ep0-in, length 32:
00000000: 09 02 20 00 01 01 04 c0 01 09 04 00 00 02 08 06
00000010: 50 05 07 05 81 02 00 02 00 07 05 01 02 00 02 01
g_file_storage gadget: ep0-setup, length 8:
00000000: 00 09 01 00 00 00 00 00
g_file_storage gadget: set configuration
g_file_storage gadget: set interface 0
g_file_storage gadget: high-speed config #1
g_file_storage gadget: ep0-setup, length 8:
00000000: a1 fe 00 00 00 00 01 00
g_file_storage gadget: ep0-in, length 1:
00000000: 00
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 01 03 09 04 ff 00
g_file_storage gadget: get string descriptor
g_file_storage gadget: ep0-in, length 58:
00000000: 3a 03 4c 00 69 00 6e 00 75 00 78 00 20 00 33 00
00000010: 2e 00 34 00 2e 00 34 00 2b 00 20 00 77 00 69 00
00000020: 74 00 68 00 20 00 6b 00 61 00 67 00 65 00 6e 00
00000030: 32 00 5f 00 75 00 73 00 62 00
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 04 03 09 04 ff 00
g_file_storage gadget: get string descriptor
g_file_storage gadget: ep0-in, length 26:
00000000: 1a 03 53 00 65 00 6c 00 66 00 2d 00 70 00 6f 00
00000010: 77 00 65 00 72 00 65 00 64 00
g_file_storage gadget: ep0-setup, length 8:
00000000: 80 06 05 03 09 04 ff 00
g_file_storage gadget: get string descriptor
g_file_storage gadget: ep0-in, length 26:
00000000: 1a 03 4d 00 61 00 73 00 73 00 20 00 53 00 74 00
00000010: 6f 00 72 00 61 00 67 00 65 00

thanks,
victor
--
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


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

  Powered by Linux