Index: uspace/app/usbinfo/dev.c
===================================================================
--- uspace/app/usbinfo/dev.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/app/usbinfo/dev.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -40,6 +40,6 @@
 #include "usbinfo.h"
 
-usbinfo_device_t *prepare_device(devman_handle_t hc_handle,
-    usb_address_t dev_addr)
+usbinfo_device_t *prepare_device(const char *name,
+    devman_handle_t hc_handle, usb_address_t dev_addr)
 {
 	usbinfo_device_t *dev = malloc(sizeof(usbinfo_device_t));
@@ -55,6 +55,6 @@
 	if (rc != EOK) {
 		fprintf(stderr,
-		    NAME ": failed to create connection to the device: %s.\n",
-		    str_error(rc));
+		    NAME ": failed to create connection to device %s: %s.\n",
+		    name, str_error(rc));
 		goto leave;
 	}
@@ -64,6 +64,6 @@
 	if (rc != EOK) {
 		fprintf(stderr,
-		    NAME ": failed to create default control pipe: %s.\n",
-		    str_error(rc));
+		    NAME ": failed to create default control pipe to %s: %s.\n",
+		    name, str_error(rc));
 		goto leave;
 	}
@@ -71,7 +71,13 @@
 	rc = usb_pipe_probe_default_control(&dev->ctrl_pipe);
 	if (rc != EOK) {
-		fprintf(stderr,
-		    NAME ": probing default control pipe failed: %s.\n",
-		    str_error(rc));
+		if (rc == ENOENT) {
+			fprintf(stderr, NAME ": " \
+			    "device %s not present or malfunctioning.\n",
+			    name);
+		} else {
+			fprintf(stderr, NAME ": " \
+			    "probing default control pipe of %s failed: %s.\n",
+			    name, str_error(rc));
+		}
 		goto leave;
 	}
@@ -84,6 +90,6 @@
 	if (rc != EOK) {
 		fprintf(stderr,
-		    NAME ": failed to retrieve device descriptor: %s.\n",
-		    str_error(rc));
+		    NAME ": failed to retrieve device descriptor of %s: %s.\n",
+		    name, str_error(rc));
 		goto leave;
 	}
@@ -93,7 +99,7 @@
 	    &dev->full_configuration_descriptor_size);
 	if (rc != EOK) {
-		fprintf(stderr,
-		    NAME ": failed to retrieve configuration descriptor: %s.\n",
-		    str_error(rc));
+		fprintf(stderr, NAME ": " \
+		    "failed to retrieve configuration descriptor of %s: %s.\n",
+		    name, str_error(rc));
 		goto leave;
 	}
Index: uspace/app/usbinfo/main.c
===================================================================
--- uspace/app/usbinfo/main.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/app/usbinfo/main.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -308,5 +308,6 @@
 		}
 
-		usbinfo_device_t *dev = prepare_device(hc_handle, dev_addr);
+		usbinfo_device_t *dev = prepare_device(devpath,
+		    hc_handle, dev_addr);
 		if (dev == NULL) {
 			continue;
Index: uspace/app/usbinfo/usbinfo.h
===================================================================
--- uspace/app/usbinfo/usbinfo.h	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/app/usbinfo/usbinfo.h	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -71,5 +71,5 @@
 }
 
-usbinfo_device_t *prepare_device(devman_handle_t, usb_address_t);
+usbinfo_device_t *prepare_device(const char *, devman_handle_t, usb_address_t);
 void destroy_device(usbinfo_device_t *);
 
Index: uspace/drv/ohci/hc.c
===================================================================
--- uspace/drv/ohci/hc.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/hc.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -95,6 +95,5 @@
 }
 /*----------------------------------------------------------------------------*/
-int hc_init(hc_t *instance, ddf_fun_t *fun, ddf_dev_t *dev,
-    uintptr_t regs, size_t reg_size, bool interrupts)
+int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts)
 {
 	assert(instance);
Index: uspace/drv/ohci/hc.h
===================================================================
--- uspace/drv/ohci/hc.h	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/hc.h	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -77,6 +77,5 @@
 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
 
-int hc_init(hc_t *instance, ddf_fun_t *fun, ddf_dev_t *dev,
-     uintptr_t regs, size_t reg_size, bool interrupts);
+int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts);
 
 void hc_start_hw(hc_t *instance);
Index: uspace/drv/ohci/main.c
===================================================================
--- uspace/drv/ohci/main.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/main.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -43,5 +43,24 @@
 #define NAME "ohci"
 
-static int ohci_add_device(ddf_dev_t *device);
+/** Initializes a new ddf driver instance of OHCI hcd.
+ *
+ * @param[in] device DDF instance of the device to initialize.
+ * @return Error code.
+ */
+static int ohci_add_device(ddf_dev_t *device)
+{
+	usb_log_debug("ohci_add_device() called\n");
+	assert(device);
+
+	int ret = device_setup_ohci(device);
+	if (ret != EOK) {
+		usb_log_error("Failed to initialize OHCI driver: %s.\n",
+		    str_error(ret));
+		return ret;
+	}
+	usb_log_info("Controlling new OHCI device '%s'.\n", device->name);
+
+	return EOK;
+}
 /*----------------------------------------------------------------------------*/
 static driver_ops_t ohci_driver_ops = {
@@ -53,33 +72,4 @@
 	.driver_ops = &ohci_driver_ops
 };
