path: root/usbredirserver
diff options
authorHans de Goede <>2012-03-31 16:09:55 +0200
committerHans de Goede <>2012-03-31 16:52:31 +0200
commit0c6cea986b1cf6a5d20778842043475042e1716d (patch)
tree7efbdf16aaab7dcb06bca8a73613f8545b65e1b0 /usbredirserver
parentd81f0ff7053915bb0e5f599af35e071c2751f90d (diff)
usbredirhost: Speed up reset handling
In some cases a usb-guest does multiple resets in a row, these are instant from the guest pov but they are synchronously handled by us. So if a usb-guest does 4 resets in a row (seabios does this) then we can accumulate quite a bit of latency, sometimes so much that guests cancel a submitted transfer because they think it has timed out while we simply have not gotten around to handling it. This patch fixes this issue by speeding up resets in a number of ways: 1) Keep track of a reset state, if the device was reset and no requests were send to it since, this is true. In this case further resets are treated as a no-op. 2) Since the first thing most guests do is a reset, do one as soon as we open the device. 3) Remove the sleep we had in our reset code, as it is not necessary, actually the kernel already fires multiple commands to the device before the libusb_reset_device call returns... Signed-off-by: Hans de Goede <>
Diffstat (limited to 'usbredirserver')
0 files changed, 0 insertions, 0 deletions