- if (! --cntl->checkports)
- ehci_startcompanion(cntl);
-
- struct usb_pipe *pipe = usb_set_address(hub, port, USB_HIGHSPEED);
- if (!pipe) {
- writel(portreg, portsc & ~PORT_PE);
- mutex_unlock(&cntl->usb.resetlock);
- goto done;
- }
- mutex_unlock(&cntl->usb.resetlock);
-
- // Configure port
- int count = configure_usb_device(pipe);
- free_pipe(pipe);
- if (! count)
- // Disable port
- writel(portreg, portsc & ~PORT_PE);
- hub->devcount += count;
-done:
- hub->threads--;
- return;
-