-/*----------------------------------------------------------------------------*/
-/** Initializes a new ddf driver instance of OHCI hcd.
- *
- * @param[in] device DDF instance of the device to initialize.
- * @return Error code.
- */
-int ohci_add_device(ddf_dev_t *device)
-{
-	usb_log_debug("ohci_add_device() called\n");
-	assert(device);
-	ohci_t *ohci = malloc(sizeof(ohci_t));
-	if (ohci == NULL) {
-		usb_log_error("Failed to allocate OHCI driver.\n");
-		return ENOMEM;
-	}
-
-	int ret = ohci_init(ohci, device);
-	if (ret != EOK) {
-		usb_log_error("Failed to initialize OHCI driver: %s.\n",
-		    str_error(ret));
-		return ret;
-	}
-//	device->driver_data = ohci;
-	hc_register_hub(&ohci->hc, ohci->rh_fun);
-
-	usb_log_info("Controlling new OHCI device `%s'.\n", device->name);
-
-	return EOK;
-}
 /*----------------------------------------------------------------------------*/
 /** Initializes global driver structures (NONE).
Index: uspace/drv/ohci/ohci.c
===================================================================
--- uspace/drv/ohci/ohci.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/ohci.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -44,4 +44,21 @@
 #include "iface.h"
 #include "pci.h"
+#include "hc.h"
+#include "root_hub.h"
+
+typedef struct ohci {
+	ddf_fun_t *hc_fun;
+	ddf_fun_t *rh_fun;
+
+	hc_t hc;
+	rh_t rh;
+} ohci_t;
+
+static inline ohci_t * dev_to_ohci(ddf_dev_t *dev)
+{
+	assert(dev);
+	assert(dev->driver_data);
+	return dev->driver_data;
+}
 
 /** IRQ handling callback, identifies device
@@ -53,9 +70,7 @@
 static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
 {
-	assert(dev);
-	assert(dev->driver_data);
-	hc_t *hc = &((ohci_t*)dev->driver_data)->hc;
-	uint16_t status = IPC_GET_ARG1(*call);
+	hc_t *hc = &dev_to_ohci(dev)->hc;
 	assert(hc);
+	const uint16_t status = IPC_GET_ARG1(*call);
 	hc_interrupt(hc, status);
 }
@@ -71,5 +86,5 @@
 {
 	assert(fun);
-	usb_device_keeper_t *manager = &((ohci_t*)fun->dev->driver_data)->hc.manager;
+	usb_device_keeper_t *manager = &dev_to_ohci(fun->dev)->hc.manager;
 
 	usb_address_t addr = usb_device_keeper_find(manager, handle);
@@ -94,13 +109,14 @@
     ddf_fun_t *fun, devman_handle_t *handle)
 {
-	assert(handle);
-	ddf_fun_t *hc_fun = ((ohci_t*)fun->dev->driver_data)->hc_fun;
-	assert(hc_fun != NULL);
-
-	*handle = hc_fun->handle;
+	assert(fun);
+	ddf_fun_t *hc_fun = dev_to_ohci(fun->dev)->hc_fun;
+	assert(hc_fun);
+
+	if (handle != NULL)
+		*handle = hc_fun->handle;
 	return EOK;
 }
 /*----------------------------------------------------------------------------*/
-/** This iface is generic for both RH and HC. */
+/** Root hub USB interface */
 static usb_iface_t usb_iface = {
 	.get_hc_handle = usb_iface_get_hc_handle,
@@ -108,8 +124,10 @@
 };
 /*----------------------------------------------------------------------------*/
+/** Standard USB HC options (HC interface) */
 static ddf_dev_ops_t hc_ops = {
 	.interfaces[USBHC_DEV_IFACE] = &hc_iface, /* see iface.h/c */
 };
 /*----------------------------------------------------------------------------*/
+/** Standard USB RH options (RH interface) */
 static ddf_dev_ops_t rh_ops = {
 	.interfaces[USB_DEV_IFACE] = &usb_iface,
@@ -118,6 +136,6 @@
 /** Initialize hc and rh ddf structures and their respective drivers.
  *
+ * @param[in] device DDF instance of the device to use.
  * @param[in] instance OHCI structure to use.
- * @param[in] device DDF instance of the device to use.
  *
  * This function does all the preparatory work for hc and rh drivers:
@@ -127,34 +145,55 @@
  *  - registers interrupt handler
  */
-int ohci_init(ohci_t *instance, ddf_dev_t *device)
-{
-	assert(instance);
-	instance->hc_fun = NULL;
+int device_setup_ohci(ddf_dev_t *device)
+{
+	ohci_t *instance = malloc(sizeof(ohci_t));
+	if (instance == NULL) {
+		usb_log_error("Failed to allocate OHCI driver.\n");
+		return ENOMEM;
+	}
+
+#define CHECK_RET_DEST_FREE_RETURN(ret, message...) \
+if (ret != EOK) { \
+	if (instance->hc_fun) { \
+		instance->hc_fun->ops = NULL; \
+		instance->hc_fun->driver_data = NULL; \
+		ddf_fun_destroy(instance->hc_fun); \
+	} \
+	if (instance->rh_fun) { \
+		instance->rh_fun->ops = NULL; \
+		instance->rh_fun->driver_data = NULL; \
+		ddf_fun_destroy(instance->rh_fun); \
+	} \
+	free(instance); \
+	usb_log_error(message); \
+	return ret; \
+} else (void)0
+
 	instance->rh_fun = NULL;
-#define CHECK_RET_DEST_FUN_RETURN(ret, message...) \
-if (ret != EOK) { \
-	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
-	return ret; \
-}
-
-	uintptr_t mem_reg_base = 0;
-	size_t mem_reg_size = 0;
+	instance->hc_fun = ddf_fun_create(device, fun_exposed, "ohci-hc");
+	int ret = instance->hc_fun ? EOK : ENOMEM;
+	CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create OHCI HC function.\n");
+	instance->hc_fun->ops = &hc_ops;
+	instance->hc_fun->driver_data = &instance->hc;
+
+	instance->rh_fun = ddf_fun_create(device, fun_inner, "ohci-rh");
+	ret = instance->rh_fun ? EOK : ENOMEM;
+	CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create OHCI RH function.\n");
+	instance->rh_fun->ops = &rh_ops;
+
+	uintptr_t reg_base = 0;
+	size_t reg_size = 0;
 	int irq = 0;
 
-	int ret =
-	    pci_get_my_registers(device, &mem_reg_base, &mem_reg_size, &irq);
-	CHECK_RET_DEST_FUN_RETURN(ret,
+	ret = pci_get_my_registers(device, &reg_base, &reg_size, &irq);
+	CHECK_RET_DEST_FREE_RETURN(ret,
 	    "Failed to get memory addresses for %" PRIun ": %s.\n",
 	    device->handle, str_error(ret));
 	usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
-	    (void *) mem_reg_base, mem_reg_size, irq);
+	    (void *) reg_base, reg_size, irq);
 
 	bool interrupts = false;
 #ifdef CONFIG_USBHC_NO_INTERRUPTS
-	usb_log_warning("Interrupts disabled in OS config, " \
+	usb_log_warning("Interrupts disabled in OS config, "
 	    "falling back to polling.\n");
 #else
@@ -163,5 +202,5 @@
 		usb_log_warning("Failed to enable interrupts: %s.\n",
 		    str_error(ret));
-		usb_log_info("HW interrupts not available, " \
+		usb_log_info("HW interrupts not available, "
 		    "falling back to polling.\n");
 	} else {
@@ -171,34 +210,12 @@
 #endif
 
-	instance->hc_fun = ddf_fun_create(device, fun_exposed, "ohci-hc");
-	ret = (instance->hc_fun == NULL) ? ENOMEM : EOK;
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to create HC function.\n", ret);
-
-	ret = hc_init(&instance->hc, instance->hc_fun, device,
-	    mem_reg_base, mem_reg_size, interrupts);
-	CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init ohci-hcd.\n", ret);
-	instance->hc_fun->ops = &hc_ops;
-	instance->hc_fun->driver_data = &instance->hc;
-	ret = ddf_fun_bind(instance->hc_fun);
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to bind OHCI device function: %s.\n",
-	    ret, str_error(ret));
-	ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed to add OHCI to HC class: %s.\n", str_error(ret));
-
-#undef CHECK_RET_HC_RETURN
+	ret = hc_init(&instance->hc, reg_base, reg_size, interrupts);
+	CHECK_RET_DEST_FREE_RETURN(ret, "Failed(%d) to init ohci-hcd.\n", ret);
 
 #define CHECK_RET_FINI_RETURN(ret, message...) \
 if (ret != EOK) { \
-	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
 	hc_fini(&instance->hc); \
-	return ret; \
-}
+	CHECK_RET_DEST_FREE_RETURN(ret, message); \
+} else (void)0
 
 	/* It does no harm if we register this on polling */
@@ -208,17 +225,20 @@
 	    "Failed(%d) to register interrupt handler.\n", ret);
 
-	instance->rh_fun = ddf_fun_create(device, fun_inner, "ohci-rh");
-	ret = (instance->rh_fun == NULL) ? ENOMEM : EOK;
+	ret = ddf_fun_bind(instance->hc_fun);
 	CHECK_RET_FINI_RETURN(ret,
-	    "Failed(%d) to create root hub function.\n", ret);
-
-
-	instance->rh_fun->ops = &rh_ops;
-	instance->rh_fun->driver_data = NULL;
-	
+	    "Failed(%d) to bind OHCI device function: %s.\n",
+	    ret, str_error(ret));
+
+	ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
+	CHECK_RET_FINI_RETURN(ret,
+	    "Failed to add OHCI to HC class: %s.\n", str_error(ret));
+
 	device->driver_data = instance;
 
 	hc_start_hw(&instance->hc);
+	hc_register_hub(&instance->hc, instance->rh_fun);
 	return EOK;
+
+#undef CHECK_RET_DEST_FUN_RETURN
 #undef CHECK_RET_FINI_RETURN
 }
Index: uspace/drv/ohci/ohci.h
===================================================================
--- uspace/drv/ohci/ohci.h	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/ohci.h	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -38,16 +38,5 @@
 #include <ddf/driver.h>
 
-#include "hc.h"
-#include "root_hub.h"
-
-typedef struct ohci {
-	ddf_fun_t *hc_fun;
-	ddf_fun_t *rh_fun;
-
-	hc_t hc;
-	rh_t rh;
-} ohci_t;
-
-int ohci_init(ohci_t *instance, ddf_dev_t *device);
+int device_setup_ohci(ddf_dev_t *device);
 
 #endif
