Index: uspace/lib/usb/include/usb/usb.h
===================================================================
--- uspace/lib/usb/include/usb/usb.h	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usb/include/usb/usb.h	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -110,5 +110,6 @@
 #define USB_ADDRESS_DEFAULT 0
 /** Maximum address number in USB 1.1. */
-#define USB11_ADDRESS_MAX 128
+#define USB11_ADDRESS_MAX 127
+#define USB_ADDRESS_COUNT (USB11_ADDRESS_MAX + 1)
 
 /** Check USB address for allowed values.
@@ -119,5 +120,5 @@
 static inline bool usb_address_is_valid(usb_address_t a)
 {
-	return (a >= USB_ADDRESS_DEFAULT) && (a < USB11_ADDRESS_MAX);
+	return (a >= USB_ADDRESS_DEFAULT) && (a <= USB11_ADDRESS_MAX);
 }
 
Index: uspace/lib/usbhost/Makefile
===================================================================
--- uspace/lib/usbhost/Makefile	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/Makefile	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -40,5 +40,4 @@
 	src/hcd.c \
 	src/iface.c \
-	src/usb_device_manager.c \
 	src/usb_endpoint_manager.c \
 	src/usb_transfer_batch.c
Index: uspace/lib/usbhost/include/usb/host/hcd.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/hcd.h	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/include/usb/host/hcd.h	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -41,5 +41,4 @@
 #include <usbhc_iface.h>
 
-#include <usb/host/usb_device_manager.h>
 #include <usb/host/usb_endpoint_manager.h>
 #include <usb/host/usb_transfer_batch.h>
@@ -53,6 +52,4 @@
 /** Generic host controller driver structure. */
 struct hcd {
-	/** Device manager storing handles and addresses. */
-	usb_device_manager_t dev_manager;
 	/** Endpoint manager. */
 	usb_endpoint_manager_t ep_manager;
Index: pace/lib/usbhost/include/usb/host/usb_device_manager.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_device_manager.h	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup libusbhost
- * @{
- */
-/** @file
- * Device manager structure and functions.
- *
- * Typical USB host controller needs to keep track of various settings for
- * each device that is connected to it.
- * State of toggle bit, device speed etc. etc.
- * This structure shall simplify the management.
- */
-#ifndef LIBUSBHOST_HOST_USB_DEVICE_MANAGER_H
-#define LIBUSBHOST_HOST_USB_DEVICE_MANAGER_H
-
-#include <adt/list.h>
-#include <devman.h>
-#include <fibril_synch.h>
-#include <usb/usb.h>
-#include <usb/host/endpoint.h>
-
-/** Number of USB address for array dimensions. */
-#define USB_ADDRESS_COUNT (USB11_ADDRESS_MAX + 1)
-
-/** Host controller device manager.
- * You shall not access members directly.
- */
-typedef struct {
-	/** Information about attached USB devices. */
-	struct {
-		usb_speed_t speed;      /**< Device speed */
-		bool occupied;          /**< The address is in use. */
-	} devices[USB_ADDRESS_COUNT];
-	/** Maximum speed allowed. */
-	usb_speed_t max_speed;
-	/** Protect access to members. */
-	fibril_mutex_t guard;
-	/** The last reserved address */
-	usb_address_t last_address;
-} usb_device_manager_t;
-
-void usb_device_manager_init(
-    usb_device_manager_t *instance, usb_speed_t max_speed);
-
-int usb_device_manager_request_address(usb_device_manager_t *instance,
-    usb_address_t *address, bool strict, usb_speed_t speed);
-
-int usb_device_manager_release_address(usb_device_manager_t *instance,
-    usb_address_t address);
-
-int usb_device_manager_get_info_by_address(usb_device_manager_t *instance,
-    usb_address_t address, usb_speed_t *speed);
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -50,6 +50,4 @@
 /** 90% of total bandwidth is available for periodic transfers */
 #define BANDWIDTH_AVAILABLE_USB11 ((BANDWIDTH_TOTAL_USB11 / 10) * 9)
-/** 16 addresses per list */
-#define ENDPOINT_LIST_COUNT 8
 
 typedef size_t (*bw_count_func_t)(usb_speed_t, usb_transfer_type_t, size_t, size_t);
@@ -59,6 +57,9 @@
 /** Endpoint management structure */
 typedef struct usb_endpoint_manager {
-	/** Store endpoint_t instances */
-	list_t endpoint_lists[ENDPOINT_LIST_COUNT];
+	struct {
+		usb_speed_t speed;      /**< Device speed */
+		bool occupied;          /**< The address is in use. */
+		list_t endpoint_list;   /**< Store endpoint_t instances */
+	} devices[USB_ADDRESS_COUNT];
 	/** Prevents races accessing lists */
 	fibril_mutex_t guard;
@@ -67,4 +68,8 @@
 	/** Use this function to count bw required by EP */
 	bw_count_func_t bw_count;
+	/** Maximum speed allowed. */
+	usb_speed_t max_speed;
+	/** The last reserved address */
+	usb_address_t last_address;
 } usb_endpoint_manager_t;
 
@@ -74,5 +79,5 @@
 
 int usb_endpoint_manager_init(usb_endpoint_manager_t *instance,
-    size_t available_bandwidth, bw_count_func_t bw_count);
+    size_t available_bandwidth, bw_count_func_t bw_count, usb_speed_t max_speed);
 
 int usb_endpoint_manager_register_ep(
@@ -98,4 +103,13 @@
 void usb_endpoint_manager_remove_address(usb_endpoint_manager_t *instance,
     usb_address_t address, ep_remove_callback_t callback, void *arg);
+
+int usb_endpoint_manager_request_address(usb_endpoint_manager_t *instance,
+    usb_address_t *address, bool strict, usb_speed_t speed);
+
+int usb_endpoint_manager_release_address(usb_endpoint_manager_t *instance,
+    usb_address_t address);
+
+int usb_endpoint_manager_get_info_by_address(usb_endpoint_manager_t *instance,
+    usb_address_t address, usb_speed_t *speed);
 #endif
 /**
Index: uspace/lib/usbhost/src/ddf_helpers.c
===================================================================
--- uspace/lib/usbhost/src/ddf_helpers.c	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/src/ddf_helpers.c	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -401,5 +401,5 @@
 
 	/* This checks whether the default address is reserved and gets speed */
-	int ret = usb_device_manager_get_info_by_address(&hcd->dev_manager,
+	int ret = usb_endpoint_manager_get_info_by_address(&hcd->ep_manager,
 		USB_ADDRESS_DEFAULT, &speed);
 	if (ret != EOK) {
Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/src/hcd.c	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -95,6 +95,5 @@
 {
 	assert(hcd);
-	usb_device_manager_init(&hcd->dev_manager, max_speed);
-	usb_endpoint_manager_init(&hcd->ep_manager, bandwidth, bw_count);
+	usb_endpoint_manager_init(&hcd->ep_manager, bandwidth, bw_count, max_speed);
 
 	hcd->private_data = NULL;
@@ -108,6 +107,6 @@
 	assert(hcd);
 	usb_address_t address = 0;
-	const int ret = usb_device_manager_request_address(
-	    &hcd->dev_manager, &address, false, speed);
+	const int ret = usb_endpoint_manager_request_address(
+	    &hcd->ep_manager, &address, false, speed);
 	if (ret != EOK)
 		return ret;
@@ -120,5 +119,5 @@
 	usb_endpoint_manager_remove_address(&hcd->ep_manager, address,
 	    unregister_helper_warn, hcd);
-	usb_device_manager_release_address(&hcd->dev_manager, address);
+	usb_endpoint_manager_release_address(&hcd->ep_manager, address);
 	return EOK;
 }
@@ -128,6 +127,6 @@
 	assert(hcd);
 	usb_address_t address = 0;
-	return usb_device_manager_request_address(
-	    &hcd->dev_manager, &address, true, speed);
+	return usb_endpoint_manager_request_address(
+	    &hcd->ep_manager, &address, true, speed);
 }
 
@@ -137,6 +136,6 @@
 	assert(hcd);
 	usb_speed_t speed = USB_SPEED_MAX;
-	const int ret = usb_device_manager_get_info_by_address(
-	    &hcd->dev_manager, target.address, &speed);
+	const int ret = usb_endpoint_manager_get_info_by_address(
+	    &hcd->ep_manager, target.address, &speed);
 	if (ret != EOK) {
 		return ret;
Index: pace/lib/usbhost/src/usb_device_manager.c
===================================================================
--- uspace/lib/usbhost/src/usb_device_manager.c	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ 	(revision )
@@ -1,180 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup libusbhost
- * @{
- */
-/** @file
- * Device manager structure and functions (implementation).
- */
-#include <assert.h>
-#include <errno.h>
-#include <usb/debug.h>
-#include <usb/host/usb_device_manager.h>
-
-/** Get a free USB address
- *
- * @param[in] instance Device manager structure to use.
- * @return Free address, or error code.
- */
-static usb_address_t usb_device_manager_get_free_address(
-    usb_device_manager_t *instance)
-{
-
-	usb_address_t new_address = instance->last_address;
-	do {
-		new_address = (new_address + 1) % USB_ADDRESS_COUNT;
-		if (new_address == USB_ADDRESS_DEFAULT)
-			new_address = 1;
-		if (new_address == instance->last_address) {
-			return ENOSPC;
-		}
-	} while (instance->devices[new_address].occupied);
-
-	assert(new_address != USB_ADDRESS_DEFAULT);
-	instance->last_address = new_address;
-
-	return new_address;
-}
-
-/** Initialize device manager structure.
- *
- * @param[in] instance Memory place to initialize.
- * @param[in] max_speed Maximum allowed USB speed of devices (inclusive).
- *
- * Set all values to false/0.
- */
-void usb_device_manager_init(
-    usb_device_manager_t *instance, usb_speed_t max_speed)
-{
-	assert(instance);
-	for (unsigned i = 0; i < USB_ADDRESS_COUNT; ++i) {
-		instance->devices[i].occupied = false;
-		instance->devices[i].speed = USB_SPEED_MAX;
-	}
-	instance->last_address = 1;
-	instance->max_speed = max_speed;
-	fibril_mutex_initialize(&instance->guard);
-}
-
-/** Request USB address.
- * @param instance usb_device_manager
- * @param address Pointer to requested address value, place to store new address
- * @parma strict Fail if the requested address is not available.
- * @return Error code.
- * @note Default address is only available in strict mode.
- */
-int usb_device_manager_request_address(usb_device_manager_t *instance,
-    usb_address_t *address, bool strict, usb_speed_t speed)
-{
-	assert(instance);
-	assert(address);
-	if (speed > instance->max_speed)
-		return ENOTSUP;
-
-	if ((*address) < 0 || (*address) >= USB_ADDRESS_COUNT)
-		return EINVAL;
-
-	fibril_mutex_lock(&instance->guard);
-	/* Only grant default address to strict requests */
-	if (( (*address) == USB_ADDRESS_DEFAULT) && !strict) {
-		*address = instance->last_address;
-	}
-
-	if (instance->devices[*address].occupied) {
-		if (strict) {
-			fibril_mutex_unlock(&instance->guard);
-			return ENOENT;
-		}
-		*address = usb_device_manager_get_free_address(instance);
-	}
-	assert(instance->devices[*address].occupied == false);
-	assert(*address != USB_ADDRESS_DEFAULT || strict);
-
-	instance->devices[*address].occupied = true;
-	instance->devices[*address].speed = speed;
-
-	fibril_mutex_unlock(&instance->guard);
-	return EOK;
-}
-
-/** Release used USB address.
- *
- * @param[in] instance Device manager structure to use.
- * @param[in] address Device address
- * @return Error code.
- */
-int usb_device_manager_release_address(
-    usb_device_manager_t *instance, usb_address_t address)
-{
-	if ((address < 0) || (address >= USB_ADDRESS_COUNT)) {
-		return EINVAL;
-	}
-	assert(instance);
-
-	fibril_mutex_lock(&instance->guard);
-	if (!instance->devices[address].occupied) {
-		fibril_mutex_unlock(&instance->guard);
-		return ENOENT;
-	}
-
-	instance->devices[address].occupied = false;
-	fibril_mutex_unlock(&instance->guard);
-	return EOK;
-}
-
-/** Get speed assigned to USB address.
- *
- * @param[in] instance Device manager structure to use.
- * @param[in] address Address the caller wants to find.
- * @param[out] speed Assigned speed.
- * @return Error code.
- */
-int usb_device_manager_get_info_by_address(usb_device_manager_t *instance,
-    usb_address_t address, usb_speed_t *speed)
-{
-	assert(instance);
-	if ((address < 0) || (address >= USB_ADDRESS_COUNT)) {
-		return EINVAL;
-	}
-
-	fibril_mutex_lock(&instance->guard);
-	if (!instance->devices[address].occupied) {
-		fibril_mutex_unlock(&instance->guard);
-		return ENOENT;
-	}
-
-	if (speed != NULL) {
-		*speed = instance->devices[address].speed;
-	}
-
-	fibril_mutex_unlock(&instance->guard);
-	return EOK;
-}
-/**
- * @}
- */
Index: uspace/lib/usbhost/src/usb_endpoint_manager.c
===================================================================
--- uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision 28384868fe6a9bbe937ea13e4dd739b2076b2539)
+++ uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision 423c7495b63ae6ae9b9e500a4f2c819a0c00dd02)
@@ -36,4 +36,5 @@
 #include <assert.h>
 #include <errno.h>
+#include <macros.h>
 
 #include <usb/debug.h>
@@ -71,5 +72,5 @@
 	assert(instance);
 	assert(addr >= 0);
-	return &instance->endpoint_lists[addr % ENDPOINT_LIST_COUNT];
+	return &instance->devices[addr % ARRAY_SIZE(instance->devices)].endpoint_list;
 }
 
@@ -96,4 +97,28 @@
 	}
 	return NULL;
+}
+
+/** Get a free USB address
+ *
+ * @param[in] instance Device manager structure to use.
+ * @return Free address, or error code.
+ */
+static usb_address_t usb_endpoint_manager_get_free_address(
+    usb_endpoint_manager_t *instance)
+{
+
+	usb_address_t new_address = instance->last_address;
+	do {
+		new_address = (new_address + 1) % USB_ADDRESS_COUNT;
+		if (new_address == USB_ADDRESS_DEFAULT)
+			new_address = 1;
+		if (new_address == instance->last_address)
+			return ENOSPC;
+	} while (instance->devices[new_address].occupied);
+
+	assert(new_address != USB_ADDRESS_DEFAULT);
+	instance->last_address = new_address;
+
+	return new_address;
 }
 
