Re: A few questions about gadgetfs

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

 



Hi Alan,

Another question. According to the USB spec:

"""
The Data stage of a control transfer from an endpoint to the host is
complete when the endpoint does one of the following:
* Has transferred exactly the amount of data specified during the Setup stage
* Transfers a packet with a payload size less than wMaxPacketSize or
transfers a zero-length packet
"""

AFAIU, this means that a device only needs to send a zero-length
packet when the last data packet happened to be equal to
wMaxPacketSize to indicate that the data stage is over. Gadgetfs seems
to be doing something different, it sets the req->zero flag (for the
response passed to usb_ep_queue) when value < w_length, where value is
the length of the response being submitted and w_length is the value
of the wLength field of the control request. Is there something I
misunderstand?

Thanks!



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

  Powered by Linux