Index: uspace/drv/bus/usb/ehci/ehci_bus.c
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_bus.c	(revision 7278cbc90a2d93600a02b53f8b6fdbeeba7ca711)
+++ uspace/drv/bus/usb/ehci/ehci_bus.c	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
@@ -107,5 +107,5 @@
 	qh_init(ehci_ep->qh, ep);
 	hc_enqueue_endpoint(bus->hc, ep);
-
+	endpoint_set_online(ep, &bus->hc->guard);
 	return EOK;
 }
@@ -121,26 +121,17 @@
 	usb2_bus_ops.endpoint_unregister(ep);
 	hc_dequeue_endpoint(hc, ep);
+	/*
+	 * Now we can be sure the active transfer will not be completed,
+	 * as it's out of the schedule, and HC acknowledged it.
+	 */
 
 	ehci_endpoint_t *ehci_ep = ehci_endpoint_get(ep);
 
-	/*
-	 * Now we can be sure the active transfer will not be completed. But first,
-	 * make sure that the handling fibril won't use its link in pending list.
-	 */
 	fibril_mutex_lock(&hc->guard);
-	if (link_in_use(&ehci_ep->pending_link))
-		/* pending list reference */
-		endpoint_del_ref(ep);
+	endpoint_set_offline_locked(ep);
 	list_remove(&ehci_ep->pending_link);
-	fibril_mutex_unlock(&hc->guard);
-
-	/*
-	 * Finally, the endpoint shall not be used anywhere else. Finish the
-	 * pending batch.
-	 */
-	fibril_mutex_lock(&ep->guard);
 	usb_transfer_batch_t * const batch = ep->active_batch;
 	endpoint_deactivate_locked(ep);
-	fibril_mutex_unlock(&ep->guard);
+	fibril_mutex_unlock(&hc->guard);
 
 	if (batch) {
Index: uspace/drv/bus/usb/ehci/hc.c
===================================================================
--- uspace/drv/bus/usb/ehci/hc.c	(revision 7278cbc90a2d93600a02b53f8b6fdbeeba7ca711)
+++ uspace/drv/bus/usb/ehci/hc.c	(revision 4db49344094408c5a4e6654a2a2813509a0c351b)
@@ -302,18 +302,15 @@
 	endpoint_t * const ep = batch->ep;
 	ehci_endpoint_t * const ehci_ep = ehci_endpoint_get(ep);
-
-	/* creating local reference */
-	endpoint_add_ref(ep);
-
-	fibril_mutex_lock(&ep->guard);
-	endpoint_activate_locked(ep, batch);
-
 	ehci_transfer_batch_t *ehci_batch = ehci_transfer_batch_get(batch);
-	const int err = ehci_transfer_batch_prepare(ehci_batch);
-	if (err) {
-		endpoint_deactivate_locked(ep);
-		fibril_mutex_unlock(&ep->guard);
-		/* dropping local reference */
-		endpoint_del_ref(ep);
+
+	int err;
+
+	if ((err = ehci_transfer_batch_prepare(ehci_batch)))
+		return err;
+
+	fibril_mutex_lock(&hc->guard);
+
+	if ((err = endpoint_activate_locked(ep, batch))) {
+		fibril_mutex_unlock(&hc->guard);
 		return err;
 	}
@@ -321,14 +318,10 @@
 	usb_log_debug("HC(%p): Committing BATCH(%p)", hc, batch);
 	ehci_transfer_batch_commit(ehci_batch);
-	fibril_mutex_unlock(&ep->guard);
 
 	/* Enqueue endpoint to the checked list */
-	fibril_mutex_lock(&hc->guard);
 	usb_log_debug2("HC(%p): Appending BATCH(%p)", hc, batch);
-
-	/* local reference -> pending list reference */
 	list_append(&ehci_ep->pending_link, &hc->pending_endpoints);
+
 	fibril_mutex_unlock(&hc->guard);
-
 	return EOK;
 }
@@ -368,5 +361,4 @@
 				= list_get_instance(current, ehci_endpoint_t, pending_link);
 
-			fibril_mutex_lock(&ep->base.guard);
 			ehci_transfer_batch_t *batch
 				= ehci_transfer_batch_get(ep->base.active_batch);
@@ -376,9 +368,7 @@
 				endpoint_deactivate_locked(&ep->base);
 				list_remove(current);
-				endpoint_del_ref(&ep->base);
 				hc_reset_toggles(&batch->base, &ehci_ep_toggle_reset);
 				usb_transfer_batch_finish(&batch->base);
 			}
-			fibril_mutex_unlock(&ep->base.guard);
 		}
 		fibril_mutex_unlock(&hc->guard);
