]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/usb/hcd-ehci: Remove unused EHCIfstn structure and dead code
authorJamin Lin <jamin_lin@aspeedtech.com>
Fri, 24 Apr 2026 08:05:12 +0000 (08:05 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 24 Apr 2026 19:27:22 +0000 (21:27 +0200)
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 <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-ID: <20260424080508.53992-3-jamin_lin@aspeedtech.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/usb/hcd-ehci.c
hw/usb/hcd-ehci.h

index 57f930b09988c06c065f2117e25f08e239b117de..23167bf96f38f0a4cd53c88e496a714622e9f137 100644 (file)
@@ -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
index 0ae8c06331aba84f63630d1c23e34f4cb3a18c61..3aec0e047c90b0b071f04f273cc832fd92a7ccba 100644 (file)
@@ -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,