aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev-monitor.c4
-rw-r--r--hw/qxl.c8
-rw-r--r--hw/usb/hcd-ehci.c4
-rw-r--r--hw/usb/host-linux.c9
4 files changed, 16 insertions, 9 deletions
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index a06748c37e..eed781d2f0 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -158,7 +158,7 @@ int qdev_device_help(QemuOpts *opts)
* for removal. This conditional should be removed along with
* it.
*/
- if (!prop->info->parse) {
+ if (!prop->info->set) {
continue; /* no way to set it, don't show */
}
error_printf("%s.%s=%s\n", driver, prop->name,
@@ -166,7 +166,7 @@ int qdev_device_help(QemuOpts *opts)
}
if (info->bus_info) {
for (prop = info->bus_info->props; prop && prop->name; prop++) {
- if (!prop->info->parse) {
+ if (!prop->info->set) {
continue; /* no way to set it, don't show */
}
error_printf("%s.%s=%s\n", driver, prop->name,
diff --git a/hw/qxl.c b/hw/qxl.c
index 6c11e70049..3da3399934 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1746,13 +1746,16 @@ static int qxl_init_common(PCIQXLDevice *qxl)
switch (qxl->revision) {
case 1: /* spice 0.4 -- qxl-1 */
pci_device_rev = QXL_REVISION_STABLE_V04;
+ io_size = 8;
break;
case 2: /* spice 0.6 -- qxl-2 */
pci_device_rev = QXL_REVISION_STABLE_V06;
+ io_size = 16;
break;
case 3: /* qxl-3 */
default:
pci_device_rev = QXL_DEFAULT_REVISION;
+ io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
break;
}
@@ -1770,11 +1773,6 @@ static int qxl_init_common(PCIQXLDevice *qxl)
memory_region_init_alias(&qxl->vram32_bar, "qxl.vram32", &qxl->vram_bar,
0, qxl->vram32_size);
- io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
- if (qxl->revision == 1) {
- io_size = 8;
- }
-
memory_region_init_io(&qxl->io_bar, &qxl_io_ops, qxl,
"qxl-ioports", io_size);
if (qxl->id == 0) {
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 4ff4d40a8c..e759c996ce 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1091,8 +1091,8 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
break;
case USBSTS:
- val &= USBSTS_RO_MASK; // bits 6 thru 31 are RO
- ehci_clear_usbsts(s, val); // bits 0 thru 5 are R/WC
+ val &= USBSTS_RO_MASK; // bits 6 through 31 are RO
+ ehci_clear_usbsts(s, val); // bits 0 through 5 are R/WC
val = s->usbsts;
ehci_set_interrupt(s, 0);
break;
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index 048f8ffa8b..a95b0eda55 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -1058,6 +1058,15 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p,
ret = usb_host_set_interface(s, index, value);
trace_usb_host_req_emulated(s->bus_num, s->addr, p, ret);
return ret;
+
+ case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
+ if (value == 0) { /* clear halt */
+ int pid = (index & USB_DIR_IN) ? USB_TOKEN_IN : USB_TOKEN_OUT;
+ ioctl(s->fd, USBDEVFS_CLEAR_HALT, &index);
+ clear_halt(s, pid, index & 0x0f);
+ trace_usb_host_req_emulated(s->bus_num, s->addr, p, 0);
+ return 0;
+ }
}
/* The rest are asynchronous */