Hi,

>> Now the endpoint address is ok, i guess.
>> After i do insmod usbmon, g_file_storage, and my UDC driver, the
>> "lsusb -v" shows nothing.
>
> usbmon doesn't do anything on the gadget side; it is meant to be used
> on the host.  The same is true for lsusb.
>
>> Should my UDC driver provide the info in
>> /sys/bus/usb folder?
>
> No.
>

Yes, usbmon requires usb host side support (i enable them both to use
usbmon). So i disable the usbmon and usb host side support in
menuconfig. Then i rebuild linux again. Subsequently, the /sys/bus
does not contain usb folder.

# ls /sys/bus/
clocksource  cpu          mmc          platform     sdio         spi

> Did you enable the two debugging options in file_storage.c?  And did
> you remember to enable CONFIG_USB_GADGET_DEBUG in the kernel
> configuration?  What shows up in the dmesg log?

Yes, i enable the CONFIG_USB_GADGET_DEBUG and the VERBOSE_DEBUG and
DUMP_MSGS in file_storage.c. In dmesg log, there are lot of entries
recorded during usb gadget enumeration with host PC. After gadget
receives "get MAX LUN", the enumeration process gets repeated. Is this
the problem?? Please see the dmesg log below.

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-setup, length 8:
00000000: 80 06 00 01 00 00 12 00
g_file_storage gadget: get device descriptor
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-setup, length 8:
00000000: 80 06 00 03 00 00 ff 00
g_file_storage gadget: get string descriptor
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-setup, length 8:
00000000: 80 06 00 06 00 00 0a 00
g_file_storage gadget: get device qualifier
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-setup, length 8:
00000000: 80 06 00 02 00 00 09 00
g_file_storage gadget: get configuration descriptor
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-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: get max LUN

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-setup, length 8:
00000000: 80 06 04 03 09 04 ff 00
g_file_storage gadget: get string descriptor

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-setup, length 8:
00000000: 80 06 00 01 00 00 40 00
g_file_storage gadget: get device descriptor
.........

Thanks,
victor
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to