@@ -156,5 +181,5 @@
  */
 int usb_endpoint_manager_init(usb_endpoint_manager_t *instance,
-    size_t available_bandwidth, bw_count_func_t bw_count)
+    size_t available_bandwidth, bw_count_func_t bw_count, usb_speed_t max_speed)
 {
 	assert(instance);
@@ -162,6 +187,10 @@
 	instance->free_bw = available_bandwidth;
 	instance->bw_count = bw_count;
-	for (unsigned i = 0; i < ENDPOINT_LIST_COUNT; ++i) {
-		list_initialize(&instance->endpoint_lists[i]);
+	instance->last_address = 1;
+	instance->max_speed = max_speed;
+	for (unsigned i = 0; i < ARRAY_SIZE(instance->devices); ++i) {
+		list_initialize(&instance->devices[i].endpoint_list);
+		instance->devices[i].speed = USB_SPEED_MAX;
+		instance->devices[i].occupied = false;
 	}
 	return EOK;
@@ -386,4 +415,99 @@
 	fibril_mutex_unlock(&instance->guard);
 }
+
+/** Request USB address.
+ * @param instance usb_device_manager
+ * @param address Pointer to requested address value, place to store new address
+ * @parma strict Fail if the requested address is not available.
+ * @return Error code.
+ * @note Default address is only available in strict mode.
+ */
+int usb_endpoint_manager_request_address(usb_endpoint_manager_t *instance,
+    usb_address_t *address, bool strict, usb_speed_t speed)
+{
+	assert(instance);
+	assert(address);
+	if (speed > instance->max_speed)
+		return ENOTSUP;
+
+	if (!usb_address_is_valid(*address))
+		return EINVAL;
+
+	usb_address_t addr = *address;
+
+	fibril_mutex_lock(&instance->guard);
+	/* Only grant default address to strict requests */
+	if ((addr == USB_ADDRESS_DEFAULT) && !strict) {
+		addr = usb_endpoint_manager_get_free_address(instance);
+	}
+
+	if (instance->devices[addr].occupied) {
+		if (strict) {
+			fibril_mutex_unlock(&instance->guard);
+			return ENOENT;
+		}
+		addr = usb_endpoint_manager_get_free_address(instance);
+	}
+	if (usb_address_is_valid(addr)) {
+		assert(instance->devices[addr].occupied == false);
+		assert(addr != USB_ADDRESS_DEFAULT || strict);
+
+		instance->devices[addr].occupied = true;
+		instance->devices[addr].speed = speed;
+		*address = addr;
+		addr = 0;
+	}
+
+	fibril_mutex_unlock(&instance->guard);
+	return addr;
+}
+
+/** Release used USB address.
+ *
+ * @param[in] instance Device manager structure to use.
+ * @param[in] address Device address
+ * @return Error code.
+ */
+int usb_endpoint_manager_release_address(
+    usb_endpoint_manager_t *instance, usb_address_t address)
+{
+	assert(instance);
+	if (!usb_address_is_valid(address))
+		return EINVAL;
+
+	fibril_mutex_lock(&instance->guard);
+
+	const int rc = instance->devices[address].occupied ? EOK : ENOENT;
+	instance->devices[address].occupied = false;
+
+	fibril_mutex_unlock(&instance->guard);
+	return rc;
+}
+
+/** Get speed assigned to USB address.
+ *
+ * @param[in] instance Device manager structure to use.
+ * @param[in] address Address the caller wants to find.
+ * @param[out] speed Assigned speed.
+ * @return Error code.
+ */
+int usb_endpoint_manager_get_info_by_address(usb_endpoint_manager_t *instance,
+    usb_address_t address, usb_speed_t *speed)
+{
+	assert(instance);
+	if (!usb_address_is_valid(address)) {
+		return EINVAL;
+	}
+
+	fibril_mutex_lock(&instance->guard);
+
+	const int rc = instance->devices[address].occupied ? EOK : ENOENT;
+	if (speed && instance->devices[address].occupied) {
+		*speed = instance->devices[address].speed;
+	}
+
+	fibril_mutex_unlock(&instance->guard);
+	return rc;
+}
 /**
  * @}
