Hi,

On Wed, Jan 23, 2013 at 07:17:44PM +0800, victor yeo wrote:
> >> >> In fsg_dev structure, there are 3 usb_ep: bulk_in, bulk_out, and
> >> >> intr_in. Why is the intr_out endpoint not defined?
> >> >
> >> > because it's not needed. Read the USB Mass Storage Class specification
> >> > from usb.org
> >>
> >> Ok. In the gadget driver, it keeps on receiving the same bulk_out
> >> data, maybe because the data is not processed. The get_next_command is
> >> not called.
> >>
> >> g_file_storage gadget: bulk-out, length 31:
> >> 00000000: 55 53 42 43 38 b5 ea 86 24 00 00 00 80 00 06 12
> >> 00000010: 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00^C
> >> g_file_storage gadget: bulk_out_complete --> 0, 31/0
> >>
> >> Is it because the bh->bulk_out_intended_length is 0?
> >
> > that data is a CBW. But aparently gadget driver queued 0-bytes, why did
> > you unload data if req->length was zero ?
> >
> > another bug in your udc driver
> 
> In my udc driver, i set the req->length to the number of bytes i
> received from HW, which is 31 bytes. Is it necessary to do that? How

you shouldn't touch req->lenght, you should only update req->actual.
req->length is readonly for the UDC.

> to know the gadget driver queued 0-bytes? By
> bh->bulk_out_intended_length ?

read req->length

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to