On Fri, 4 Jan 2013, victor yeo wrote: > Hi, > > >> Replying my email, i set the ep,name to ep1 for bulk out and bulk in > >> endpoints. The ep_matches() in epautoconf.c is able to auto-configure > >> the bulk out to endpoint 1. > > > > Are you sure the name string is set to "ep1" for both endpoints? (Or > > "ep1in" and "ep1out"?) If the string was instead set to "ep" or > > "ep-bulk" or something like that, then it would make sense for the > > auto-configured bulk-out endpoint address to be 2. > > > > You should add some printk statements to the ep_matches() routine in > > epautoconf.c so you can see exactly what it is doing. > > Yes, i change the name string to "ep1" for both endpoints [ Before > that, it is ep-a, ep-b, and bulk-out endpoint auto-configured to 2 ]. > In ep_matches(), the isdigit(ep->name[2]) if-condition is fulfilled. > In fsg_bind(), after the usb_ep_autoconfig() for bulk-out returns, the > fsg_fs_bulk_out_desc.bEndpointAddress is 1. Looking more closely at the ep_matches() code, I don't understand why it didn't work before. Both bulk endpoints should have been assigned number 1 because gadget->in_epnum and gadget->out_epnum should both have been equal to zero originally. Can you figure out what went wrong? > >> however, i only see one SCSI_INQUIRY command being sent out, and it is > >> not received by the gadget device. > > > > There could be other reasons for this, like an incorrect data toggle > > value. Are you certain the endpoint address is wrong? Can you post > > the usbmon trace and the output from "lsusb -v" for the gadget? > > > > Now the endpoint address is ok, i guess. > After i do insmod usbmon, g_file_storage, and my UDC driver, the > "lsusb -v" shows nothing. usbmon doesn't do anything on the gadget side; it is meant to be used on the host. The same is true for lsusb. > Should my UDC driver provide the info in > /sys/bus/usb folder? No. Did you enable the two debugging options in file_storage.c? And did you remember to enable CONFIG_USB_GADGET_DEBUG in the kernel configuration? What shows up in the dmesg log? 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