Index: uspace/drv/ohci/pci.c
===================================================================
--- uspace/drv/ohci/pci.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/ohci/pci.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -58,5 +58,8 @@
     uintptr_t *mem_reg_address, size_t *mem_reg_size, int *irq_no)
 {
-	assert(dev != NULL);
+	assert(dev);
+	assert(mem_reg_address);
+	assert(mem_reg_size);
+	assert(irq_no);
 
 	int parent_phone = devman_parent_device_connect(dev->handle,
Index: uspace/drv/uhci-hcd/hc.c
===================================================================
--- uspace/drv/uhci-hcd/hc.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/uhci-hcd/hc.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -60,5 +60,4 @@
  *
  * @param[in] instance Memory place to initialize.
- * @param[in] fun DDF function.
  * @param[in] regs Address of I/O control registers.
  * @param[in] size Size of I/O control registers.
@@ -69,6 +68,5 @@
  * interrupt fibrils.
  */
-int hc_init(hc_t *instance, ddf_fun_t *fun,
-    void *regs, size_t reg_size, bool interrupts)
+int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interrupts)
 {
 	assert(reg_size >= sizeof(regs_t));
Index: uspace/drv/uhci-hcd/hc.h
===================================================================
--- uspace/drv/uhci-hcd/hc.h	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/uhci-hcd/hc.h	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -136,6 +136,5 @@
 } hc_t;
 
-int hc_init(hc_t *instance, ddf_fun_t *fun,
-    void *regs, size_t reg_size, bool interupts);
+int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
 
 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
Index: uspace/drv/uhci-hcd/main.c
===================================================================
--- uspace/drv/uhci-hcd/main.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/uhci-hcd/main.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -64,11 +64,5 @@
 	assert(device);
 
-	uhci_t *uhci = malloc(sizeof(uhci_t));
-	if (uhci == NULL) {
-		usb_log_error("Failed to allocate UHCI driver.\n");
-		return ENOMEM;
-	}
-
-	int ret = uhci_init(uhci, device);
+	int ret = device_setup_uhci(device);
 	if (ret != EOK) {
 		usb_log_error("Failed to initialize UHCI driver: %s.\n",
@@ -76,6 +70,4 @@
 		return ret;
 	}
-	device->driver_data = uhci;
-
 	usb_log_info("Controlling new UHCI device '%s'.\n", device->name);
 
Index: uspace/drv/uhci-hcd/uhci.c
===================================================================
--- uspace/drv/uhci-hcd/uhci.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/uhci-hcd/uhci.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -44,4 +44,28 @@
 #include "pci.h"
 
+#include "hc.h"
+#include "root_hub.h"
+
+/** Structure representing both functions of UHCI hc, USB host controller
+ * and USB root hub */
+typedef struct uhci {
+	/** Pointer to DDF represenation of UHCI host controller */
+	ddf_fun_t *hc_fun;
+	/** Pointer to DDF represenation of UHCI root hub */
+	ddf_fun_t *rh_fun;
+
+	/** Internal driver's represenation of UHCI host controller */
+	hc_t hc;
+	/** Internal driver's represenation of UHCI root hub */
+	rh_t rh;
+} uhci_t;
+
+static inline uhci_t * dev_to_uhci(ddf_dev_t *dev)
+{
+	assert(dev);
+	assert(dev->driver_data);
+	return dev->driver_data;
+}
+/*----------------------------------------------------------------------------*/
 /** IRQ handling callback, forward status from call to diver structure.
  *
@@ -69,8 +93,7 @@
 {
 	assert(fun);
-	usb_device_keeper_t *manager =
-	    &((uhci_t*)fun->dev->driver_data)->hc.manager;
-
+	usb_device_keeper_t *manager = &dev_to_uhci(fun->dev)->hc.manager;
 	usb_address_t addr = usb_device_keeper_find(manager, handle);
+
 	if (addr < 0) {
 		return addr;
@@ -93,9 +116,10 @@
     ddf_fun_t *fun, devman_handle_t *handle)
 {
-	assert(handle);
-	ddf_fun_t *hc_fun = ((uhci_t*)fun->dev->driver_data)->hc_fun;
-	assert(hc_fun != NULL);
-
-	*handle = hc_fun->handle;
+	assert(fun);
+	ddf_fun_t *hc_fun = dev_to_uhci(fun->dev)->hc_fun;
+	assert(hc_fun);
+
+	if (handle != NULL)
+		*handle = hc_fun->handle;
 	return EOK;
 }
@@ -126,5 +150,5 @@
 static hw_res_ops_t hw_res_iface = {
 	.get_resource_list = get_resource_list,
-	.enable_interrupt = NULL
+	.enable_interrupt = NULL,
 };
 /*----------------------------------------------------------------------------*/
@@ -146,33 +170,55 @@
  *  - registers interrupt handler
  */
-int uhci_init(uhci_t *instance, ddf_dev_t *device)
-{
-	assert(instance);
-	instance->hc_fun = NULL;
+int device_setup_uhci(ddf_dev_t *device)
+{
+	assert(device);
+	uhci_t *instance = malloc(sizeof(uhci_t));
+	if (instance == NULL) {
+		usb_log_error("Failed to allocate OHCI driver.\n");
+		return ENOMEM;
+	}
+
+#define CHECK_RET_DEST_FREE_RETURN(ret, message...) \
+if (ret != EOK) { \
+	if (instance->hc_fun) \
+		instance->hc_fun->ops = NULL; \
+		instance->hc_fun->driver_data = NULL; \
+		ddf_fun_destroy(instance->hc_fun); \
+	if (instance->rh_fun) {\
+		instance->rh_fun->ops = NULL; \
+		instance->rh_fun->driver_data = NULL; \
+		ddf_fun_destroy(instance->rh_fun); \
+	} \
+	free(instance); \
+	usb_log_error(message); \
+	return ret; \
+} else (void)0
+
 	instance->rh_fun = NULL;
-#define CHECK_RET_DEST_FUN_RETURN(ret, message...) \
-if (ret != EOK) { \
-	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
-	return ret; \
-}
-
-	uintptr_t io_reg_base = 0;
-	size_t io_reg_size = 0;
+	instance->hc_fun = ddf_fun_create(device, fun_exposed, "uhci-hc");
+	int ret = (instance->hc_fun == NULL) ? ENOMEM : EOK;
+	CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create UHCI HC function.\n");
+	instance->hc_fun->ops = &hc_ops;
+	instance->hc_fun->driver_data = &instance->hc;
+
+	instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci-rh");
+	ret = (instance->rh_fun == NULL) ? ENOMEM : EOK;
+	CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create UHCI RH function.\n");
+	instance->rh_fun->ops = &rh_ops;
+	instance->rh_fun->driver_data = &instance->rh;
+
+	uintptr_t reg_base = 0;
+	size_t reg_size = 0;
 	int irq = 0;
 
-	int ret =
-	    pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq);
-	CHECK_RET_DEST_FUN_RETURN(ret,
+	ret = pci_get_my_registers(device, &reg_base, &reg_size, &irq);
+	CHECK_RET_DEST_FREE_RETURN(ret,
 	    "Failed to get I/O addresses for %" PRIun ": %s.\n",
 	    device->handle, str_error(ret));
 	usb_log_debug("I/O regs at 0x%p (size %zu), IRQ %d.\n",
-	    (void *) io_reg_base, io_reg_size, irq);
+	    (void *) reg_base, reg_size, irq);
 
 	ret = pci_disable_legacy(device);
-	CHECK_RET_DEST_FUN_RETURN(ret,
+	CHECK_RET_DEST_FREE_RETURN(ret,
 	    "Failed(%d) to disable legacy USB: %s.\n", ret, str_error(ret));
 
@@ -194,36 +240,15 @@
 #endif
 
-	instance->hc_fun = ddf_fun_create(device, fun_exposed, "uhci-hc");
-	ret = (instance->hc_fun == NULL) ? ENOMEM : EOK;
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to create HC function: %s.\n", ret, str_error(ret));
-
-	ret = hc_init(&instance->hc, instance->hc_fun,
-	    (void*)io_reg_base, io_reg_size, interrupts);
-	CHECK_RET_DEST_FUN_RETURN(ret,
+
+	ret = hc_init(&instance->hc, (void*)reg_base, reg_size, interrupts);
+	CHECK_RET_DEST_FREE_RETURN(ret,
 	    "Failed(%d) to init uhci-hcd: %s.\n", ret, str_error(ret));
-
-	instance->hc_fun->ops = &hc_ops;
-	instance->hc_fun->driver_data = &instance->hc;
-	ret = ddf_fun_bind(instance->hc_fun);
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to bind UHCI device function: %s.\n",
-	    ret, str_error(ret));
-	ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed to add UHCI to HC class: %s.\n", str_error(ret));
-
-#undef CHECK_RET_HC_RETURN
 
 #define CHECK_RET_FINI_RETURN(ret, message...) \
 if (ret != EOK) { \
-	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
 	hc_fini(&instance->hc); \
+	CHECK_RET_DEST_FREE_RETURN(ret, message); \
 	return ret; \
-}
+} else (void)0
 
 	/* It does no harm if we register this on polling */
@@ -234,9 +259,12 @@
 	    ret, str_error(ret));
 
-	instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci-rh");
-	ret = (instance->rh_fun == NULL) ? ENOMEM : EOK;
-	CHECK_RET_FINI_RETURN(ret,
-	    "Failed(%d) to create root hub function: %s.\n",
+	ret = ddf_fun_bind(instance->hc_fun);
+	CHECK_RET_FINI_RETURN(ret,
+	    "Failed(%d) to bind UHCI device function: %s.\n",
 	    ret, str_error(ret));
+
+	ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
+	CHECK_RET_FINI_RETURN(ret,
+	    "Failed to add UHCI to HC class: %s.\n", str_error(ret));
 
 	ret = rh_init(&instance->rh, instance->rh_fun,
@@ -245,10 +273,9 @@
 	    "Failed(%d) to setup UHCI root hub: %s.\n", ret, str_error(ret));
 
-	instance->rh_fun->ops = &rh_ops;
-	instance->rh_fun->driver_data = &instance->rh;
 	ret = ddf_fun_bind(instance->rh_fun);
 	CHECK_RET_FINI_RETURN(ret,
 	    "Failed(%d) to register UHCI root hub: %s.\n", ret, str_error(ret));
 
+	device->driver_data = instance;
 	return EOK;
 #undef CHECK_RET_FINI_RETURN
Index: uspace/drv/uhci-hcd/uhci.h
===================================================================
--- uspace/drv/uhci-hcd/uhci.h	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/uhci-hcd/uhci.h	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -38,22 +38,5 @@
 #include <ddf/driver.h>
 
-#include "hc.h"
-#include "root_hub.h"
-
-/** Structure representing both functions of UHCI hc, USB host controller
- * and USB root hub */
-typedef struct uhci {
-	/** Pointer to DDF represenation of UHCI host controller */
-	ddf_fun_t *hc_fun;
-	/** Pointer to DDF represenation of UHCI root hub */
-	ddf_fun_t *rh_fun;
-
-	/** Internal driver's represenation of UHCI host controller */
-	hc_t hc;
-	/** Internal driver's represenation of UHCI root hub */
-	rh_t rh;
-} uhci_t;
-
-int uhci_init(uhci_t *instance, ddf_dev_t *device);
+int device_setup_uhci(ddf_dev_t *device);
 #endif
 /**
Index: uspace/drv/usbhid/kbd/kbddev.c
===================================================================
--- uspace/drv/usbhid/kbd/kbddev.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/usbhid/kbd/kbddev.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -677,5 +677,5 @@
 //	    callbacks, kbd_dev);
 	usb_hid_report_path_t *path = usb_hid_report_path();
-	usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
+	usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_GENERIC_DESKTOP, 6);
 	//usb_hid_report_path_set_report_id(path, 0);
 
@@ -695,8 +695,8 @@
 	usb_hid_report_field_t *field = usb_hid_report_get_sibling(
 	    hid_dev->report, NULL, path, 
-	    USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
+	    USB_HID_PATH_COMPARE_BEGIN, 
 	    USB_HID_REPORT_TYPE_INPUT);
 	unsigned i = 0;
-	
+
 	while (field != NULL) {
 		//usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)\n", 
@@ -716,17 +716,18 @@
 		 *       two parts of the Report somehow.
 		 */
+		usb_log_debug("value(%x), usage(%x)\n", field->value, field->usage);
 		if (field->value != 0) {
-			kbd_dev->keys[i] = field->usage;
+			//kbd_dev->keys[i] = field->usage;
 		}
 		else {
-			kbd_dev->keys[i] = 0;
+			//kbd_dev->keys[i] = 0;
 		}
-		usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]);
+		//usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]);
 		
 		++i;
 		field = usb_hid_report_get_sibling(hid_dev->report, field, path, 
-		    USB_HID_PATH_COMPARE_END 
-		    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
+		    USB_HID_PATH_COMPARE_BEGIN,
 		    USB_HID_REPORT_TYPE_INPUT);
+		usb_log_debug("field -- %p\n", field);
 	}
 	
