On 05/19/2016 03:43 PM, Jan.Huber@xxxxxx wrote: > I'm trying to establish a high performance USB connection from device/gadget to host. On the USB gadget side I'm running on a Atmel ATSAMA5D35-EK. The Linux Kernel version is 4.1 (4.1.0-linux4sam_5.2-00045-g633e08a) and I'm using configfs to set things up. > > I strictly followed the steps according to the presentations from the Embedded Linux Conference 2014 (by Alan Ott and Matt Porter) > > Here is what I did on the USB device side so far: > > # insmod atmel_usba_udc.ko > # insmod usb_f_fs.ko > > # mkdir -p /home/root/configfs > # mount -t configfs none /home/root/configfs > # mkdir -p /home/root/configfs/usb_gadget/g1 > > # echo "0x1a0a" > /home/root/configfs/usb_gadget/g1/idVendor > # echo "0xbadd" > /home/root/configfs/usb_gadget/g1/idProduct > > # mkdir -p /home/root/configfs/usb_gadget/g1/strings/0x409 > # echo "1234" > /home/root/configfs/usb_gadget/g1/strings/0x409/serialnumber > # echo "manufacturer" > /home/root/configfs/usb_gadget/g1/strings/0x409/manufacturer > # echo "product" > /home/root/configfs/usb_gadget/g1/strings/0x409/product > > # mkdir -p /home/root/configfs/usb_gadget/g1/configs/c.1 > # mkdir -p /home/root/configfs/usb_gadget/g1/configs/c.1/strings/0x409 > # echo "Config1" > /home/root/configfs/usb_gadget/g1/configs/c.1/strings/0x409/configuration > > # mkdir -p /home/root/configfs/usb_gadget/g1/functions/ffs.usb0 > # ln -s /home/root/configfs/usb_gadget/g1/functions/ffs.usb0 /home/root/configfs/usb_gadget/g1/configs/c.1 > > # mkdir -p /home/root/ffs > # mount usb0 /home/root/ffs -t functionfs > > # cd /home/root/ffs > # ../ffs-test 64 & > > Setting up the device and functionfs works perfectly fine, but when executing the ffs-test I get the following log messages: > > ffs-test: info: ep0: writing descriptors (in v2 format) > ffs-test: info: ep0: writing strings > ffs-test: dbg: ep1: starting > ffs-test: dbg: ep2: starting > ffs-test: info: ep0: starts > ffs-test: info: ep2: starts > ffs-test: info: ep1: starts > ffs-test: warn: ep1: write: (-19) No such device > ffs-test: warn: ep2: read: (-19) No such device > ffs-test: info: ep1: ends > ffs-test: info: ep2: ends > Event BIND > Event ENABLE > You shouldn't use epX where X != 0 until you get enable event. You may refer to ffs-aio examples which have a suitable flag to wait for that event. In addition I'd recommend you using libusbgx[1] instead of direct configfs manipulation. There is even an example which sets usb gadget with two instances of functionfs[2] Footnotes: 1 - https://github.com/libusbgx/libusbgx 2 - https://github.com/libusbgx/libusbgx/blob/master/examples/gadget-ffs.c Best regards, -- Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics -- 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