xhci: add XHCISlot->addressed
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 5 Apr 2013 10:37:32 +0000 (12:37 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 3 Jun 2013 09:37:51 +0000 (11:37 +0200)
Preparing for live-migration support, post_load will need that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c

index 8813bdf904e3d246c99f9e3d88cf5b6bb04f720f..ac683cea44919f6ac28e2be35f41097b7d4089b2 100644 (file)
@@ -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;
 }