xairy / raw-gadget

USB Raw Gadget — a low-level interface for the Linux USB Gadget subsystem
333 stars 35 forks source link

Add endpoint FIFO ioctls #12

Open msbroadf opened 3 years ago

msbroadf commented 3 years ago

Is it possible to add an ioctl to get status/clear fifo for an endpoint? Essentially passing these functions through

int usb_ep_fifo_status(struct usb_ep ep); void usb_ep_fifo_flush(struct usb_ep ep);

xairy commented 3 years ago

It should be possible. What's the use case for this?

msbroadf commented 3 years ago

Actually i ended up implementing it quickly myself and just testing to see if it fixed an error i was having, but it didnt resolve it

This call is in gadgetfs and not in raw-gadget so i suspect there will probably be a request sooner or later for it anyway

xairy commented 3 years ago

Those ioctls are in GadgetFS, but I'm wondering what's the actual use case for them.

msbroadf commented 3 years ago

Unfortunately im not exactly sure, im still learning the gadget subystem myself (i usually work on drivers on the other (host) side).

Im using raw-gadget to help passthrough a USB from a remote machine transparently and it was jamming sometimes so i figured this call might be the missing part.