diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/xhci.c index 5dec2e413..7d0746025 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/xhci.c @@ -319,7 +319,7 @@ static unsigned int xhci_extended_capability ( struct xhci_host *xhci, */ static void xhci_legacy_init ( struct xhci_host *xhci ) { unsigned int legacy; - uint8_t bios; + uint32_t bios; /* Locate USB legacy support capability (if present) */ legacy = xhci_extended_capability ( xhci, XHCI_XECP_ID_LEGACY, 0 ); @@ -1633,7 +1633,7 @@ static void xhci_abort ( struct xhci_host *xhci ) { /* Abort the command */ USB_LOG_WRN("XHCI %s aborting command\n", xhci->name ); - xhci_writeq ( xhci, XHCI_CRCR_CA, xhci->op + XHCI_OP_CRCR ); + xhci_writeq ( xhci, XHCI_CRCR_CA, xhci->op_addr + XHCI_OP_CRCR ); /* Allow time for command to abort */ usb_osal_msleep ( XHCI_COMMAND_ABORT_DELAY_MS ); @@ -1649,7 +1649,7 @@ static void xhci_abort ( struct xhci_host *xhci ) { /* Reset the command ring control register */ memset(xhci->cmds->ring, 0U, XHCI_RING_ITEMS * sizeof(union xhci_trb)); - xhci_writeq ( xhci, ( (uint64_t)(uintptr_t)xhci->cmds | xhci->cmds->cs ), xhci->op + XHCI_OP_CRCR ); + xhci_writeq ( xhci, ( (uint64_t)(uintptr_t)xhci->cmds | xhci->cmds->cs ), xhci->op_addr + XHCI_OP_CRCR ); } /** @@ -1837,7 +1837,9 @@ static int xhci_context ( struct xhci_host *xhci, struct xhci_slot *slot, } err_command: + #if 0 usb_free ( input ); + #endif err_alloc: return rc; } @@ -2203,6 +2205,7 @@ static void xhci_configure_endpoint_input ( struct xhci_host *xhci, /* Populate control context */ control_ctx = input; + /* see XHCI.pdf page 119 */ control_ctx->add = CPU_TO_LE32 (( 1 << XHCI_CTX_SLOT ) | ( 1 << endpoint->ctx ) ); control_ctx->drop = CPU_TO_LE32 (( 1 << XHCI_CTX_SLOT ) | ( 1 << endpoint->ctx ) );