Re: Testing endpoint halt support for raw-gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Apr 2020, Andrey Konovalov wrote:

> Hi Alan and Greg,
> 
> I've been thinking about what kind of features raw-gadget might be
> missing, that would allow more flexibility in emulating USB devices.
> One of the things that is currently missing is halting endpoints.
> Adding this functionality seems to be fairly easy, but it's unclear to
> me how to test it. Any suggestions?

You should use the usbtest driver along with the testusb program in
tools/usb.  Of course, to do it you will need a userspace driver for
raw-gadget.  usbtest works best with gadget-zero, but it can be used
(in degraded form) with any USB device.

> Also, are there some other features that might make sense to add? I
> see that e.g. GadgetFS has GADGETFS_FIFO_STATUS/FLUSH ioctls. Are
> those useful?

I believe that was included just as an emulation of some existing UDC 
hardware.  It's rather controller-specific, not of general interest.
(The general idea is that the UDC says that an IN request completes 
when its data has been loaded into the controller's FIFO, rather than 
when the data has actually been sent to the host.)

Have you implemented wedge as well as halt?  Wedge is needed for the
mass-storage protocol; as far as I know it isn't used anywhere else.  

And have you given any thought to suspend/resume support?  It's a bit 
tricky because you have to consider both gadget suspend and USB bus 
suspend.

Nothing else springs to mind.

Alan Stern




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux