diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-05-23 17:58:40 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-05-26 10:49:10 +0300 |
commit | 9d622451fdf9693a2265d5c04b041627f81d8c1d (patch) | |
tree | 5ac963feb1836de5d0a34b0a5af202fe839f9aef /hw/usb | |
parent | 668aeea0ecb651ce3d8e42cc4fa59e29dd9f009e (diff) |
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>
(cherry picked from commit 6301460ce9f59885e8feb65185bcfb6b128c8eff)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/hcd-ohci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 88d2b4b13c..cc5cde6983 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1239,6 +1239,8 @@ static void ohci_frame_boundary(void *opaque) /* Increment frame number and take care of endianness. */ ohci->frame_number = (ohci->frame_number + 1) & 0xffff; hcca.frame = cpu_to_le16(ohci->frame_number); + /* When the HC updates frame number, set pad to 0. Ref OHCI Spec 4.4.1*/ + hcca.pad = 0; if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) { if (!ohci->done) { |