Call msi_reset on device reset as still required by the core. CC: Gerd Hoffmann <kra...@redhat.com> CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- 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