Index: uspace/drv/bus/usb/xhci/rh.c
===================================================================
--- uspace/drv/bus/usb/xhci/rh.c	(revision a9fcd73c9a825936be7838244fd03da4f23bf1e7)
+++ uspace/drv/bus/usb/xhci/rh.c	(revision 2bff2cc2f4626dd9e056a1dd37bb2ff505dae69a)
@@ -136,5 +136,19 @@
 	}
 
-	device_t *dev = hcd_ddf_fun_create(&port->rh->hc->base, port->base.speed);
+	/*
+	 * We cannot know in advance, whether the speed in the status register
+	 * is valid - it depends on the protocol. So we read it later, but then
+	 * we have to check if the port is still enabled.
+	 */
+	uint32_t status = XHCI_REG_RD_FIELD(&port->regs->portsc, 32);
+
+	bool enabled = !!(status & XHCI_REG_MASK(XHCI_PORT_PED));
+	if (!enabled)
+		return ENOENT;
+
+	unsigned psiv = (status & XHCI_REG_MASK(XHCI_PORT_PS)) >> XHCI_REG_SHIFT(XHCI_PORT_PS);
+	const usb_speed_t speed = port->rh->hc->speeds[psiv].usb_speed;
+
+	device_t *dev = hcd_ddf_fun_create(&port->rh->hc->base, speed);
 	if (!dev) {
 		usb_log_error("Failed to create USB device function.");
@@ -223,7 +237,5 @@
 
 			if (enabled) {
-				unsigned psiv = (status & XHCI_REG_MASK(XHCI_PORT_PS)) >> XHCI_REG_SHIFT(XHCI_PORT_PS);
-				const usb_speed_t speed = rh->hc->speeds[psiv].usb_speed;
-				usb_port_enabled(&port->base, speed);
+				usb_port_enabled(&port->base);
 			} else {
 				usb_port_disabled(&port->base, &rh_remove_device);
