Index: uspace/drv/usbhub/ports.c
===================================================================
--- uspace/drv/usbhub/ports.c	(revision 3fb5a3eb79e89579c13ef4806f8f1daf70895f3f)
+++ uspace/drv/usbhub/ports.c	(revision af6136de008f4fcb3a666bcb1be8d411397d47fe)
@@ -202,17 +202,15 @@
 
 	//close address
-	if(hub->ports[port].attached_device.address >= 0){
-		/*uncomment this code to use it when DDF allows device removal
-		opResult = usb_hc_unregister_device(
-			&hub->connection,
-			hub->attached_devs[port].address);
-		if(opResult != EOK) {
-			dprintf(USB_LOG_LEVEL_WARNING, "could not release "
-				"address of "
-			    "removed device: %d", opResult);
-		}
-		hub->attached_devs[port].address = 0;
-		hub->attached_devs[port].handle = 0;
-		 */
+
+	usb_hub_port_t *the_port = hub->ports + port;
+
+	fibril_mutex_lock(&hub->port_mutex);
+
+	if (the_port->attached_device.address >= 0) {
+		usb_log_warning("Device unplug on `%s' (port %zu): " \
+		    "not implemented.\n", hub->usb_device->ddf_dev->name,
+		    (size_t) port);
+		the_port->attached_device.address = -1;
+		the_port->attached_device.handle = 0;
 	} else {
 		usb_log_warning("Device removed before being registered.\n");
@@ -223,5 +221,4 @@
 		 * port reset callback from new device wrapper.
 		 */
-		usb_hub_port_t *the_port = hub->ports + port;
 		fibril_mutex_lock(&the_port->reset_mutex);
 		the_port->reset_completed = true;
@@ -230,4 +227,6 @@
 		fibril_mutex_unlock(&the_port->reset_mutex);
 	}
+
+	fibril_mutex_unlock(&hub->port_mutex);
 }
 
@@ -396,6 +395,8 @@
 	}
 
+	fibril_mutex_lock(&data->hub->port_mutex);
 	data->hub->ports[data->port].attached_device.handle = child_handle;
 	data->hub->ports[data->port].attached_device.address = new_address;
+	fibril_mutex_unlock(&data->hub->port_mutex);
 
 	usb_log_info("Detected new device on `%s' (port %zu), "
