[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.3 51/53] usb/ohci: Set pad to 0 after frame update
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.3 51/53] usb/ohci: Set pad to 0 after frame update |
Date: |
Sun, 28 May 2023 09:59:24 +0300 |
From: Paolo Bonzini <pbonzini@redhat.com>
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>
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 9d68036d23..c3ab762f54 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1210,6 +1210,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)
--
2.39.2
- [Stable-7.2.3 v3 00/42] Patch Round-up for stable 7.2.3, frozen on 2023-05-27, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 46/53] e1000: Count CRC in Tx statistics, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 47/53] e1000e: Fix tx/rx counters, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 49/53] rtl8139: fix large_send_mss divide-by-zero, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 48/53] e1000x: Fix BPRC and MPRC, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 51/53] usb/ohci: Set pad to 0 after frame update,
Michael Tokarev <=
- [Stable-7.2.3 52/53] hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330), Michael Tokarev, 2023/05/28
- [Stable-7.2.3 53/53] machine: do not crash if default RAM backend name has been stolen, Michael Tokarev, 2023/05/28
- [Stable-7.2.3 50/53] util/vfio-helpers: Use g_file_read_link(), Michael Tokarev, 2023/05/28