Received: from eggs.gnu.org ([208.118.235.92]:43617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZi2X-00019U-3c for qemu-devel@nongnu.org; Tue, 07 May 2013 09:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZi2R-0007X3-CA for qemu-devel@nongnu.org; Tue, 07 May 2013 09:34:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZi2R-0007WL-4i for qemu-devel@nongnu.org; Tue, 07 May 2013 09:34:39 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r47DYcVg001251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 May 2013 09:34:38 -0400 From: Gerd Hoffmann Date: Tue, 7 May 2013 15:34:32 +0200 Message-Id: <1367933676-21854-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1367933676-21854-1-git-send-email-kraxel@redhat.com> References: <1367933676-21854-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/6] xhci: add XHCISlot->addressed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Preparing for live-migration support, post_load will need that. Signed-off-by: Gerd Hoffmann --- 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