On Tue, 26 Mar 2013, victor yeo wrote: > I thought Halt feature is optional. I will add code to instruct > hardware to set the halt feature. I suppose the driver needs to handle > usb_ep_clear_halt() too. Thanks. > > g_file_storage gadget: SCSI command: READ(10); Dc=10, Di=4096; Hc=10, Hi=4096 > g_file_storage gadget-lun0: file read 4096 @ 0 -> 4096 > > About the SCSI_READ_10 command, why is it reading 4096 bytes, as the > MBR(master boot record) is only 512 bytes? Linux always tries to do I/O in chunks of an entire memory page (4 KB). > >> 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. Alan Stern -- 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