Closed AristoChen closed 2 years ago
Returning EINVAL
makes more sense indeed. However, this is technically a change to the interface, and USB maintainers might reject it. But feel free to send the patch and I'll ack it. Thanks!
Hi,
I just sent a patch, do I need to send a PR to this repo?
thanks!
Let's wait until the patch is at least in the USB tree, and then I'll pull it in with a script.
Hi,
Orange Pi PC have endpoints from ep1-ep4 for both in and out direction, and if we try to use raw_ioctl_ep_enable() for ep5in, it will return -EBUSY here
https://github.com/xairy/raw-gadget/blob/f74b1c22d3698892ba13c56f8b2273d1eba762e2/raw_gadget/raw_gadget.c#L819
I guess it will be more intuitive if we return some other errno(such as -EINVAL)? Cuz -EBUSY sounds like EP5in is not available now, but might be available in the future
Here is the patch