Index: uspace/lib/usbhost/src/usb_endpoint_manager.c
===================================================================
--- uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision a837544ff7de38a7b9bbf9d072709b57ba704a92)
+++ uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision 7eb32a83ecef6c5d3f94768a887700cb83255e65)
@@ -45,11 +45,7 @@
 static hash_index_t node_hash(unsigned long key[])
 {
-	hash_index_t hash = 0;
-	unsigned i = 0;
-	for (;i < MAX_KEYS; ++i) {
-		hash ^= key[i];
-	}
-	hash %= BUCKET_COUNT;
-	return hash;
+	/* USB endpoints use 4 bits, thus ((key[0] << 4) | key[1])
+	 * produces unique value for every address.endpoint pair */
+	return ((key[0] << 4) | key[1]) % BUCKET_COUNT;
 }
 /*----------------------------------------------------------------------------*/
@@ -63,5 +59,7 @@
 	switch (keys) {
 	case 3:
-		match = match && (key[2] == node->ep->direction);
+		match = match &&
+		    ((key[2] == node->ep->direction)
+		    || (node->ep->direction == USB_DIRECTION_BOTH));
 	case 2:
 		match = match && (key[1] == (unsigned long)node->ep->endpoint);
