Re: Linux USB file storage gadget with new UDC

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

 



On Mon, 7 Jan 2013, victor yeo wrote:

> 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

For testing purposes, you probably should use a Linux host.  Then you
could use usbmon on the host to see what's happening, and there would
be more debugging options available.

> > 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.

This log looks oddly incomplete.  A lot of debugging messages are 
missing.

> g_file_storage gadget: ep0-setup, length 8:
> 00000000: 80 06 00 01 00 00 40 00
> g_file_storage gadget: get device descriptor

For example, right here we should see the device descriptor data that 
was sent back to the host.

> 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
> .........

Where does the enumeration repeat?  I don't see any repeats here, aside
from the fact that Windows asks for the same device and config
descriptors a few times.

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


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

  Powered by Linux