Re: Linux USB file storage gadget with new UDC

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

 



Hi,

>> 1) host PC sends a GET_DESCRIPTOR request, the gadget replies with device
>> descriptor.
>> 2) host PC sends a SET_ADDRESS request
>> 3) host PC sends a GET_DESCRIPTOR request, the gadget replies with the same
>> device descriptor.
>> 4) host PC sends a GET_DESCRIPTOR request, the gadget replies with
>> configuration descriptor.
>> 5) host PC sends a GET_DESCRIPTOR request, the gadget replies with string
>> descriptor.
>> 6) host PC sends a GET_DESCRIPTOR request, the gadget replies with string
>> descriptor.
>> 7) host PC sends a GET_DESCRIPTOR request, the gadget replies with device
>> qualifier descriptor.
>> 8) host PC sends a GET_DESCRIPTOR request, the gadget replies with the same
>> device descriptor.
>> 9) host PC sends a GET_DESCRIPTOR request, the gadget replies with
>> configuration descriptor.
>> 10) host PC sends SET_CONFIGURATION
>> 11) host PC sends 0xfe bRequest
>
> What does the gadget send in response to this request?

In response to this request, class_setup_req() in file_storage.c is
called, then the case US_BULK_GET_MAX_LUN is entered, the fsg->nluns
is 1. The gadget then sends 1 byte of 0x00.

>> How to fix the bulk out endpoint
>> to 1?
>
> Fix your UDC driver.  If it uses the right names for the endpoints then
> usb_ep_autoconfig() will automatically do the right thing.

The bulk out descriptor is defined in storage_common.c, as
"fsg_fs_bulk_out_desc". How to set the names of endpoints so that
usb_ep_autoconfig() can do the right thing?

I use the USBlyzer software on host PC, i can see that SCSI inquiry is
sent out by the host PC, but the gadget device does not receive it,
due to the mis-match bulk out endpoint. Bulk out endpoint is
auto-configured to 2, whereas gadget device bulk out endpoint is 1.

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