@@ -860,15 +861,8 @@
 	 * TODO: make more general
 	 */
-	usb_hid_report_path_t *path = usb_hid_report_path();
-	usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
-	
-	usb_hid_report_path_set_report_id(path, 0);
-	
 	kbd_dev->key_count = usb_hid_report_size(
 	    hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT);
-	usb_hid_report_path_free(path);
-	
-	usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count);
-	
+	
+	usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count);	
 	kbd_dev->keys = (int32_t *)calloc(kbd_dev->key_count, sizeof(int32_t));
 	
@@ -986,5 +980,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
Index: uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c
===================================================================
--- uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -180,4 +180,5 @@
  * @param key Key code of the key according to HID Usage Tables.
  */
+/*
 static void usb_lgtch_push_ev(usb_hid_dev_t *hid_dev, int type, 
     unsigned int key)
@@ -206,5 +207,5 @@
 	    ev.mods, ev.c);
 }
-
+*/
 /*----------------------------------------------------------------------------*/
 
@@ -396,9 +397,9 @@
 
 	usb_hid_report_field_t *field = usb_hid_report_get_sibling(
-	    hid_dev->report, NULL, path, USB_HID_PATH_COMPARE_END 
+	    hid_dev->report, NULL, path, USB_HID_PATH_COMPARE_BEGIN 
 	    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
 	    USB_HID_REPORT_TYPE_INPUT);
 	
