Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/isa/isa.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -51,5 +51,5 @@
 
 #include <driver.h>
-#include <resource.h>
+#include <ops/hw_res.h>
 
 #include <devman.h>
@@ -84,5 +84,5 @@
 }
 
-static resource_iface_t isa_child_res_iface = {
+static hw_res_ops_t isa_child_hw_res_ops = {
 	&isa_get_child_resources,
 	&isa_enable_child_interrupt
@@ -502,5 +502,5 @@
 static void isa_init() 
 {
-	isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_res_iface;
+	isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_hw_res_ops;
 }
 
Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/ns8250/ns8250.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -53,6 +53,5 @@
 
 #include <driver.h>
-#include <char.h>
-#include <resource.h>
+#include <ops/char_dev.h>
 
 #include <devman.h>
@@ -227,5 +226,5 @@
 
 /** The character interface's callbacks. */
-static char_iface_t ns8250_char_iface = {
+static char_dev_ops_t ns8250_char_dev_ops = {
 	.read = &ns8250_read,
 	.write = &ns8250_write
@@ -347,5 +346,5 @@
 	
 	/* Get hw resources. */
-	ret = get_hw_resources(dev->parent_phone, &hw_resources);
+	ret = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
 	if (ret != EOK) {
 		printf(NAME ": failed to get hw resources for the device "
@@ -394,10 +393,10 @@
 	}
 	
-	clean_hw_resource_list(&hw_resources);
+	hw_res_clean_resource_list(&hw_resources);
 	return ret;
 	
 failed:
 	ns8250_dev_cleanup(dev);
-	clean_hw_resource_list(&hw_resources);
+	hw_res_clean_resource_list(&hw_resources);
 	return ret;
 }
@@ -924,5 +923,5 @@
 	ns8250_dev_ops.close = &ns8250_close;
 	
-	ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_iface;
+	ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_dev_ops;
 	ns8250_dev_ops.default_handler = &ns8250_default_handler;
 }
Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/pciintel/pci.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -49,5 +49,5 @@
 #include <ipc/devman.h>
 #include <ipc/dev_iface.h>
-#include <resource.h>
+#include <ops/hw_res.h>
 #include <device/hw_res.h>
 #include <ddi.h>
@@ -77,5 +77,5 @@
 }
 
-static resource_iface_t pciintel_child_res_iface = {
+static hw_res_ops_t pciintel_child_hw_res_ops = {
 	&pciintel_get_child_resources,
 	&pciintel_enable_child_interrupt
@@ -473,5 +473,5 @@
 	hw_resource_list_t hw_resources;
 	
-	rc = get_hw_resources(dev->parent_phone, &hw_resources);
+	rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
 	if (rc != EOK) {
 		printf(NAME ": pci_add_device failed to get hw resources for "
@@ -497,5 +497,5 @@
 		delete_pci_bus_data(bus_data);
 		ipc_hangup(dev->parent_phone);
-		clean_hw_resource_list(&hw_resources);
+		hw_res_clean_resource_list(&hw_resources);
 		return EADDRNOTAVAIL;
 	}
@@ -508,5 +508,5 @@
 	pci_bus_scan(dev, 0);
 	
-	clean_hw_resource_list(&hw_resources);
+	hw_res_clean_resource_list(&hw_resources);
 	
 	return EOK;
@@ -515,5 +515,5 @@
 static void pciintel_init(void)
 {
-	pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface;
+	pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_hw_res_ops;
 }
 
@@ -537,5 +537,5 @@
 {
 	if (dev_data != NULL) {
-		clean_hw_resource_list(&dev_data->hw_resources);
+		hw_res_clean_resource_list(&dev_data->hw_resources);
 		free(dev_data);
 	}
Index: uspace/drv/rootpc/rootpc.c
===================================================================
--- uspace/drv/rootpc/rootpc.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/rootpc/rootpc.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -50,5 +50,5 @@
 #include <ipc/devman.h>
 #include <ipc/dev_iface.h>
-#include <resource.h>
+#include <ops/hw_res.h>
 #include <device/hw_res.h>
 
@@ -107,5 +107,5 @@
 }
 
-static resource_iface_t child_res_iface = {
+static hw_res_ops_t child_hw_res_ops = {
 	&rootpc_get_child_resources,
 	&rootpc_enable_child_interrupt
@@ -190,5 +190,5 @@
 static void root_pc_init(void)
 {
-	rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_res_iface;
+	rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_hw_res_ops;
 }
 
Index: uspace/drv/test1/char.c
===================================================================
--- uspace/drv/test1/char.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/test1/char.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -33,5 +33,5 @@
 #include <errno.h>
 #include <mem.h>
-#include <char.h>
+#include <ops/char_dev.h>
 
 #include "test1.h"
@@ -46,5 +46,5 @@
 }
 
-static char_iface_t char_interface = {
+static char_dev_ops_t char_dev_ops = {
 	.read = &impl_char_read,
 	.write = &imp_char_write
@@ -52,5 +52,5 @@
 
 device_ops_t char_device_ops = {
-	.interfaces[CHAR_DEV_IFACE] = &char_interface
+	.interfaces[CHAR_DEV_IFACE] = &char_dev_ops
 };
 
Index: uspace/drv/usbhub/main.c
===================================================================
--- uspace/drv/usbhub/main.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/usbhub/main.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -38,4 +38,5 @@
 
 usb_general_list_t usb_hub_list;
+futex_t usb_hub_list_lock;
 
 static driver_ops_t hub_driver_ops = {
@@ -60,5 +61,7 @@
 {
 	usb_dprintf_enable(NAME,1);
+	futex_initialize(&usb_hub_list_lock, 0);
 	usb_lst_init(&usb_hub_list);
+	futex_up(&usb_hub_list_lock);
 	fid_t fid = fibril_create(usb_hub_control_loop, NULL);
 	if (fid == 0) {
Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/usbhub/usbhub.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -75,5 +75,5 @@
 	//get some hub info
 	usb_address_t addr = usb_drv_get_my_address(hc, device);
-	dprintf(1,"[usb_hub] addres of newly created hub = %d", addr);
+	dprintf(1,"[usb_hub] address of newly created hub = %d", addr);
 	/*if(addr<0){
 		//return result;
@@ -174,4 +174,5 @@
 		dprintf(1,"[usb_hub] THERE ARE NO CONFIGURATIONS AVAILABLE");
 	}
+	/// \TODO check other configurations
 	usb_standard_configuration_descriptor_t config_descriptor;
 	opResult = usb_drv_req_get_bare_configuration_descriptor(hc,
@@ -194,5 +195,4 @@
 	}
 
-
 	for (port = 1; port < hub_info->port_count+1; ++port) {
 		usb_hub_set_power_port_request(&request, port);
@@ -205,9 +205,11 @@
 	//ports powered, hub seems to be enabled
 
-
 	ipc_hangup(hc);
 
 	//add the hub to list
+	futex_down(&usb_hub_list_lock);
 	usb_lst_append(&usb_hub_list, hub_info);
+	futex_up(&usb_hub_list_lock);
+
 	dprintf(1,"[usb_hub] hub info added to list");
 	//(void)hub_info;
@@ -233,4 +235,20 @@
 //
 //*********************************************
+
+/**
+ * convenience function for releasing default address and writing debug info
+ * (these few lines are used too often to be written again and again)
+ * @param hc
+ * @return
+ */
+inline static int usb_hub_release_default_address(int hc){
+	int opResult;
+	dprintf(1,"[usb_hub] releasing default address");
+	opResult = usb_drv_release_default_address(hc);
+	if (opResult != EOK) {
+		dprintf(1,"[usb_hub] failed to release default address");
+	}
+	return opResult;
+}
 
 /**
@@ -259,23 +277,7 @@
 	if (opResult != EOK) {
 		dprintf(1,"[usb_hub] something went wrong when reseting a port");
-	}
-}
-
-/**
- * convenience function for releasing default address and writing debug info
- * (these few lines are used too often to be written again and again)
- * @param hc
- * @return
- */
-inline static int usb_hub_release_default_address(int hc){
-	int opResult;
-	dprintf(1,"[usb_hub] releasing default address");
-	opResult = usb_drv_release_default_address(hc);
-	if (opResult != EOK) {
-		dprintf(1,"[usb_hub] failed to release default address");
-	}
-	return opResult;
-}
-
+		usb_hub_release_default_address(hc);
+	}
+}
 
 /**
@@ -343,5 +345,5 @@
 
 /**
- * unregister device address in hc, close the port
+ * unregister device address in hc
  * @param hc
  * @param port
@@ -352,15 +354,5 @@
 	//usb_device_request_setup_packet_t request;
 	int opResult;
-	//disable port
-	/*usb_hub_set_disable_port_request(&request, port);
-	opResult = usb_drv_sync_control_write(
-			hc, target,
-			&request,
-			NULL, 0
-			);
-	if (opResult != EOK) {
-		//continue;
-		printf("[usb_hub] something went wrong when disabling a port\n");
-	}*/
+	
 	/// \TODO remove device
 
@@ -457,7 +449,9 @@
 	 */
 	usb_general_list_t * lst_item;
+	futex_down(&usb_hub_list_lock);
 	for (lst_item = usb_hub_list.next;
 			lst_item != &usb_hub_list;
 			lst_item = lst_item->next) {
+		futex_up(&usb_hub_list_lock);
 		usb_hub_info_t * hub_info = ((usb_hub_info_t*)lst_item->data);
 		/*
@@ -510,7 +504,10 @@
 			}
 		}
+		free(change_bitmap);
 
 		ipc_hangup(hc);
-	}
+		futex_down(&usb_hub_list_lock);
+	}
+	futex_up(&usb_hub_list_lock);
 }
 
Index: uspace/drv/usbhub/usbhub_private.h
===================================================================
--- uspace/drv/usbhub/usbhub_private.h	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/usbhub/usbhub_private.h	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -43,4 +43,6 @@
 #include <bool.h>
 #include <driver.h>
+#include <futex.h>
+
 #include <usb/usb.h>
 #include <usb/usbdrv.h>
@@ -66,5 +68,5 @@
 
 /**
- * @brief create hub structure instance
+ * create hub structure instance
  *
  * Set the address and port count information most importantly.
@@ -79,7 +81,10 @@
 extern usb_general_list_t usb_hub_list;
 
+/** lock for hub list*/
+extern futex_t usb_hub_list_lock;
+
 
 /**
- * @brief perform complete control read transaction
+ * perform complete control read transaction
  *
  * manages all three steps of transaction: setup, read and finalize
@@ -99,7 +104,7 @@
 
 /**
- * @brief perform complete control write transaction
+ * perform complete control write transaction
  *
- * maanges all three steps of transaction: setup, write and finalize
+ * manages all three steps of transaction: setup, write and finalize
  * @param phone
  * @param target
@@ -114,21 +119,4 @@
     void * sent_buffer, size_t sent_size
 );
-
-
-/**
- * set the device request to be a set address request
- * @param request
- * @param addr
- * \TODO this will be obsolete see usb/dev_req.h
- */
-static inline void usb_hub_set_set_address_request(
-usb_device_request_setup_packet_t * request, uint16_t addr
-){
-	request->index = 0;
-	request->request_type = 0;/// \TODO this is not very nice sollution, we ned constant
-	request->request = USB_DEVREQ_SET_ADDRESS;
-	request->value = addr;
-	request->length = 0;
-}
 
 /**
Index: uspace/drv/usbhub/utils.c
===================================================================
--- uspace/drv/usbhub/utils.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/usbhub/utils.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -200,60 +200,5 @@
 
 
-/*
- * method for testing port status bitmap
- 
-static void usb_hub_test_port_status(void) {
-	printf("[usb_hub] -------------port status test---------\n");
-	usb_port_status_t status = 0;
-
-	//printf("original status %d (should be 0)\n",(uint32_t)status);
-	usb_port_set_bit(&status, 1, 1);
-	//printf("%d =?= 2\n",(uint32_t)status);
-	if (status != 2) {
-		printf("[usb_port_status] test failed: wrong set of bit 1\n");
-		return;
-	}
-	usb_port_set_bit(&status, 3, 1);
-	if (status != 10) {
-		printf("[usb_port_status] test failed: wrong set of bit 3\n");
-		return;
-	}
-
-	usb_port_set_bit(&status, 15, 1);
-	if (status != 10 + (1 << 15)) {
-		printf("[usb_port_status] test failed: wrong set of bit 15\n");
-		return;
-	}
-	usb_port_set_bit(&status, 1, 0);
-	if (status != 8 + (1 << 15)) {
-		printf("[usb_port_status] test failed: wrong unset of bit 1\n");
-		return;
-	}
-	int i;
-	for (i = 0; i < 32; ++i) {
-		if (i == 3 || i == 15) {
-			if (!usb_port_get_bit(&status, i)) {
-				printf("[usb_port_status] test failed: wrong bit at %d\n", i);
-			}
-		} else {
-			if (usb_port_get_bit(&status, i)) {
-				printf("[usb_port_status] test failed: wrong bit at %d\n", i);
-			}
-		}
-	}
-
-	printf("test ok\n");
-
-
-	//printf("%d =?= 10\n",(uint32_t)status);
-
-	//printf("this should be 0: %d \n",usb_port_get_bit(&status,0));
-	//printf("this should be 1: %d \n",usb_port_get_bit(&status,1));
-	//printf("this should be 0: %d \n",usb_port_get_bit(&status,2));
-	//printf("this should be 1: %d \n",usb_port_get_bit(&status,3));
-	//printf("this should be 0: %d \n",usb_port_get_bit(&status,4));
-
-}
-*/
+
 
 
Index: uspace/drv/usbkbd/main.c
===================================================================
--- uspace/drv/usbkbd/main.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/usbkbd/main.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -79,14 +79,10 @@
 }
 
+#if 0
 static void send_key(int key, int type, wchar_t c) {
 	async_msg_4(console_callback_phone, KBD_EVENT, type, key,
 	    KM_NUM_LOCK, c);
 }
-
-static void send_alnum(int key, wchar_t c) {
-	printf(NAME ": sending key '%lc' to console\n", (wint_t) c);
-	send_key(key, KEY_PRESS, c);
-	send_key(key, KEY_RELEASE, c);
-}
+#endif
 
 /*
@@ -230,13 +226,4 @@
 	callbacks->keyboard = usbkbd_process_keycodes;
 
-	if (console_callback_phone != -1) {
-		static size_t counter = 0;
-		counter++;
-		if (counter > 3) {
-			counter = 0;
-			send_alnum(KC_A, L'a');
-		}
-	}
-
 	usb_hid_parse_report(kbd_dev->parser, buffer, actual_size, callbacks, 
 	    NULL);
Index: uspace/drv/vhc/hcd.c
===================================================================
--- uspace/drv/vhc/hcd.c	(revision b2a6fcfe62e491c8d0a4c86810869e9bcff954a5)
+++ uspace/drv/vhc/hcd.c	(revision f40131243ad1635ce6cd59eaf5a91902710c0306)
@@ -86,4 +86,6 @@
 	dev->ops = &vhc_ops;
 
+	devman_add_device_to_class(dev->handle, "usbhc");
+
 	/*
 	 * Initialize our hub and announce its presence.
