On Tue, Mar 26, 2013 at 04:14:54PM +0800, victor yeo wrote: > Hi, > > >> >> In the log file, is there any invalid request received on endpoint 0? > >> > > >> > In the usbmon file there is. It is this line: > >> > > >> >> f4ae6f40 1217192721 S Co:2:018:0 s 21 ff 0000 0000 0000 0 > >> > >> ok, i will add code to UDC to instruct hardware to send NAK upon > >> receiving invalid request on endpoint 0. Does it mean that UDC driver > >> has to check for invalid request on endpoint 0? > > > > No. The UDC driver has no way to know whether a request is valid or > > not. Read the description of the "setup" member of the > > usb_gadget_driver structure in the header file. > > > > I read that. The "setup" member of the usb_gadget_driver structure is > pointing to fsg_setup, in file_storage.c. The fsg_setup() function > handles the request on endpoint 0. So how could UDC driver know when > to send NAK? read your controller's manual to figure that out. Gadget driver will return and error code, you need to act on it. -- balbi
Attachment:
signature.asc
Description: Digital signature