-	unsigned int key;
+//	unsigned int key;
 	
 	/*! @todo Is this iterating OK if done multiple times? 
@@ -409,9 +410,9 @@
 		    field->usage);
 		
-		key = usb_lgtch_map_usage(field->usage);
-		usb_lgtch_push_ev(hid_dev, KEY_PRESS, key);
+//		key = usb_lgtch_map_usage(field->usage);
+//		usb_lgtch_push_ev(hid_dev, KEY_PRESS, key);
 		
 		field = usb_hid_report_get_sibling(
-		    hid_dev->report, field, path, USB_HID_PATH_COMPARE_END
+		    hid_dev->report, field, path, USB_HID_PATH_COMPARE_BEGIN
 		    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
 		    USB_HID_REPORT_TYPE_INPUT);
Index: uspace/drv/usbhid/subdrivers.c
===================================================================
--- uspace/drv/usbhid/subdrivers.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/usbhid/subdrivers.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -42,10 +42,10 @@
 
 static usb_hid_subdriver_usage_t path_kbd[] = {
-	{USB_HIDUT_PAGE_KEYBOARD, 0}, 
+	{USB_HIDUT_PAGE_GENERIC_DESKTOP, 6}, 
 	{0, 0}
 };
 
 static usb_hid_subdriver_usage_t path_mouse2[] = {
-	{USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_X},
+	{USB_HIDUT_PAGE_GENERIC_DESKTOP, 2},
 	{0, 0}
 };
@@ -60,6 +60,5 @@
 		path_kbd,
 		-1,
-		USB_HID_PATH_COMPARE_END 
-		| USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
+		USB_HID_PATH_COMPARE_BEGIN ,
 		-1,
 		-1,
@@ -75,6 +74,5 @@
 		lgtch_path,
 		1,
-		USB_HID_PATH_COMPARE_END 
-		| USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
+		USB_HID_PATH_COMPARE_BEGIN,
 		0x046d,
 		0xc30e,
@@ -89,6 +87,5 @@
 		path_mouse2,
 		-1,
-		USB_HID_PATH_COMPARE_END 
-		| USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
+		USB_HID_PATH_COMPARE_BEGIN,
 		-1,
 		-1,
Index: uspace/drv/usbhid/usbhid.c
===================================================================
--- uspace/drv/usbhid/usbhid.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/drv/usbhid/usbhid.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -199,12 +199,13 @@
 		    mapping->report_id);
 	}
-	
+
+	uint8_t report_id = (mapping->report_id >= 0) ? mapping->report_id : 0;
 	assert(hid_dev->report != NULL);
 	
 	usb_log_debug("Compare flags: %d\n", mapping->compare);
-	size_t size = usb_hid_report_size(hid_dev->report, mapping->report_id, 
+	size_t size = usb_hid_report_size(hid_dev->report, report_id, 
 	    USB_HID_REPORT_TYPE_INPUT);
 	usb_log_debug("Size of the input report: %zuB\n", size);
-	
+
 	usb_hid_report_path_free(usage_path);
 	
Index: uspace/lib/drv/generic/remote_usbhc.c
===================================================================
--- uspace/lib/drv/generic/remote_usbhc.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/lib/drv/generic/remote_usbhc.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -302,4 +302,5 @@
 	async_transaction_t *trans = async_transaction_create(callid);
 	if (trans == NULL) {
+		async_answer_0(data_callid, ENOMEM);
 		async_answer_0(callid, ENOMEM);
 		return;
@@ -314,4 +315,5 @@
 
 	if (rc != EOK) {
+		async_answer_0(data_callid, rc);
 		async_answer_0(callid, rc);
 		async_transaction_destroy(trans);
@@ -460,4 +462,5 @@
 	async_transaction_t *trans = async_transaction_create(callid);
 	if (trans == NULL) {
+		async_answer_0(data_callid, ENOMEM);
 		async_answer_0(callid, ENOMEM);
 		free(setup_packet);
@@ -469,4 +472,5 @@
 	trans->buffer = malloc(data_len);
 	if (trans->buffer == NULL) {
+		async_answer_0(data_callid, ENOMEM);
 		async_answer_0(callid, ENOMEM);
 		async_transaction_destroy(trans);
@@ -480,4 +484,5 @@
 
 	if (rc != EOK) {
+		async_answer_0(data_callid, rc);
 		async_answer_0(callid, rc);
 		async_transaction_destroy(trans);
Index: uspace/lib/usb/src/hiddescriptor.c
===================================================================
--- uspace/lib/usb/src/hiddescriptor.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/lib/usb/src/hiddescriptor.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -64,6 +64,9 @@
 {
 	/* find or append current collection path to the list */
