mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 15:29:57 +00:00
lx_emul: skip USB config setting if already set
Skip SET_CONFIGURATION requests if the device already has the selected config as active config. This workaround prevents issues with Linux guests in VirtualBox and SDC-reader passthrough. Thanks to Peter for the patch.
This commit is contained in:
parent
3d8c1080b1
commit
1dd69eeb6c
@ -366,6 +366,17 @@ static genode_usb_request_ret_t
|
||||
handle_config_request(unsigned cfg_idx, void * data)
|
||||
{
|
||||
struct usb_device * udev = (struct usb_device *) data;
|
||||
|
||||
if (udev && udev->actconfig
|
||||
&& udev->actconfig->desc.bConfigurationValue == cfg_idx) {
|
||||
/*
|
||||
* Skip SET_CONFIGURATION requests if the device already has the
|
||||
* selected config as active config. This workaround prevents issues
|
||||
* with Linux guests in vbox and SDC-reader passthrough.
|
||||
*/
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
return (usb_set_configuration(udev, cfg_idx)) ? UNKNOWN_ERROR : NO_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user