On Wed, 20 Sep 2017 g...@novadsp.com wrote: > Hello and thanks > > > Do you mean: Any control-IN data (device to host) never appears on the > wire? After all, you said that bulk reads and writes > > are fine. > > Correct. Data sent via the bulk endpoint is visible. Data sent device to > host on EP0 in response to my vendor commands is not. Now this is very weird > as the host is obviously getting enough traffic on EP0 to acquire > descriptors and strings.
That data is sent internally by the gadgetfs driver, whereas the vendor-specific data is taken from your userspace driver. That is likely the reason for the difference in behavior. > I am mystified. Is there anything internally that might affect EP0 writes > once setup/configuration is complete? Plenty of things could affect it. Without knowing more about your system, I can't be more specific. For example, what UDC driver are you using? And have you tried testing your program with the dummy-hcd driver? > Can you suggest any obvious places further down the stack where I can put > some trace/debug code? This board is a PITA to run under a debugger. Do you get the correct values for the GADGETFS_SETUP event? What is the return value from the write() call where you send the vendor data? If you want to add some debugging output to the kernel's gadgetfs driver, the appropriate place would be inside epo_write() in drivers/usb/gadget/legacy/inode.c. The part following: } else if (dev->state == STATE_DEV_SETUP) { len = min_t(size_t, len, dev->setup_wLength); if (dev->setup_in) { retval = setup_req (dev->gadget->ep0, dev->req, len); is where the data you write gets copied into the kernel and sent to the UDC driver. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html