-	link_t *path_it = report->collection_paths.next;
+	//link_t *path_it = report->collection_paths.next;
+	link_t *path_it = report->collection_paths.prev->next;
 	usb_hid_report_path_t *path = NULL;
+	
+	
 	while(path_it != &report->collection_paths) {
 		path = list_get_instance(path_it, usb_hid_report_path_t, link);
@@ -115,6 +118,4 @@
 	usb_hid_report_field_t *field;
 	int i;
-
-	usb_log_debug("usages_count  - %zu\n", report_item->usages_count);
 
 	uint32_t *usages;
@@ -147,5 +148,5 @@
 			*/
 			field->usage = 0;
-			field->usage_page = report_item->usage_page;
+			field->usage_page = 0; //report_item->usage_page;
 
 			field->usages_count = report_item->usages_count;
@@ -168,4 +169,5 @@
 			}
 			else {
+				// should not occur
 				field->usage = usage;
 				field->usage_page = report_item->usage_page;
@@ -465,6 +467,10 @@
 			
 			// set last item
-			usb_hid_report_set_last_item(usage_path, USB_HID_TAG_CLASS_GLOBAL, report_item->usage_page);
-			usb_hid_report_set_last_item(usage_path, USB_HID_TAG_CLASS_LOCAL, report_item->usages[report_item->usages_count-1]);
+			usb_hid_report_set_last_item(usage_path, 
+			                             USB_HID_TAG_CLASS_GLOBAL, 
+			                             USB_HID_EXTENDED_USAGE_PAGE(report_item->usages[report_item->usages_count-1]));
+			usb_hid_report_set_last_item(usage_path, 
+			                             USB_HID_TAG_CLASS_LOCAL, 
+			                             USB_HID_EXTENDED_USAGE(report_item->usages[report_item->usages_count-1]));
 			
 			// append the new one which will be set by common
@@ -561,4 +567,6 @@
                              usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path)
 {
+	int32_t extended_usage;
+	
 	switch(tag) {
 		case USB_HID_REPORT_TAG_USAGE:
@@ -570,5 +578,7 @@
 					report_item->in_delimiter = INSIDE_DELIMITER_SET;
 				case OUTSIDE_DELIMITER_SET:
-					report_item->usages[report_item->usages_count] = usb_hid_report_tag_data_uint32(data,item_size);
+					extended_usage = ((report_item->usage_page) << 16);
+					extended_usage += usb_hid_report_tag_data_uint32(data,item_size);
+					report_item->usages[report_item->usages_count] = extended_usage;
 					report_item->usages_count++;
 					break;
@@ -607,5 +617,6 @@
 				}
 				else {
-					report_item->usages[report_item->usages_count++] = i;
+					
+					report_item->usages[report_item->usages_count++] = (report_item->usage_page << 16) + i;
 				}
 			}
