forked from xuos/xiuos
Modify xhci functions for USB core
This commit is contained in:
parent
5d240f93ae
commit
545c240c8d
|
@ -861,6 +861,21 @@ int usbh_get_xhci_devaddr(usbh_pipe_t *pipe)
|
|||
|
||||
|
||||
int xhci_usbh_pipe_free(usbh_pipe_t pipe){
|
||||
int ret = 0;
|
||||
struct xhci_endpoint *ppipe = (struct xhci_endpoint *)pipe;
|
||||
|
||||
if (!ppipe) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
struct usbh_urb *urb = ppipe->urb;
|
||||
if (urb) {
|
||||
usbh_kill_urb(urb);
|
||||
}
|
||||
|
||||
size_t flags = usb_osal_enter_critical_section();
|
||||
xhci_endpoint_close(ppipe);
|
||||
usb_osal_leave_critical_section(flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue