assert in dwc2

Host environment

  • Operating system: Ubuntu 22.04.4 LTS

  • OS/kernel version: Linux 6.5.0-25-generic

  • Architecture: aarch64

  • QEMU flavor: 9.0.0

  • QEMU version: commit 7e1c0047

  • QEMU command line:

    cat << EOF | qemu-system-aarch64 -display \
    none -machine accel=qtest, -m 512M -machine raspi2b -m 1G -nodefaults \
    -usb -drive file=null-co://,if=none,format=raw,id=disk0 -device \
    usb-storage,port=1,drive=disk0 -qtest stdio
    readl 0x3f980dfb
    EOF

Description of problem

The following log reveals it:

ERROR:../hw/usb/hcd-dwc2.c:1131:dwc2_hsotg_read: code should not be reached
Bail out! ERROR:../hw/usb/hcd-dwc2.c:1131:dwc2_hsotg_read: code should not be reached
Aborted

Steps to reproduce

cat << EOF | qemu-system-aarch64 -display \
none -machine accel=qtest, -m 512M -machine raspi2b -m 1G -nodefaults \
-usb -drive file=null-co://,if=none,format=raw,id=disk0 -device \
usb-storage,port=1,drive=disk0 -qtest stdio
readl 0x3f980dfb
EOF