@@ -691,4 +702,5 @@
 		usb_log_debug("\t\ttUSAGEMIN: %X\n", report_item->usage_minimum);
 		usb_log_debug("\t\tUSAGEMAX: %X\n", report_item->usage_maximum);
+		usb_log_debug("\t\tUSAGES COUNT: %zu\n", report_item->usages_count);
 
 		usb_log_debug("\t\tVALUE: %X\n", report_item->value);
@@ -696,5 +708,5 @@
 		usb_log_debug("\t\tUSAGE PAGE: %X\n", report_item->usage_page);
 		
-		//usb_hid_print_usage_path(report_item->collection_path);
+		usb_hid_print_usage_path(report_item->collection_path);
 
 		usb_log_debug("\n");		
@@ -728,5 +740,5 @@
 		usb_hid_descriptor_print_list(&report_des->report_items);
 
-
+/*
 		link_t *path_it = report->collection_paths.next;
 		while(path_it != &report->collection_paths) {
@@ -734,5 +746,5 @@
 			path_it = path_it->next;
 		}
-		
+*/		
 		report_it = report_it->next;
 	}
Index: uspace/lib/usb/src/hidparser.c
===================================================================
--- uspace/lib/usb/src/hidparser.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/lib/usb/src/hidparser.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -111,5 +111,5 @@
 	usb_hid_report_description_t *report_des;
 	usb_hid_report_type_t type = USB_HID_REPORT_TYPE_INPUT;
-
+	
 	if(report == NULL) {
 		return EINVAL;
@@ -140,6 +140,13 @@
 		
 				item->usage = USB_HID_EXTENDED_USAGE(item->usages[item->value - item->physical_minimum]);
-				item->usage_page = USB_HID_EXTENDED_USAGE_PAGE(item->usages[item->value - item->physical_minimum]);
-
+				item->usage_page = USB_HID_EXTENDED_USAGE_PAGE(item->usages[item->value - item->physical_minimum]);				
+
+				usb_hid_report_set_last_item (item->collection_path, 
+				                              USB_HID_TAG_CLASS_GLOBAL,
+				                              item->usage_page);
+				usb_hid_report_set_last_item (item->collection_path, 
+				                              USB_HID_TAG_CLASS_LOCAL,
+				                              item->usage);
+				
 			}
 			else {
@@ -150,5 +157,5 @@
 		list_item = list_item->next;
 	}
-	   
+	
 	return EOK;
 	
Index: uspace/lib/usb/src/hidpath.c
===================================================================
--- uspace/lib/usb/src/hidpath.c	(revision cc5908ebb647ae50145e0da5792c167a91835e00)
+++ uspace/lib/usb/src/hidpath.c	(revision 252cf2ac9a065f1f05c769741c851681c52a9640)
@@ -42,4 +42,7 @@
 
 
+#define USB_HID_SAME_USAGE(usage1, usage2)	((usage1 == usage2) || (usage1 == 0) || (usage2 == 0))
+#define USB_HID_SAME_USAGE_PAGE(page1, page2)	((page1 == page2) || (page1 == 0) || (page2 == 0))
+
 /**
  * Appends one item (couple of usage_path and usage) into the usage path
@@ -203,7 +206,7 @@
 			while(report_link != &report_path->head) {
 				report_item = list_get_instance(report_link, usb_hid_report_usage_path_t, link);
-				if(report_item->usage_page == path_item->usage_page){
+				if(USB_HID_SAME_USAGE_PAGE(report_item->usage_page, path_item->usage_page)){
 					if(only_page == 0){
-						if(report_item->usage == path_item->usage) {
+						if(USB_HID_SAME_USAGE(report_item->usage, path_item->usage)) {
 							return EOK;
 						}
@@ -242,7 +245,7 @@
 					                              link);		
 
-					if((report_item->usage_page != path_item->usage_page) || 
+					if(!USB_HID_SAME_USAGE_PAGE(report_item->usage_page, path_item->usage_page) || 
 					   ((only_page == 0) && 
-					    (report_item->usage != path_item->usage))) {
+					    !USB_HID_SAME_USAGE(report_item->usage, path_item->usage))) {
 							
 						   return 1;
@@ -282,9 +285,9 @@
 					                              usb_hid_report_usage_path_t, 
 					                              link);		
-
-					if((report_item->usage_page != path_item->usage_page) || 
+						  
+					if(!USB_HID_SAME_USAGE_PAGE(report_item->usage_page, path_item->usage_page) || 
 					   ((only_page == 0) && 
-					    (report_item->usage != path_item->usage))) {
-						   return 1;
+					    !USB_HID_SAME_USAGE(report_item->usage, path_item->usage))) {
+							return 1;
 					} else {
 						report_link = report_link->prev;
