Hi, I have been trying to get a UVC gadget running through configfs and wired in to dummy_hcd. I have largely been following the instructions from the Tizen wiki. https://wiki.tizen.org/USB/Linux_USB_Layers/Configfs_Composite_Gadget/Usage_eq._to_g_webcam.ko However I am getting a hard lockup, I believe when device is started. The system does not respond to any commands, including SYSRQ. A bash script I have been executing to set it all up is attached, as is the log. I am running in a VM against v4.14-rc2. I have the same issues with v4.13 and with the recent setup_timer() patch set. The v4.10 kernel had other issues which have since been corrected. The last log lines are: + echo dummy_udc.0 [ 92.086000] udc dummy_udc.0: registering UDC driver [g1] [ 92.086620] configfs-gadget gadget: adding 'uvc'/ffff9f6ab8a965f0 to config 'c'/ffff9f6aba715520 [ 92.087544] configfs-gadget gadget: uvc_function_bind [ 92.089110] dummy_hcd dummy_hcd.0: port status 0x00010101 has changes ~~~ end of transmission ~~~ Is there anything obvious that I have done wrong or an area I should start looking? I have very little kernel experience but am happy to poke at things with GDB like a small child until something happens. However with the size of the code base I would appreciate some pointers on where to start poking. David
root@vm:~# bash /host/gen_video_cfg.sh + echo -n 'module dummy_hcd +p' + echo -n 'file *usb* +p' + echo -n 'file *gadget* +p' + echo -n 'file *uvc* +p' + echo -n 'file *video* +p' + echo -n 'file *v4l* +p' + echo 8 + modprobe libcomposite + mkdir -p cfg + /bin/mountpoint -q cfg + mount none cfg -t configfs + mkdir -p cfg/usb_gadget/g1 + cd cfg/usb_gadget/g1 + echo 0x2323 + echo 0x1234 + mkdir -p strings/0x409 + echo SERIAL + echo MANUFACTURER + echo PRODUCT + mkdir -p configs/c.1 + mkdir -p configs/c.1/strings/0x409 + echo 120 + mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p [ 92.045271] media: Linux media interface: v0.10 [ 92.048644] Linux video capture interface: v2.00 + cd functions/uvc.usb0 + cat + mkdir streaming/header/h + ln -s streaming/header/h streaming/class/fs + ln -s streaming/header/h streaming/class/hs + ln -s streaming/header/h streaming/class/ss + mkdir control/header/h + ln -s control/header/h control/class/fs + ln -s control/header/h control/class/ss + cd ../.. + ln -s functions/uvc.usb0 configs/c.1 + modprobe dummy_hcd [ 92.065166] dummy_hcd dummy_hcd.0: USB Host+Gadget Emulator, driver 02 May 2005 [ 92.066078] dummy_hcd dummy_hcd.0: Dummy host controller [ 92.066686] dummy_hcd dummy_hcd.0: new USB bus registered, assigned bus number 5 [ 92.067520] usb usb5: default language 0x0409 [ 92.068015] usb usb5: udev 1, busnum 5, minor = 512 [ 92.068540] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002 [ 92.069259] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 92.070055] usb usb5: Product: Dummy host controller [ 92.070586] usb usb5: Manufacturer: Linux 4.14.0-rc2+ dummy_hcd [ 92.071212] usb usb5: SerialNumber: dummy_hcd.0 [ 92.073127] usb usb5: usb_probe_device [ 92.073565] usb usb5: configuration #1 chosen from 1 choice [ 92.074522] usb usb5: adding 5-0:1.0 (config #1, interface 0) [ 92.075945] hub 5-0:1.0: usb_probe_interface [ 92.076423] hub 5-0:1.0: usb_probe_interface - got id [ 92.076969] hub 5-0:1.0: USB hub found [ 92.077420] hub 5-0:1.0: 1 port detected [ 92.078357] hub 5-0:1.0: standalone hub [ 92.078780] hub 5-0:1.0: individual port power switching [ 92.079347] hub 5-0:1.0: global over-current protection [ 92.079908] hub 5-0:1.0: Single TT [ 92.080277] hub 5-0:1.0: TT requires at most 8 FS bit times (666 ns) [ 92.080948] hub 5-0:1.0: power on to power good time: 0ms [ 92.081585] hub 5-0:1.0: local power source is good [ 92.082131] hub 5-0:1.0: no over-current condition exists [ 92.083422] hub 5-0:1.0: enabling power on all ports + echo dummy_udc.0 [ 92.086000] udc dummy_udc.0: registering UDC driver [g1] [ 92.086620] configfs-gadget gadget: adding 'uvc'/ffff9f6ab8a965f0 to config 'c'/ffff9f6aba715520 [ 92.087544] configfs-gadget gadget: uvc_function_bind [ 92.089110] dummy_hcd dummy_hcd.0: port status 0x00010101 has changes
Attachment:
gen_video_cfg.sh
Description: Bourne shell script