]> git.proxmox.com Git - qemu.git/blobdiff - hw/usb-ohci.c
usb-ohci: Fix endianness issue
[qemu.git] / hw / usb-ohci.c
index 23b5e2146fd155616dcaad1620215304be25d848..83d1a5c9340fb9a236513a1f3f2abe56e5074b5b 100644 (file)
@@ -1150,9 +1150,9 @@ static void ohci_frame_boundary(void *opaque)
     /* Frame boundary, so do EOF stuf here */
     ohci->frt = ohci->fit;
 
-    /* XXX: endianness */
+    /* Increment frame number and take care of endianness. */
     ohci->frame_number = (ohci->frame_number + 1) & 0xffff;
-    hcca.frame = cpu_to_le32(ohci->frame_number);
+    hcca.frame = cpu_to_le16(ohci->frame_number);
 
     if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) {
         if (!ohci->done)