Index: uspace/lib/usbhost/src/bus.c
===================================================================
--- uspace/lib/usbhost/src/bus.c	(revision 7242ba21a981101ffb292c3898a33725e871d6ee)
+++ uspace/lib/usbhost/src/bus.c	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -307,4 +307,14 @@
 err:
 	return rc;
+}
+
+/**
+ * Calculate an index to the endpoint array.
+ * For the default control endpoint 0, it must return 0.
+ * For different arguments, the result is stable but not defined.
+ */
+static int bus_endpoint_index(usb_endpoint_t ep, usb_direction_t dir)
+{
+	return 2 * ep + (dir == USB_DIRECTION_OUT);
 }
 
@@ -357,13 +367,15 @@
 	    ep->max_transfer_size);
 
+	const int idx = bus_endpoint_index(ep->endpoint, ep->direction);
+
 	fibril_mutex_lock(&device->guard);
 	if (!device->online && ep->endpoint != 0) {
 		err = EAGAIN;
-	} else if (device->endpoints[ep->endpoint] != NULL) {
+	} else if (device->endpoints[idx] != NULL) {
 		err = EEXIST;
 	} else {
 		err = register_ops->endpoint_register(ep);
 		if (!err)
-			device->endpoints[ep->endpoint] = ep;
+			device->endpoints[idx] = ep;
 	}
 	fibril_mutex_unlock(&device->guard);
@@ -385,10 +397,22 @@
  * Search for an endpoint. Returns a reference.
  */
-endpoint_t *bus_find_endpoint(device_t *device, usb_endpoint_t endpoint)
+endpoint_t *bus_find_endpoint(device_t *device, usb_endpoint_t endpoint, usb_direction_t dir)
 {
 	assert(device);
 
+	const int idx = bus_endpoint_index(endpoint, dir);
+	const int ctrl_idx = bus_endpoint_index(endpoint, USB_DIRECTION_BOTH);
+
 	fibril_mutex_lock(&device->guard);
-	endpoint_t *ep = device->endpoints[endpoint];
+	endpoint_t *ep = device->endpoints[idx];
+	/*
+	 * If the endpoint was not found, it's still possible it is a control
+	 * endpoint having direction BOTH.
+	 */
+	if (!ep) {
+		ep = device->endpoints[ctrl_idx];
+		if (ep && ep->transfer_type != USB_TRANSFER_CONTROL)
+			ep = NULL;
+	}
 	if (ep) {
 		/* Exporting reference */
@@ -423,7 +447,9 @@
 	    ep->max_transfer_size);
 
+	const int idx = bus_endpoint_index(ep->endpoint, ep->direction);
+
 	fibril_mutex_lock(&device->guard);
 	ops->endpoint_unregister(ep);
-	device->endpoints[ep->endpoint] = NULL;
+	device->endpoints[idx] = NULL;
 	fibril_mutex_unlock(&device->guard);
 
@@ -489,5 +515,5 @@
 
 	/* Temporary reference */
-	endpoint_t *ep = bus_find_endpoint(device, target.endpoint);
+	endpoint_t *ep = bus_find_endpoint(device, target.endpoint, direction);
 	if (ep == NULL) {
 		usb_log_error("Endpoint(%d:%d) not registered for %s.\n",
Index: uspace/lib/usbhost/src/ddf_helpers.c
===================================================================
--- uspace/lib/usbhost/src/ddf_helpers.c	(revision 7242ba21a981101ffb292c3898a33725e871d6ee)
+++ uspace/lib/usbhost/src/ddf_helpers.c	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -111,5 +111,5 @@
 	assert(dev);
 
-	endpoint_t *ep = bus_find_endpoint(dev, pipe_desc->endpoint_no);
+	endpoint_t *ep = bus_find_endpoint(dev, pipe_desc->endpoint_no, pipe_desc->direction);
 	if (!ep)
 		return ENOENT;
