[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 03/10] xhci: Fix reset of MSI function
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH v2 03/10] xhci: Fix reset of MSI function |
Date: |
Thu, 10 May 2012 17:08:19 -0300 |
Call msi_reset on device reset as still required by the core.
CC: Gerd Hoffmann <address@hidden>
CC: address@hidden
Signed-off-by: Jan Kiszka <address@hidden>
---
hw/usb/hcd-xhci.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 5cf1a64..c4079eb 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2296,9 +2296,8 @@ static void xhci_update_port(XHCIState *xhci, XHCIPort
*port, int is_detach)
}
}
-static void xhci_reset(void *opaque)
+static void xhci_reset_full(XHCIState *xhci)
{
- XHCIState *xhci = opaque;
int i;
DPRINTF("xhci: full reset\n");
@@ -2340,6 +2339,14 @@ static void xhci_reset(void *opaque)
xhci->ev_buffer_get = 0;
}
+static void xhci_reset(void *opaque)
+{
+ XHCIState *xhci = opaque;
+
+ msi_reset(&xhci->pci_dev);
+ xhci_reset_full(xhci);
+}
+
static uint32_t xhci_cap_read(XHCIState *xhci, uint32_t reg)
{
DPRINTF("xhci_cap_read(0x%x)\n", reg);
@@ -2506,7 +2513,7 @@ static void xhci_oper_write(XHCIState *xhci, uint32_t
reg, uint32_t val)
}
xhci->usbcmd = val & 0xc0f;
if (val & USBCMD_HCRST) {
- xhci_reset(xhci);
+ xhci_reset_full(xhci);
}
xhci_irq_update(xhci);
break;
--
1.7.3.4
- [Qemu-devel] [PATCH v2 00/10] msi: Refactorings and reset fixes, Jan Kiszka, 2012/05/10
- [Qemu-devel] [PATCH v2 06/10] msi: Guard msi_reset with msi_present, Jan Kiszka, 2012/05/10
- [Qemu-devel] [PATCH v2 08/10] msi: Guard msi/msix_write_config with msi_present, Jan Kiszka, 2012/05/10
- [Qemu-devel] [PATCH v2 07/10] msi: Invoke msi/msix_reset from PCI core, Jan Kiszka, 2012/05/10
- [Qemu-devel] [PATCH v2 09/10] msi: Invoke msi/msix_write_config from PCI core, Jan Kiszka, 2012/05/10
- [Qemu-devel] [PATCH v2 10/10] msi: Use msi/msix_present more consistently, Jan Kiszka, 2012/05/10