On Sat, 3 Feb 2024, Christian Gudrian wrote:
Hello!

I am trying to access a USB audio hardware (a Korg Kronos synthesizer)
running an ancient 2.6.32.11 kernel (due to the binary only Korg driver
modules) via USB pass through. Loading the audio driver immediately
leads to a reset of the EHCI controller due to a "processing error"
caused by the 17th ITD being fetched.

Entirely ignorant of what I'm doing I've patched hcd-ehci.c to accept
this 17th ITD. Needless to say that this attempt didn't work: the
refcount warning in the qh_get function (in ehci-mem.c) triggers and the
system halts.

Is this a direct consequence of me allowing 17 ITDs or is this caused by
another part of the Korg driver misbehaving or a bug in the EHCI
emulation of QEMU? How can I find out, what's going wrong?

It's hard to tell, I don't know EHCI but there's a TODO comment near that error so maybe there's some EHCI feature not emulated that you may need to implement in QEMU there. I guess you'd need to check the EHCI specification or the docs of the actual chip that is emulated for info on how this should work.

Also to get more debugging info to see what's happening you can add --trace enable="usb*" (or see qemu/hw/usb/trace-events for the list of trace points available that could be enabled individually) in case you were not aware of that. There are several ways to enable trace points, see QEMU docs on that. Apart from the simple enable=pattern these can also be controlled from QEMU monitor or put the list in a text file and use that with --trace to enable several of these.

Regards,
BALATON Zoltan

Reply via email to