On Mon, 21 Apr 2014, Felipe Balbi wrote: > Hi, > > On Wed, Apr 02, 2014 at 10:37:58AM -0500, Felipe Balbi wrote: > > Hi, > > > > I've been toying with the idea of implementing USB2 test mode support to > > xhci-hub.c *but* the thing isn't straight forward in xHCI as it is in > > dwc3 peripheral side. > > > > Here are the questions: > > > > 1) How to figure out if $this xhci is the USB2 root hub not USB3 ? Check hcd->speed. One of them is set to HCD_USB2 and the other to HCD_USB3. > > 1) What to do if user sends e.g. SetPortFeature(TEST_J) to USB3 Root > > hub ? Should we stall or just ignore ? If you don't support the request, stall. > > 2) Is there any easy way to disable all port slots ? > > > > 3) Is there an abstraction for toggling run/stop bit ? (I guess so) Yes, the abstraction is "suspend the root hub". Probably not what you're looking for, though... > > 5) Should we expose that through debugfs to avoid having to cook up a > > Control Request with e.g. libusb ? (this is only needed for debugging) Depends on exactly what you want to expose. (Also, it's probably easier to cook up requests by going directly through usbfs rather than using libusb.) 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