On Fri, Mar 17, 2023 at 01:08:43PM +0100, deffo@xxxxxx wrote: > Hi all, > > is the UDC core meant to be used only with CONFIG_MODULES=y? Because I > have the problem, that I want to configure g_ether via CONFIGFS, but > when I do > > ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/g/UDC > > in order to enable the gadget, I get the error: > > [ 314.569798] udc-core: couldn't find an available UDC or it's busy > > Sure g_ether is already enabled via UDC and as such cannot be > configured anymore: > > [ 9.981767] udc 49000000.usb-otg: registering UDC driver [g_ether] > > Trying to disable UDC via: > > echo "" > /sys/kernel/config/usb_gadget/UDC > > won't help either. Am I forced to use modules here? Or am I doing > something wrong? Provided your kernel version is 5.19 or later, you can unbind the UDC from the g_ether driver via sysfs: echo 49000000.usb-otg >/sys/bus/gadget/drivers/g_ether/unbind (or something like that). Once you do that, it should be possible to configure your gadget using configfs. Alan Stern