Hi, >> I do not know when to set the Halt feature for the bulk-in endpoint. I >> see gadget code have this line printed out: >> g_file_storage gadget: bulk-in set halt > > The UDC driver is supposed to set the Halt feature when the set_halt() > routine in the usb_ep_ops table is called with a nonzero second > argument. Also when the set_wedge() routine is called -- the > difference is that with set_wedge(), the driver should ignore > Clear-Halt requests from the host. > > All of this material is documented in include/linus/usb/gadget.h. Why > don't you read that file? > 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? >> 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? 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