commit | 20de859ff003ac7bbc17140b4ed36e8788a98178 | [log] [tgz] |
---|---|---|
author | Troy Lee <troy_lee@aspeedtech.com> | Fri Feb 10 14:15:09 2023 +0800 |
committer | Troy Lee <troy_lee@aspeedtech.com> | Fri Mar 03 15:10:46 2023 +0800 |
tree | 460a4375355bc903466e9bf876c9370542548aae | |
parent | a6a4da401acef16c2149e91853a9e0595a7c7fb6 [diff] |
Potentially connect udc device incorrectly The fs::directory_iterator doesn't specify the order of enumeration of folders. The if-condition here doesn't prevent the folder other than gadget port, e.g. 1e6a0000.usb-vhub:pX, be taken into account, e.g. power folder. In this case, an exception will be generate internally in connect(). This patch add another check to make sure the folder is a gadget port. Without this patch, occasionally obmc-ikvm shows below message and failed to enumerate USB-HID gadget devices (mouse and keyboard). ``` [ 101.840770] Error: Driver 'configfs-gadget' is already registered, aborting... [ 101.848547] UDC core: obmc_hid: driver registration failed: -16 ``` Tested with evb-ast2500 to connect VM, then launch KVM and disconnect for several times. Fixes: c11257d864ff ("Connect HID gadget device dynamically") Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Change-Id: I0cad041d69d580a544e60c79e1c991482ca79819
The obmc-ikvm application is a VNC server that provides access to the host graphics output. The application interfaces with the video device on the BMC that captures the host graphics, and then serves that video data on the RFB (remote framebuffer, also known as VNC) protocol. The application also interfaces with the BMC USB gadget device to pass HID events from the BMC to the host, allowing the user to interact with the host system.
Once the host is running and an appropriate HID gadget device is instantiated on the BMC, the application can be started with the following command: obmc-ikvm -v <video device path> -i <HID gadget device path>
For example:
obmc-ikvm -v /dev/video0 -i /dev/hidg0