Skip to contentSkip to conversation

hw/usb/hcd-ohci: Implement frame number overflow event

PATCH Applied BALATON Zoltan 2 participants 2 messages Feb 12 – Feb 16

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hw/usb/hcd-ohci: Implement frame number overflow event

According to specification 6.5.6 FrameNumberOverflow Event when bit 15 of frame count changes (either from 1 to 0 or 0 to 1) a FrameNumberOverflow interrupt should be generated. This fixes usb-audio on mac99,via=pmu with MacOS 9.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3274

---
v2:
- updated commit message
- added Tested-by and Resolves tags

 hw/usb/hcd-ohci.c | 3 +++
 1 file changed, 3 insertions(+)
hw/usb/hcd-ohci.c +3 -0
index c7e9c71903..f8da16bc8f 100644
@@ -1246,6 +1246,9 @@ static void ohci_frame_boundary(void *opaque)
     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->frame_number == 0x8000 || ohci->frame_number == 0) {
+        ohci_set_interrupt(ohci, OHCI_INTR_FNO);
+    }
 
     if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) {
         if (!ohci->done) {
Signature · 1 line
2.41.3
#1 lore raw
Quoted 9 lines · BALATON Zoltan

According to specification 6.5.6 FrameNumberOverflow Event when bit 15 of frame count changes (either from 1 to 0 or 0 to 1) a FrameNumberOverflow interrupt should be generated. This fixes usb-audio on mac99,via=pmu with MacOS 9.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3274

Quoted 7 lines

---
v2:
- updated commit message
- added Tested-by and Resolves tags

 hw/usb/hcd-ohci.c | 3 +++
 1 file changed, 3 insertions(+)

Applied to target-arm.next, thanks.

-- PMM