usb: Enable USB3 for Spice USB passthrough
Instead of having two times the check if the USB3 setting needs to be added to the config string it is now checked at one place only. If USB3 is checked for a non USB3 device it will be attached to the USB2 root hub of the xhci controller. Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
799aed74d9
commit
511e9b0131
@ -19,7 +19,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
} else if(field.inputValue === 'port') {
|
||||
portfield.setDisabled(!newValue);
|
||||
} else if(field.inputValue === 'spice') {
|
||||
usb3field.setDisabled(newValue);
|
||||
usb3field.setDisabled(!newValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -66,14 +66,15 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
case 'hostdevice':
|
||||
case 'port':
|
||||
val = me.down('pveUSBSelector[name=' + type + ']').getUSBValue();
|
||||
if (!/usb3/.test(val) && me.down('field[name=usb3]').getValue() === true) {
|
||||
val += ',usb3=1';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw "invalid type selected";
|
||||
}
|
||||
|
||||
if (values.usb3) {
|
||||
delete values.usb3;
|
||||
val += ',usb3=1';
|
||||
}
|
||||
values[me.confid] = val;
|
||||
return values;
|
||||
},
|
||||
@ -131,7 +132,7 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
{
|
||||
xtype: 'checkbox',
|
||||
name: 'usb3',
|
||||
submitValue: false,
|
||||
inputValue: true,
|
||||
reference: 'usb3',
|
||||
fieldLabel: gettext('Use USB3')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user