Index: uspace/drv/bus/usb/xhci/rh.c
===================================================================
--- uspace/drv/bus/usb/xhci/rh.c	(revision 5fd9c308725be28e98aaeb91d9f3367e470de4f1)
+++ uspace/drv/bus/usb/xhci/rh.c	(revision 766043ce7f260d895ceba60eeb519f3e83a18a7c)
@@ -68,5 +68,8 @@
 	rh->hc = hc;
 	rh->max_ports = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_PORTS);
+	rh->devices = (xhci_device_t **) malloc(rh->max_ports * sizeof(xhci_device_t *));
 	hc->rh.hc_device = device;
+
+	memset(rh->devices, 0, rh->max_ports * sizeof(xhci_device_t *));
 
 	return device_init(&hc->rh.device);
@@ -175,5 +178,8 @@
 	xhci_dev->hc = hc;
 
-	// TODO: Save anything else?
+	if (!rh->devices[dev->port - 1]) {
+		/* Only save the device if it's the first one connected to this port. */
+		rh->devices[dev->port - 1] = xhci_dev;
+	}
 
 	return EOK;
@@ -280,5 +286,13 @@
 static int handle_disconnected_device(xhci_rh_t *rh, uint8_t port_id)
 {
-	// TODO: Find XHCI device by the port.
+	/* Find XHCI device by the port. */
+	xhci_device_t *dev = rh->devices[port_id - 1];
+	if (!dev) {
+		/* Must be extraneous call */
+		return EOK;
+	}
+
+	usb_log_info("Device at port %u has been disconnected.", port_id);
+
 	// TODO: Destroy DDF function using _gone.
 	// TODO: Remove device endpoints on the bus.
@@ -437,4 +451,7 @@
 	/* TODO: Implement me! */
 	usb_log_debug2("Called xhci_rh_fini().");
+
+	free(rh->devices);
+
 	return EOK;
 }
Index: uspace/drv/bus/usb/xhci/rh.h
===================================================================
--- uspace/drv/bus/usb/xhci/rh.h	(revision 5fd9c308725be28e98aaeb91d9f3367e470de4f1)
+++ uspace/drv/bus/usb/xhci/rh.h	(revision 766043ce7f260d895ceba60eeb519f3e83a18a7c)
@@ -55,4 +55,5 @@
 typedef struct hcd_roothub hcd_roothub_t;
 typedef struct xhci_bus xhci_bus_t;
+typedef struct xhci_device xhci_device_t;
 
 /* XHCI root hub instance */
@@ -75,4 +76,7 @@
 	/* Number of hub ports. */
 	uint8_t max_ports;
+
+	/* Device pointers connected to RH ports or NULL. (size is `max_ports`) */
+	xhci_device_t **devices;
 } xhci_rh_t;
 
