Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision e991937ce777f098dfa17229c960ba874567cc39)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision fa9d3afc435a30b776feebda588c52c598f66317)
@@ -64,5 +64,5 @@
 {
 	assert(port);
-	if (port->attached_handle != USB_DEVICE_HANDLE_INVALID)
+	if (port->device_attached)
 		return usb_hub_port_device_gone(port, hub);
 	return EOK;
@@ -139,10 +139,10 @@
 	assert(port);
 	assert(hub);
-	usb_log_debug("Interrupt at port %zu\n", port->port_number);
+	usb_log_debug("Interrupt at port %u\n", port->port_number);
 
 	usb_port_status_t status = 0;
 	const int opResult = get_port_status(port, &status);
 	if (opResult != EOK) {
-		usb_log_error("Failed to get port %zu status: %s.\n",
+		usb_log_error("Failed to get port %u status: %s.\n",
 		    port->port_number, str_error(opResult));
 		return;
@@ -153,5 +153,5 @@
 		const bool connected =
 		    (status & USB_HUB_PORT_STATUS_CONNECTION) != 0;
-		usb_log_debug("Connection change on port %zu: device %s.\n",
+		usb_log_debug("Connection change on port %u: device %s.\n",
 		    port->port_number, connected ? "attached" : "removed");
 
@@ -169,5 +169,5 @@
 			if (opResult != EOK) {
 				usb_log_error(
-				    "Cannot handle change on port %zu: %s.\n",
+				    "Cannot handle change on port %u: %s.\n",
 				    port->port_number, str_error(opResult));
 			}
@@ -183,5 +183,5 @@
 	/* Enable change, ports are automatically disabled on errors. */
 	if (status & USB_HUB_PORT_C_STATUS_ENABLED) {
-		usb_log_info("Port %zu, disabled because of errors.\n",
+		usb_log_info("Port %u, disabled because of errors.\n",
 		   port->port_number);
 		usb_hub_port_device_gone(port, hub);
@@ -190,5 +190,5 @@
 		if (rc != EOK) {
 			usb_log_error(
-			    "Failed to clear port %zu enable change feature: "
+			    "Failed to clear port %u enable change feature: "
 			    "%s.\n", port->port_number, str_error(rc));
 		}
@@ -198,5 +198,5 @@
 	/* Suspend change */
 	if (status & USB_HUB_PORT_C_STATUS_SUSPEND) {
-		usb_log_error("Port %zu went to suspend state, this should"
+		usb_log_error("Port %u went to suspend state, this should"
 		    "NOT happen as we do not support suspend state!",
 		    port->port_number);
@@ -205,5 +205,5 @@
 		if (rc != EOK) {
 			usb_log_error(
-			    "Failed to clear port %zu suspend change feature: "
+			    "Failed to clear port %u suspend change feature: "
 			    "%s.\n", port->port_number, str_error(rc));
 		}
@@ -221,5 +221,5 @@
 		if (rc != EOK) {
 			usb_log_error(
-			    "Failed to clear port %zu OC change feature: %s.\n",
+			    "Failed to clear port %u OC change feature: %s.\n",
 			    port->port_number, str_error(rc));
 		}
@@ -229,5 +229,5 @@
 			if (rc != EOK) {
 				usb_log_error(
-				    "Failed to set port %zu power after OC:"
+				    "Failed to set port %u power after OC:"
 				    " %s.\n", port->port_number, str_error(rc));
 			}
@@ -240,5 +240,5 @@
 	}
 
-	usb_log_debug("Port %zu status 0x%08" PRIx32 "\n",
+	usb_log_debug("Port %u status %#08" PRIx32 "\n",
 	    port->port_number, status);
 }
@@ -260,8 +260,8 @@
 	if (!exch)
 		return ENOMEM;
-	const int rc = usb_device_remove(exch, port->attached_handle);
+	const int rc = usb_device_remove(exch, port->port_number);
 	usb_device_bus_exchange_end(exch);
 	if (rc == EOK)
-		port->attached_handle = -1;
+		port->device_attached = false;
 	return rc;
 
@@ -286,8 +286,8 @@
 
 	if (port->reset_okay) {
-		usb_log_debug("Port %zu reset complete.\n", port->port_number);
+		usb_log_debug("Port %u reset complete.\n", port->port_number);
 	} else {
 		usb_log_warning(
-		    "Port %zu reset complete but port not enabled.\n",
+		    "Port %u reset complete but port not enabled.\n",
 		    port->port_number);
 	}
@@ -299,5 +299,5 @@
 	if (rc != EOK) {
 		usb_log_error(
-		    "Failed to clear port %zu reset change feature: %s.\n",
+		    "Failed to clear port %u reset change feature: %s.\n",
 		    port->port_number, str_error(rc));
 	}
@@ -407,5 +407,5 @@
 	port_enable(port, true);
 	if (!port->reset_completed || !port->reset_okay) {
-		usb_log_error("Failed to reset port %zu\n", port->port_number);
+		usb_log_error("Failed to reset port %u\n", port->port_number);
 		if (usb_release_default_address(exch) != EOK)
 			usb_log_warning("Failed to release default address\n");
@@ -414,9 +414,10 @@
 	}
 
-	ret = usb_device_enumerate(exch, &port->attached_handle);
+	ret = usb_device_enumerate(exch, port->port_number);
 	if (ret != EOK) {
-		usb_log_error("Failed to reset port %zu\n", port->port_number);
+		usb_log_error("Failed to enumerate device on port %u\n",
+		    port->port_number);
 		if (port_enable(port, false) != EOK) {
-			usb_log_warning("Failed to disable port %zu, NOT "
+			usb_log_warning("Failed to disable port %u, NOT "
 			    "releasing default address.\n", port->port_number);
 		} else {
@@ -426,4 +427,5 @@
 		}
 	} else {
+		port->device_attached = true;
 		if (usb_release_default_address(exch) != EOK)
 			usb_log_warning("Failed to release default address\n");
Index: uspace/drv/bus/usb/usbhub/port.h
===================================================================
--- uspace/drv/bus/usb/usbhub/port.h	(revision e991937ce777f098dfa17229c960ba874567cc39)
+++ uspace/drv/bus/usb/usbhub/port.h	(revision fa9d3afc435a30b776feebda588c52c598f66317)
@@ -44,6 +44,6 @@
 /** Information about single port on a hub. */
 typedef struct {
-	/* Port number as reported in descriptors. */
-	size_t port_number;
+	/** Port number as reported in descriptors. */
+	unsigned port_number;
 	/** Device communication pipe. */
 	usb_pipe_t *control_pipe;
@@ -58,7 +58,6 @@
 	/** Whether to announce the port reset as successful. */
 	bool reset_okay;
-
-	usb_device_handle_t attached_handle;
-
+	/** Device reported to USB bus driver */
+	bool device_attached;
 } usb_hub_port_t;
 
@@ -67,5 +66,5 @@
  * @param port Port to be initialized.
  */
-static inline void usb_hub_port_init(usb_hub_port_t *port, size_t port_number,
+static inline void usb_hub_port_init(usb_hub_port_t *port, unsigned port_number,
     usb_pipe_t *control_pipe)
 {
@@ -73,5 +72,7 @@
 	port->port_number = port_number;
 	port->control_pipe = control_pipe;
-	port->attached_handle = USB_DEVICE_HANDLE_INVALID;
+	port->reset_completed = false;
+	port->reset_okay = false;
+	port->device_attached = false;
 	fibril_mutex_initialize(&port->mutex);
 	fibril_condvar_initialize(&port->reset_cv);
Index: uspace/drv/bus/usb/usbhub/usbhub.c
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.c	(revision e991937ce777f098dfa17229c960ba874567cc39)
+++ uspace/drv/bus/usb/usbhub/usbhub.c	(revision fa9d3afc435a30b776feebda588c52c598f66317)
@@ -317,5 +317,5 @@
 
 		if (ret != EOK) {
-			usb_log_error("Cannot power on port %zu: %s.\n",
+			usb_log_error("Cannot power on port %u: %s.\n",
 			    hub_dev->ports[port].port_number, str_error(ret));
 		} else {
@@ -406,5 +406,5 @@
 		if (ret != EOK) {
 			usb_log_warning("HUB OVER-CURRENT GONE: Cannot power on"
-			    " port %zu: %s\n", hub_dev->ports[port].port_number,
+			    " port %u: %s\n", hub_dev->ports[port].port_number,
 			    str_error(ret));
 		} else {
