Skip to content

Commit 6301460

Browse files
committed
usb/ohci: Set pad to 0 after frame update
When the OHCI controller's framenumber is incremented, HccaPad1 register should be set to zero (Ref OHCI Spec 4.4) ReactOS uses hccaPad1 to determine if the OHCI hardware is running, consequently it fails this check in current qemu master. Signed-off-by: Ryan Wendland <wendland@live.com.au> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1048 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent b03fcd6 commit 6301460

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hw/usb/hcd-ohci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,8 @@ static void ohci_frame_boundary(void *opaque)
12391239
/* Increment frame number and take care of endianness. */
12401240
ohci->frame_number = (ohci->frame_number + 1) & 0xffff;
12411241
hcca.frame = cpu_to_le16(ohci->frame_number);
1242+
/* When the HC updates frame number, set pad to 0. Ref OHCI Spec 4.4.1*/
1243+
hcca.pad = 0;
12421244

12431245
if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) {
12441246
if (!ohci->done) {

0 commit comments

Comments
 (0)