diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c index 03cc796db..f52dcb11c 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c @@ -1040,25 +1040,7 @@ int IPC_DO_SERVE_FUNC(Ipc_xhci_intr)(void* ignore) } -#if 0 - -int IPC_DO_SERVE_FUNC(Ipc_wait_xhci_intr)(void* ignore) -{ - // delay the this handle -#if 0 - while (!has_one_interrupt) { - yield(SYS_TASK_YIELD_NO_REASON); - } -#endif - // serve can be done by now - - return 0; -} -#endif - IPC_SERVER_INTERFACE(Ipc_xhci_intr, 1); -// IPC_SERVER_THREAD_INTERFACE(Ipc_wait_xhci_intr, 1); -// IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 2, Ipc_xhci_intr, Ipc_wait_xhci_intr); IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 1, Ipc_xhci_intr); int bind_xhci_intr(void *para){ @@ -1068,5 +1050,13 @@ int bind_xhci_intr(void *para){ exit(1); } + static char prog_name[] = "xhci0-intr-server"; + if (register_server(prog_name) < 0) { + printf("register server name: %s failed.\n", prog_name); + exit(1); + } + + ipc_server_loop(&IpcXhciIntrHandler); + return 0; }