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 <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>
Jamin Lin committed
Apr 24, 2026 at 08:05 UTC
da335e605a70ef141c5eee72aba30109ef3bd5e8
2 files changed
-13
hw/usb/hcd-ehci.c
-6
@@ -1756,16 +1756,10 @@ static int ehci_state_fetchsitd(EHCIState *ehci, int async)
1756
/* Section 4.10.2 - paragraph 3 */
1757
static int ehci_state_advqueue(EHCIQueue *q)
1758
{
1759
-#if 0
1759
/* TO-DO: 4.10.2 - paragraph 2
1760
* if I-bit is set to 1 and QH is not active
1761
* go to horizontal QH
1762
*/
1764
- if (I-bit set) {
1765
- ehci_set_state(ehci, async, EST_HORIZONTALQH);
1766
- goto out;
1767
- }
1768
-#endif
1763
1764
/*
1765
* want data and alt-next qTD is valid
hw/usb/hcd-ehci.h
-7
@@ -202,13 +202,6 @@ typedef struct EHCIqh {
202
#define BUFPTR_SBYTES_SH 5
203
} EHCIqh;
204
205
-/* EHCI spec version 1.0 Section 3.7
206
- */
207
-typedef struct EHCIfstn {
208
- uint32_t next; /* Standard next link pointer */
209
- uint32_t backptr; /* Standard next link pointer */
210
-} EHCIfstn;
211
-
205
enum async_state {
206
EHCI_ASYNC_NONE = 0,
207
EHCI_ASYNC_INITIALIZED,