@samitouri / QOSamiQemu / commits / 11b30c864a

hw/usb/hcd-ehci: Implement 64-bit siTD descriptor addressing

EHCI supports 64-bit control data structure addressing when the 64-bit Addressing Capability bit in HCCPARAMS is set. In that mode, the CTRLDSSEGMENT register provides the upper 32 bits that are concatenated with 32-bit link pointer values to form full 64-bit descriptor addresses (EHCI 1.0, section 2.3.5 and Appendix B). siTD link pointers are stored as 32-bit values and must be expanded to full 64-bit descriptor addresses when 64-bit mode is enabled. Update the siTD traversal path to use ehci_get_desc_addr() when following link pointers. When 64-bit capability is disabled, descriptor addresses remain 32-bit and existing behaviour is unchanged. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260713032704.3583103-7-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>

Jamin Lin committed Jul 13, 2026 at 03:27 UTC 11b30c864a2562af9708b6648dbf4d60124687f9
1 file changed +1 -1
hw/usb/hcd-ehci.c
+1 -1
@@ -1823,7 +1823,7 @@ static int ehci_state_fetchsitd(EHCIState *ehci, int async)
1823 warn_report("Skipping active siTD");
1824 }
1825
1826 - ehci_set_fetch_addr(ehci, async, sitd.next);
1826 + ehci_set_fetch_addr(ehci, async, ehci_get_desc_addr(ehci, sitd.next));
1827 ehci_set_state(ehci, async, EST_FETCHENTRY);
1828 return 1;
1829 }