Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 400f36342132d73bab4f425a7d7d4f78ff0eaeef)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision d650494ae0e5bebdd9a96f64872360f361cab78c)
@@ -36,4 +36,5 @@
 
 #include <bool.h>
+#include <devman.h>
 #include <errno.h>
 #include <str_error.h>
@@ -42,4 +43,5 @@
 
 #include <usb/debug.h>
+#include <usb/dev/hub.h>
 
 #include "port.h"
@@ -54,5 +56,6 @@
 };
 
-static void usb_hub_port_removed_device(usb_hub_port_t *port);
+static void usb_hub_port_removed_device(usb_hub_port_t *port,
+    usb_hub_info_t *hub);
 static void usb_hub_port_reset_completed(usb_hub_port_t *port,
     usb_port_status_t status);
@@ -148,4 +151,5 @@
 		usb_log_debug("Connection change on port %zu: device %s.\n",
 		    port->port_number, connected ? "attached" : "removed");
+
 		/* ACK the change */
 		const int opResult = usb_hub_port_clear_feature(port,
@@ -165,5 +169,9 @@
 			}
 		} else {
-			usb_hub_port_removed_device(port);
+			/* If enabled change was reported leave the removal
+			 * to that handler, it shall ACK the change too. */
+			if (!(status & USB_HUB_PORT_C_STATUS_ENABLED)) {
+				usb_hub_port_removed_device(port, hub);
+			}
 		}
 	}
@@ -171,5 +179,7 @@
 	/* Enable change, ports are automatically disabled on errors. */
 	if (status & USB_HUB_PORT_C_STATUS_ENABLED) {
-		usb_hub_port_removed_device(port);
+		usb_log_info("Port %zu, disabled because of errors.\n",
+		   port->port_number);
+		usb_hub_port_removed_device(port, hub);
 		const int rc = usb_hub_port_clear_feature(port,
 		        USB_HUB_FEATURE_C_PORT_ENABLE);
@@ -239,22 +249,20 @@
  * @param port port number, starting from 1
  */
-static void usb_hub_port_removed_device(usb_hub_port_t *port)
-{
-	assert(port);
-	// TODO remove device from device manager
-
-
+static void usb_hub_port_removed_device(usb_hub_port_t *port,
+    usb_hub_info_t *hub)
+{
+	assert(port);
+	assert(hub);
 	if (port->attached_device.address >= 0) {
-#if 0
-		usb_log_warning("Device unplug on `%s' (port %zu): " \
-		    "not implemented.\n", hub->usb_device->ddf_dev->name,
-		    (size_t) port);
-#endif
 		fibril_mutex_lock(&port->mutex);
 		port->attached_device.address = -1;
 		port->attached_device.handle = 0;
 		fibril_mutex_unlock(&port->mutex);
+		usb_log_info("Removed device on port %zu.\n",
+		    port->port_number);
 	} else {
-		usb_log_warning("Device removed before being registered.\n");
+		usb_log_warning(
+		    "Device on port %zu removed before being registered.\n",
+		    port->port_number);
 
 		/*
@@ -270,5 +278,5 @@
  * Process port reset change
  *
- * After this change port should be enabled, unless some problem occured.
+ * After this change port should be enabled, unless some problem occurred.
  * This functions triggers second phase of enabling new device.
  * @param hub
