Implanting xhci_run and some free functions

This commit is contained in:
xj 2024-07-29 04:51:48 -07:00
parent f322fce778
commit 1bc171a131
1 changed files with 6 additions and 5 deletions

View File

@ -1157,11 +1157,12 @@ static void xhci_dcbaa_free ( struct xhci_host *xhci ) {
USB_ASSERT ( xhci->dcbaa.context[i] == 0 ); USB_ASSERT ( xhci->dcbaa.context[i] == 0 );
/* Clear DCBAA pointer */ /* Clear DCBAA pointer */
xhci_writeq ( xhci, 0, xhci->op + XHCI_OP_DCBAAP ); // xhci_writeq ( xhci, 0, xhci->op + XHCI_OP_DCBAAP );
xhci_writeq ( xhci, 0, xhci->op_addr + XHCI_OP_DCBAAP );
/* Free DCBAA */ /* Free DCBAA */
len = ( ( xhci->slots + 1 ) * sizeof ( xhci->dcbaa.context[0] ) ); len = ( ( xhci->slots + 1 ) * sizeof ( xhci->dcbaa.context[0] ) );
usb_free ( xhci->dcbaa.context ); // usb_free ( xhci->dcbaa.context );
} }
/** /**
@ -1230,9 +1231,9 @@ void xhci_close ( struct xhci_host *xhci ) {
USB_ASSERT ( xhci->slot[i] == NULL ); USB_ASSERT ( xhci->slot[i] == NULL );
xhci_stop ( xhci ); xhci_stop ( xhci );
usb_free (xhci->evts); // usb_free (xhci->evts);
usb_free (xhci->eseg); // usb_free (xhci->eseg);
usb_free (xhci->cmds); // usb_free (xhci->cmds);
xhci_scratchpad_free ( xhci ); xhci_scratchpad_free ( xhci );
xhci_dcbaa_free ( xhci ); xhci_dcbaa_free ( xhci );
usb_free ( xhci->slot ); usb_free ( xhci->slot );