qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-stable@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v2 03/10] xhci: Fix reset of MSI function
Date: Thu, 10 May 2012 17:08:19 -0300	[thread overview]
Message-ID: <ccee74fdbf456ea9ad57619e6a16f4ad45ff8dd9.1336680504.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1336680504.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1336680504.git.jan.kiszka@siemens.com>

Call msi_reset on device reset as still required by the core.

CC: Gerd Hoffmann <kraxel@redhat.com>
CC: qemu-stable@nongnu.org
Signed-off-by: Jan Kiszka <jan.kiszka@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

  parent reply	other threads:[~2012-05-10 20:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 20:08 [Qemu-devel] [PATCH v2 00/10] msi: Refactorings and reset fixes Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 01/10] ahci: Fix reset of MSI function Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 02/10] intel-hda: " Jan Kiszka
2012-05-10 20:08 ` Jan Kiszka [this message]
2012-05-11  8:16   ` [Qemu-devel] [PATCH v2 03/10] xhci: " Gerd Hoffmann
2012-05-11 13:07     ` Jan Kiszka
2012-05-11 13:19       ` Gerd Hoffmann
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 04/10] ahci: Clean up reset functions Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 05/10] xhci: Clean up reset function Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 06/10] msi: Guard msi_reset with msi_present Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 07/10] msi: Invoke msi/msix_reset from PCI core Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 08/10] msi: Guard msi/msix_write_config with msi_present Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 09/10] msi: Invoke msi/msix_write_config from PCI core Jan Kiszka
2012-05-10 20:08 ` [Qemu-devel] [PATCH v2 10/10] msi: Use msi/msix_present more consistently Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccee74fdbf456ea9ad57619e6a16f4ad45ff8dd9.1336680504.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).