From: Jamin Lin Date: Fri, 24 Apr 2026 08:05:12 +0000 (+0000) Subject: hw/usb/hcd-ehci: Remove unused EHCIfstn structure and dead code X-Git-Tag: v11.1.0-rc0~155^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da335e605a70ef141c5eee72aba30109ef3bd5e8;p=thirdparty%2Fqemu.git hw/usb/hcd-ehci: Remove unused EHCIfstn structure and dead code The EHCIfstn structure, defined according to EHCI spec section 3.7, is currently unused in the EHCI implementation. Remove it to reduce unused code and improve maintainability. Additionally, drop a block of disabled (#if 0) code in ehci_state_advqueue() that was never implemented. This code path is incomplete and has no functional impact. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Message-ID: <20260424080508.53992-3-jamin_lin@aspeedtech.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 57f930b0998..23167bf96f3 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1756,16 +1756,10 @@ static int ehci_state_fetchsitd(EHCIState *ehci, int async) /* Section 4.10.2 - paragraph 3 */ static int ehci_state_advqueue(EHCIQueue *q) { -#if 0 /* TO-DO: 4.10.2 - paragraph 2 * if I-bit is set to 1 and QH is not active * go to horizontal QH */ - if (I-bit set) { - ehci_set_state(ehci, async, EST_HORIZONTALQH); - goto out; - } -#endif /* * want data and alt-next qTD is valid diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 0ae8c06331a..3aec0e047c9 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -202,13 +202,6 @@ typedef struct EHCIqh { #define BUFPTR_SBYTES_SH 5 } EHCIqh; -/* EHCI spec version 1.0 Section 3.7 - */ -typedef struct EHCIfstn { - uint32_t next; /* Standard next link pointer */ - uint32_t backptr; /* Standard next link pointer */ -} EHCIfstn; - enum async_state { EHCI_ASYNC_NONE = 0, EHCI_ASYNC_INITIALIZED,