qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/7] xhci: add XHCISlot->addressed
Date: Mon,  3 Jun 2013 12:05:48 +0200	[thread overview]
Message-ID: <1370253951-12323-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1370253951-12323-1-git-send-email-kraxel@redhat.com>

Preparing for live-migration support, post_load will need that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-xhci.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 8813bdf..ac683ce 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -405,6 +405,7 @@ struct XHCIEPContext {
 
 typedef struct XHCISlot {
     bool enabled;
+    bool addressed;
     dma_addr_t ctx;
     USBPort *uport;
     XHCIEPContext * eps[31];
@@ -2041,6 +2042,7 @@ static TRBCCode xhci_disable_slot(XHCIState *xhci, unsigned int slotid)
     }
 
     xhci->slots[slotid-1].enabled = 0;
+    xhci->slots[slotid-1].addressed = 0;
     return CC_SUCCESS;
 }
 
@@ -2167,6 +2169,7 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
     xhci_dma_write_u32s(xhci, octx, slot_ctx, sizeof(slot_ctx));
     xhci_dma_write_u32s(xhci, octx+32, ep0_ctx, sizeof(ep0_ctx));
 
+    xhci->slots[slotid-1].addressed = 1;
     return res;
 }
 
-- 
1.7.9.7

  parent reply	other threads:[~2013-06-03 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 10:05 [Qemu-devel] [PULL 0/7] usb patch queue Gerd Hoffmann
2013-06-03 10:05 ` [Qemu-devel] [PATCH 1/7] Fix usage of USB_DEV_FLAG_IS_HOST flag Gerd Hoffmann
2013-06-03 10:05 ` [Qemu-devel] [PATCH 2/7] host-libusb: Correct test for USB packet state Gerd Hoffmann
2013-06-03 10:05 ` [Qemu-devel] [PATCH 3/7] pci: add VMSTATE_MSIX Gerd Hoffmann
2013-06-03 10:05 ` Gerd Hoffmann [this message]
2013-06-03 10:05 ` [Qemu-devel] [PATCH 5/7] xhci: add xhci_alloc_epctx Gerd Hoffmann
2013-06-03 10:05 ` [Qemu-devel] [PATCH 6/7] xhci: add xhci_init_epctx Gerd Hoffmann
2013-06-03 10:05 ` [Qemu-devel] [PATCH 7/7] xhci: add live migration support Gerd Hoffmann
2013-06-17 21:18 ` [Qemu-devel] [PULL 0/7] usb patch queue Anthony Liguori

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=1370253951-12323-5-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@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).