// Set address of port
struct usb_pipe *pipe = usb_set_address(
- hub->cntl, !!(sts.wPortStatus & USB_PORT_STAT_LOW_SPEED));
+ hub, port, ((sts.wPortStatus & USB_PORT_STAT_SPEED_MASK)
+ >> USB_PORT_STAT_SPEED_SHIFT));
if (!pipe)
goto resetfail;
mutex_unlock(&hub->cntl->resetlock);
struct usbhub_s hub;
memset(&hub, 0, sizeof(hub));
hub.pipe = pipe;
- hub.cntl = endp2cntl(pipe->endp);
+ hub.cntl = pipe->cntl;
hub.powerwait = desc.bPwrOn2PwrGood * 2;
// Launch a thread for every port.