Re: Linux USB file storage gadget with new UDC

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

 



Hi,

> You should not be concerned about variables in the gadget driver.  The
> problem is in the UDC driver.
>
> For some examples of what the UDC driver needs to do, look at
> handle_control_request() in drivers/usb/gadget/dummy_hcd.c or the
> "switch (u.r.bRequest)" statement of handle_stat0_irqs() in
> drivers/usb/gadget/net2280.c.
>
> Alan Stern
>

I find some clue. From USB 2.0 Compliance Test Spec, quoted:

"Address State:
1.  Put the device in the configured state following the procedure below.
2.  Issue a valid Set Configuration command to the device with
configuration value zero.
3.  Issue a valid Get Configuration command to the device and verify
that device responds with zero."

I think the address state test in USB2CV fails because
Set-Configuration actually set config #1 and Get-Configuration returns
config #1. See the usb requests log below. It seems that the Set
Configuration command from USB2CV is issued with config value of one.
Isn't it?

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: ep0-setup, length 8:
00000000: 80 08 00 00 00 00 01 00
g_file_storage gadget: get configuration
g_file_storage gadget: ep0-in, length 1:
00000000: 01

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