Index: uspace/drv/uhci-hcd/batch.c
===================================================================
--- uspace/drv/uhci-hcd/batch.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/batch.c	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -153,4 +153,16 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Mark batch as failed and continue with next step.
+ *
+ * @param[in] instance Batch structure to use.
+ *
+ */
+void batch_abort(batch_t *instance)
+{
+	assert(instance);
+	instance->error = EIO;
+	instance->next_step(instance);
+}
+/*----------------------------------------------------------------------------*/
 /** Check batch TDs for activity.
  *
@@ -251,5 +263,6 @@
 	assert(instance);
 	/* We are data out, we are supposed to provide data */
-	memcpy(instance->transport_buffer, instance->buffer, instance->buffer_size);
+	memcpy(instance->transport_buffer, instance->buffer,
+	    instance->buffer_size);
 	batch_data(instance, USB_PID_OUT);
 	instance->next_step = batch_call_out_and_dispose;
@@ -281,5 +294,6 @@
 	assert(instance);
 	/* We are data out, we are supposed to provide data */
-	memcpy(instance->transport_buffer, instance->buffer, instance->buffer_size);
+	memcpy(instance->transport_buffer, instance->buffer,
+	    instance->buffer_size);
 	batch_data(instance, USB_PID_OUT);
 	instance->next_step = batch_call_out_and_dispose;
Index: uspace/drv/uhci-hcd/batch.h
===================================================================
--- uspace/drv/uhci-hcd/batch.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/batch.h	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -69,14 +69,23 @@
 } batch_t;
 
-batch_t * batch_get(ddf_fun_t *fun, usb_target_t target,
-    usb_transfer_type_t transfer_type, size_t max_packet_size,
-    usb_speed_t speed, char *buffer, size_t size,
-		char *setup_buffer, size_t setup_size,
+batch_t * batch_get(
+    ddf_fun_t *fun,
+		usb_target_t target,
+    usb_transfer_type_t transfer_type,
+		size_t max_packet_size,
+    usb_speed_t speed,
+		char *buffer,
+		size_t size,
+		char *setup_buffer,
+		size_t setup_size,
     usbhc_iface_transfer_in_callback_t func_in,
-    usbhc_iface_transfer_out_callback_t func_out, void *arg,
+    usbhc_iface_transfer_out_callback_t func_out,
+		void *arg,
 		device_keeper_t *manager
 		);
 
 void batch_dispose(batch_t *instance);
+
+void batch_abort(batch_t *instance);
 
 bool batch_is_complete(batch_t *instance);
Index: uspace/drv/uhci-hcd/transfer_list.c
===================================================================
--- uspace/drv/uhci-hcd/transfer_list.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/transfer_list.c	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -129,4 +129,58 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Check list for finished batches.
+ *
+ * @param[in] instance List to use.
+ * @return Error code
+ *
+ * Creates a local list of finished batches and calls next_step on each and
+ * every one. This is safer because next_step may theoretically access
+ * this transfer list leading to the deadlock if its done inline.
+ */
+void transfer_list_remove_finished(transfer_list_t *instance)
+{
+	assert(instance);
+
+	LIST_INITIALIZE(done);
+
+	fibril_mutex_lock(&instance->guard);
+	link_t *current = instance->batch_list.next;
+	while (current != &instance->batch_list) {
+		link_t *next = current->next;
+		batch_t *batch = list_get_instance(current, batch_t, link);
+
+		if (batch_is_complete(batch)) {
+			/* Save for post-processing */
+			transfer_list_remove_batch(instance, batch);
+			list_append(current, &done);
+		}
+		current = next;
+	}
+	fibril_mutex_unlock(&instance->guard);
+
+	while (!list_empty(&done)) {
+		link_t *item = done.next;
+		list_remove(item);
+		batch_t *batch = list_get_instance(item, batch_t, link);
+		batch->next_step(batch);
+	}
+}
+/*----------------------------------------------------------------------------*/
+/** Walk the list and abort all batches.
+ *
+ * @param[in] instance List to use.
+ */
+void transfer_list_abort_all(transfer_list_t *instance)
+{
+	fibril_mutex_lock(&instance->guard);
+	while (list_empty(&instance->batch_list)) {
+		link_t *current = instance->batch_list.next;
+		batch_t *batch = list_get_instance(current, batch_t, link);
+		transfer_list_remove_batch(instance, batch);
+		batch_abort(batch);
+	}
+	fibril_mutex_unlock(&instance->guard);
+}
+/*----------------------------------------------------------------------------*/
 /** Remove a transfer batch from the list and queue.
  *
@@ -163,42 +217,4 @@
 	    batch, pos, instance->name, batch->qh->next);
 }
-/*----------------------------------------------------------------------------*/
-/** Check list for finished batches.
- *
- * @param[in] instance List to use.
- * @return Error code
- *
- * Creates a local list of finished batches and calls next_step on each and
- * every one. This is safer because next_step may theoretically access
- * this transfer list leading to the deadlock if its done inline.
- */
-void transfer_list_remove_finished(transfer_list_t *instance)
-{
-	assert(instance);
-
-	LIST_INITIALIZE(done);
-
-	fibril_mutex_lock(&instance->guard);
-	link_t *current = instance->batch_list.next;
-	while (current != &instance->batch_list) {
-		link_t *next = current->next;
-		batch_t *batch = list_get_instance(current, batch_t, link);
-
-		if (batch_is_complete(batch)) {
-			/* Save for post-processing */
-			transfer_list_remove_batch(instance, batch);
-			list_append(current, &done);
-		}
-		current = next;
-	}
-	fibril_mutex_unlock(&instance->guard);
-
-	while (!list_empty(&done)) {
-		link_t *item = done.next;
-		list_remove(item);
-		batch_t *batch = list_get_instance(item, batch_t, link);
-		batch->next_step(batch);
-	}
-}
 /**
  * @}
Index: uspace/drv/uhci-hcd/transfer_list.h
===================================================================
--- uspace/drv/uhci-hcd/transfer_list.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/transfer_list.h	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -66,7 +66,9 @@
 void transfer_list_set_next(transfer_list_t *instance, transfer_list_t *next);
 
+void transfer_list_add_batch(transfer_list_t *instance, batch_t *batch);
+
 void transfer_list_remove_finished(transfer_list_t *instance);
 
-void transfer_list_add_batch(transfer_list_t *instance, batch_t *batch);
+void transfer_list_abort_all(transfer_list_t *instance);
 #endif
 /**
Index: uspace/drv/uhci-hcd/uhci_hc.c
===================================================================
--- uspace/drv/uhci-hcd/uhci_hc.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/uhci_hc.c	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -97,4 +97,6 @@
 
 	instance->hw_interrupts = interrupts;
+	instance->hw_failures = 0;
+
 	/* Setup UHCI function. */
 	instance->ddf_instance = fun;
@@ -149,5 +151,8 @@
 	while ((pio_read_16(&registers->usbcmd) & UHCI_CMD_HCRESET) != 0);
 
-	/* Set framelist pointer */
+	/* Set frame to exactly 1ms */
+	pio_write_8(&registers->sofmod, 64);
+
+	/* Set frame list pointer */
 	const uint32_t pa = addr_to_phys(instance->frame_list);
 	pio_write_32(&registers->flbaseadd, pa);
@@ -347,5 +352,5 @@
 {
 	assert(instance);
-	/* TODO: Check interrupt cause here */
+	/* TODO: Resume interrupts are not supported */
 	/* Lower 2 bits are transaction error and transaction complete */
 	if (status & 0x3) {
@@ -354,4 +359,21 @@
 		transfer_list_remove_finished(&instance->transfers_control_full);
 		transfer_list_remove_finished(&instance->transfers_bulk_full);
+	}
+	/* bits 4 and 5 indicate hc error */
+	if (status & 0x18) {
+		usb_log_error("UHCI hardware failure!.\n");
+		++instance->hw_failures;
+		transfer_list_abort_all(&instance->transfers_interrupt);
+		transfer_list_abort_all(&instance->transfers_control_slow);
+		transfer_list_abort_all(&instance->transfers_control_full);
+		transfer_list_abort_all(&instance->transfers_bulk_full);
+
+		if (instance->hw_failures < UHCI_ALLOWED_HW_FAIL) {
+			/* reinitialize hw, this triggers virtual disconnect*/
+			uhci_hc_init_hw(instance);
+		} else {
+			usb_log_fatal("Too many UHCI hardware failures!.\n");
+			uhci_hc_fini(instance);
+		}
 	}
 }
Index: uspace/drv/uhci-hcd/uhci_hc.h
===================================================================
--- uspace/drv/uhci-hcd/uhci_hc.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/uhci_hc.h	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -80,4 +80,5 @@
 #define UHCI_CLEANER_TIMEOUT 10000
 #define UHCI_DEBUGER_TIMEOUT 5000000
+#define UHCI_ALLOWED_HW_FAIL 5
 
 typedef struct uhci_hc {
@@ -100,4 +101,5 @@
 	fid_t debug_checker;
 	bool hw_interrupts;
+	unsigned hw_failures;
 
 	ddf_fun_t *ddf_instance;
Index: uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c
===================================================================
--- uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -159,5 +159,5 @@
 	    (s & TD_STATUS_ERROR_BIT_STUFF) ? " BIT_STUFF," : "",
 	    (s & TD_STATUS_ERROR_RESERVED) ? " RESERVED," : "",
-	    (s >> TD_STATUS_ACTLEN_POS) & TD_STATUS_ACTLEN_MASK
+	    td_act_size(instance)
 	);
 }
Index: uspace/drv/usbhub/port_status.h
===================================================================
--- uspace/drv/usbhub/port_status.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/usbhub/port_status.h	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -270,4 +270,21 @@
 }
 
+//low speed device attached
+static inline bool usb_port_high_speed(usb_port_status_t * status){
+	return usb_port_get_bit(status,10);
+}
+
+static inline void usb_port_set_high_speed(usb_port_status_t * status,bool high_speed){
+	usb_port_set_bit(status,10,high_speed);
+}
+
+static inline usb_speed_t usb_port_speed(usb_port_status_t * status){
+	if(usb_port_low_speed(status))
+		return USB_SPEED_LOW;
+	if(usb_port_high_speed(status))
+		return USB_SPEED_HIGH;
+	return USB_SPEED_FULL;
+}
+
 
 //connect change
Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/usbhub/usbhub.c	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -78,6 +78,6 @@
 		async_usleep(1000 * 1000 );/// \TODO proper number once
 	}
-	dprintf(USB_LOG_LEVEL_ERROR,
-				"something in ctrl loop went wrong, errno %d",errorCode);
+	usb_log_error("something in ctrl loop went wrong, errno %d",errorCode);
+
 	return 0;
 }
@@ -104,6 +104,5 @@
 			hub->device);
 	if(opResult != EOK){
-		dprintf(USB_LOG_LEVEL_ERROR,
-				"could not initialize connection to hc, errno %d",opResult);
+		usb_log_error("could not initialize connection to hc, errno %d",opResult);
 		return opResult;
 	}
@@ -112,6 +111,6 @@
 			hub->device);
 	if(opResult != EOK){
-		dprintf(USB_LOG_LEVEL_ERROR,
-				"could not initialize connection to device, errno %d",opResult);
+		usb_log_error("could not initialize connection to device, errno %d",
+				opResult);
 		return opResult;
 	}
@@ -120,6 +119,6 @@
             &hub->device_connection);
 	if(opResult != EOK){
-		dprintf(USB_LOG_LEVEL_ERROR,
-				"could not initialize connection to device endpoint, errno %d",opResult);
+		usb_log_error("could not initialize connection to device endpoint, errno %d",
+				opResult);
 		return opResult;
 	}
@@ -127,5 +126,5 @@
 	opResult = usb_endpoint_pipe_probe_default_control(&hub->endpoints.control);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, "failed probing endpoint 0, %d", opResult);
+		usb_log_error("failed probing endpoint 0, %d", opResult);
 		return opResult;
 	}
@@ -151,11 +150,11 @@
 	    &std_descriptor);
 	if(opResult!=EOK){
-		dprintf(USB_LOG_LEVEL_ERROR, "could not get device descriptor, %d",opResult);
-		return opResult;
-	}
-	dprintf(USB_LOG_LEVEL_INFO, "hub has %d configurations",
+		usb_log_error("could not get device descriptor, %d",opResult);
+		return opResult;
+	}
+	usb_log_info("hub has %d configurations",
 			std_descriptor.configuration_count);
 	if(std_descriptor.configuration_count<1){
-		dprintf(USB_LOG_LEVEL_ERROR, "THERE ARE NO CONFIGURATIONS AVAILABLE");
+		usb_log_error("THERE ARE NO CONFIGURATIONS AVAILABLE");
 		//shouldn`t I return?
 	}
@@ -184,5 +183,5 @@
 		return opResult;
 	}
-	dprintf(USB_LOG_LEVEL_DEBUG, "\tused configuration %d",
+	usb_log_debug("\tused configuration %d",
 			config_descriptor->configuration_number);
 
@@ -200,11 +199,10 @@
 	    &hub->device_connection);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR,
-				"Failed to initialize status change pipe: %s",
+		usb_log_error("Failed to initialize status change pipe: %s",
 		    str_error(opResult));
 		return opResult;
 	}
 	if (!endpoint_mapping[0].present) {
-		dprintf(USB_LOG_LEVEL_ERROR,"Not accepting device, " \
+		usb_log_error("Not accepting device, " \
 		    "cannot understand what is happenning");
 		return EREFUSED;
@@ -235,4 +233,5 @@
 	result->port_count = -1;
 	result->device = device;
+	result->is_default_address_used = false;
 
 	//result->usb_device = usb_new(usb_hcd_attached_device_info_t);
@@ -240,8 +239,8 @@
 
 	// get hub descriptor
-	dprintf(USB_LOG_LEVEL_DEBUG, "creating serialized descripton");
+	usb_log_debug("creating serialized descripton");
 	void * serialized_descriptor = malloc(USB_HUB_MAX_DESCRIPTOR_SIZE);
 	usb_hub_descriptor_t * descriptor;
-	dprintf(USB_LOG_LEVEL_DEBUG, "starting control transaction");
+	usb_log_debug("starting control transaction");
 	usb_endpoint_pipe_start_session(&result->endpoints.control);
 	opResult = usb_request_set_configuration(&result->endpoints.control, 1);
@@ -256,18 +255,19 @@
 
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, "failed when receiving hub descriptor, badcode = %d",opResult);
+		usb_log_error("failed when receiving hub descriptor, badcode = %d",
+				opResult);
 		free(serialized_descriptor);
 		free(result);
 		return NULL;
 	}
-	dprintf(USB_LOG_LEVEL_DEBUG2, "deserializing descriptor");
+	usb_log_debug2("deserializing descriptor");
 	descriptor = usb_deserialize_hub_desriptor(serialized_descriptor);
 	if(descriptor==NULL){
-		dprintf(USB_LOG_LEVEL_WARNING, "could not deserialize descriptor ");
+		usb_log_warning("could not deserialize descriptor ");
 		free(result);
 		return NULL;
 	}
 
-	dprintf(USB_LOG_LEVEL_INFO, "setting port count to %d",descriptor->ports_count);
+	usb_log_info("setting port count to %d",descriptor->ports_count);
 	result->port_count = descriptor->ports_count;
 	result->attached_devs = (usb_hc_attached_device_t*)
@@ -278,5 +278,5 @@
 		result->attached_devs[i].address=0;
 	}
-	dprintf(USB_LOG_LEVEL_DEBUG2, "freeing data");
+	usb_log_debug2("freeing data");
 	free(serialized_descriptor);
 	free(descriptor->devices_removable);
@@ -285,5 +285,5 @@
 	//finish
 
-	dprintf(USB_LOG_LEVEL_INFO, "hub info created");
+	usb_log_info("hub info created");
 
 	return result;
@@ -296,5 +296,5 @@
  */
 int usb_add_hub_device(ddf_dev_t *dev) {
-	dprintf(USB_LOG_LEVEL_INFO, "add_hub_device(handle=%d)", (int) dev->handle);
+	usb_log_info("add_hub_device(handle=%d)", (int) dev->handle);
 
 	//dev->ops = &hub_device_ops;
@@ -313,5 +313,5 @@
 	opResult = usb_hub_process_configuration_descriptors(hub_info);
 	if(opResult != EOK){
-		dprintf(USB_LOG_LEVEL_ERROR,"could not get configuration descriptors, %d",
+		usb_log_error("could not get configuration descriptors, %d",
 				opResult);
 		return opResult;
@@ -324,7 +324,7 @@
 		opResult = usb_endpoint_pipe_control_write(&hub_info->endpoints.control,
 				&request,sizeof(usb_device_request_setup_packet_t), NULL, 0);
-		dprintf(USB_LOG_LEVEL_INFO, "powering port %d",port);
+		usb_log_info("powering port %d",port);
 		if (opResult != EOK) {
-			dprintf(USB_LOG_LEVEL_WARNING, "something went wrong when setting hub`s %dth port", port);
+			usb_log_warning("something went wrong when setting hub`s %dth port", port);
 		}
 	}
@@ -337,7 +337,7 @@
 	usb_lst_append(&usb_hub_list, hub_info);
 	fibril_mutex_unlock(&usb_hub_list_lock);
-	dprintf(USB_LOG_LEVEL_DEBUG, "hub info added to list");
-
-	dprintf(USB_LOG_LEVEL_DEBUG, "adding to ddf");
+	usb_log_debug("hub info added to list");
+
+	usb_log_debug("adding to ddf");
 	ddf_fun_t *hub_fun = ddf_fun_create(dev, fun_exposed, "hub");
 	assert(hub_fun != NULL);
@@ -351,17 +351,16 @@
 	fid_t fid = fibril_create(usb_hub_control_loop, hub_info);
 	if (fid == 0) {
-		dprintf(USB_LOG_LEVEL_ERROR, 
-				": failed to start monitoring fibril for new hub");
+		usb_log_error("failed to start monitoring fibril for new hub");
 		return ENOMEM;
 	}
 	fibril_add_ready(fid);
 
-	dprintf(USB_LOG_LEVEL_DEBUG, "hub fibril created");
+	usb_log_debug("hub fibril created");
 	//(void)hub_info;
 	//usb_hub_check_hub_changes();
 	
-	dprintf(USB_LOG_LEVEL_INFO, "hub dev added");
+	usb_log_info("hub dev added");
 	//address is lost...
-	dprintf(USB_LOG_LEVEL_DEBUG, "\taddress %d, has %d ports ",
+	usb_log_debug("\taddress %d, has %d ports ",
 			//hub_info->endpoints.control.,
 			hub_info->port_count);
@@ -379,4 +378,22 @@
 
 /**
+ * release default address used by given hub
+ *
+ * Also unsets hub->is_default_address_used. Convenience wrapper function.
+ * @note hub->connection MUST be open for communication
+ * @param hub hub representation
+ * @return error code
+ */
+static int usb_hub_release_default_address(usb_hub_info_t * hub){
+	int opResult = usb_hc_release_default_address(&hub->connection);
+	if(opResult!=EOK){
+		usb_log_error("could not release default address, errno %d",opResult);
+		return opResult;
+	}
+	hub->is_default_address_used = false;
+	return EOK;
+}
+
+/**
  * Reset the port with new device and reserve the default address.
  * @param hc
@@ -385,18 +402,21 @@
  */
 static void usb_hub_init_add_device(usb_hub_info_t * hub, uint16_t port,
-		bool isLowSpeed) {
+		usb_speed_t speed) {
+	//if this hub already uses default address, it cannot request it once more
+	if(hub->is_default_address_used) return;
+
 	usb_device_request_setup_packet_t request;
 	int opResult;
-	dprintf(USB_LOG_LEVEL_INFO, "some connection changed");
+	usb_log_info("some connection changed");
 	assert(hub->endpoints.control.hc_phone);
 	//get default address
-	usb_speed_t speed = isLowSpeed?USB_SPEED_LOW:USB_SPEED_FULL;
 	opResult = usb_hc_reserve_default_address(&hub->connection, speed);
 	
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_WARNING, 
-				"cannot assign default address, it is probably used %d",opResult);
-		return;
-	}
+		usb_log_warning("cannot assign default address, it is probably used %d",
+				opResult);
+		return;
+	}
+	hub->is_default_address_used = true;
 	//reset port
 	usb_hub_set_reset_port_request(&request, port);
@@ -407,8 +427,7 @@
 			);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, 
-				"something went wrong when reseting a port %d",opResult);
+		usb_log_error("something went wrong when reseting a port %d",opResult);
 		//usb_hub_release_default_address(hc);
-		usb_hc_release_default_address(&hub->connection);
+		usb_hub_release_default_address(hub);
 	}
 }
@@ -424,11 +443,11 @@
 
 	int opResult;
-	dprintf(USB_LOG_LEVEL_INFO, "finalizing add device");
+	usb_log_info("finalizing add device");
 	opResult = usb_hub_clear_port_feature(&hub->endpoints.control,
 	    port, USB_HUB_FEATURE_C_PORT_RESET);
 
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, "failed to clear port reset feature");
-		usb_hc_release_default_address(&hub->connection);
+		usb_log_error("failed to clear port reset feature");
+		usb_hub_release_default_address(hub);
 		return;
 	}
@@ -454,10 +473,10 @@
 			);
 	if (new_device_address < 0) {
-		dprintf(USB_LOG_LEVEL_ERROR, "failed to get free USB address");
+		usb_log_error("failed to get free USB address");
 		opResult = new_device_address;
-		usb_hc_release_default_address(&hub->connection);
-		return;
-	}
-	dprintf(USB_LOG_LEVEL_INFO, "setting new address %d",new_device_address);
+		usb_hub_release_default_address(hub);
+		return;
+	}
+	usb_log_info("setting new address %d",new_device_address);
 	//opResult = usb_drv_req_set_address(hc, USB_ADDRESS_DEFAULT,
 	//    new_device_address);
@@ -466,7 +485,6 @@
 	usb_endpoint_pipe_end_session(&new_device_pipe);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, 
-				"could not set address for new device %d",opResult);
-		usb_hc_release_default_address(&hub->connection);
+		usb_log_error("could not set address for new device %d",opResult);
+		usb_hub_release_default_address(hub);
 		return;
 	}
@@ -474,5 +492,5 @@
 
 	//opResult = usb_hub_release_default_address(hc);
-	opResult = usb_hc_release_default_address(&hub->connection);
+	opResult = usb_hub_release_default_address(hub);
 	if(opResult!=EOK){
 		return;
@@ -486,6 +504,5 @@
 
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, 
-				"could not start driver for new device %d",opResult);
+		usb_log_error("could not start driver for new device %d",opResult);
 		return;
 	}
@@ -498,9 +515,8 @@
 			&hub->attached_devs[port]);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, 
-				"could not assign address of device in hcd %d",opResult);
-		return;
-	}
-	dprintf(USB_LOG_LEVEL_INFO, "new device address %d, handle %zu",
+		usb_log_error("could not assign address of device in hcd %d",opResult);
+		return;
+	}
+	usb_log_info("new device address %d, handle %zu",
 	    new_device_address, child_handle);
 
@@ -533,14 +549,13 @@
 		 */
 	}else{
-		dprintf(USB_LOG_LEVEL_WARNING, "this is strange, disconnected device had no address");
+		usb_log_warning("this is strange, disconnected device had no address");
 		//device was disconnected before it`s port was reset - return default address
-		//usb_drv_release_default_address(hc);
-		usb_hc_release_default_address(&hub->connection);
-	}
-}
-
-
-/**
- *Process over current condition on port.
+		usb_hub_release_default_address(hub);
+	}
+}
+
+
+/**
+ * Process over current condition on port.
  * 
  * Turn off the power on the port.
@@ -555,5 +570,5 @@
 	    port, USB_HUB_FEATURE_PORT_POWER);
 	if(opResult!=EOK){
-		dprintf(USB_LOG_LEVEL_ERROR, "cannot power off port %d;  %d",
+		usb_log_error("cannot power off port %d;  %d",
 				port, opResult);
 	}
@@ -568,5 +583,5 @@
 static void usb_hub_process_interrupt(usb_hub_info_t * hub, 
         uint16_t port) {
-	dprintf(USB_LOG_LEVEL_DEBUG, "interrupt at port %d", port);
+	usb_log_debug("interrupt at port %d", port);
 	//determine type of change
 	usb_endpoint_pipe_t *pipe = &hub->endpoints.control;
@@ -587,9 +602,9 @@
 			);
 	if (opResult != EOK) {
-		dprintf(USB_LOG_LEVEL_ERROR, "could not get port status");
+		usb_log_error("could not get port status");
 		return;
 	}
 	if (rcvd_size != sizeof (usb_port_status_t)) {
-		dprintf(USB_LOG_LEVEL_ERROR, "received status has incorrect size");
+		usb_log_error("received status has incorrect size");
 		return;
 	}
@@ -600,6 +615,6 @@
 		// TODO: check opResult
 		if (usb_port_dev_connected(&status)) {
-			dprintf(USB_LOG_LEVEL_INFO, "some connection changed");
-			usb_hub_init_add_device(hub, port, usb_port_low_speed(&status));
+			usb_log_info("some connection changed");
+			usb_hub_init_add_device(hub, port, usb_port_speed(&status));
 		} else {
 			usb_hub_removed_device(hub, port);
@@ -612,15 +627,15 @@
 			usb_hub_over_current(hub,port);
 		}else{
-			dprintf(USB_LOG_LEVEL_INFO,
-				"over current condition was auto-resolved on port %d",port);
+			usb_log_info("over current condition was auto-resolved on port %d",
+					port);
 		}
 	}
 	//port reset
 	if (usb_port_reset_completed(&status)) {
-		dprintf(USB_LOG_LEVEL_INFO, "port reset complete");
+		usb_log_info("port reset complete");
 		if (usb_port_enabled(&status)) {
 			usb_hub_finalize_add_device(hub, port, usb_port_low_speed(&status));
 		} else {
-			dprintf(USB_LOG_LEVEL_WARNING, "port reset, but port still not enabled");
+			usb_log_warning("port reset, but port still not enabled");
 		}
 	}
@@ -631,8 +646,9 @@
 	usb_port_set_dev_connected(&status, false);
 	if (status>>16) {
-		dprintf(USB_LOG_LEVEL_INFO, "there was some unsupported change on port %d: %X",port,status);
-
-	}
-	/// \TODO handle other changes
+		usb_log_info("there was some unsupported change on port %d: %X",
+				port,status);
+
+	}
+	/// \TODO handle other changes - is there any?
 }
 
@@ -647,6 +663,6 @@
 	opResult = usb_endpoint_pipe_start_session(&hub_info->endpoints.status_change);
 	if(opResult != EOK){
-		dprintf(USB_LOG_LEVEL_ERROR,
-				"could not initialize communication for hub; %d", opResult);
+		usb_log_error("could not initialize communication for hub; %d",
+				opResult);
 		return opResult;
 	}
@@ -669,5 +685,5 @@
 	if (opResult != EOK) {
 		free(change_bitmap);
-		dprintf(USB_LOG_LEVEL_WARNING, "something went wrong while getting status of hub");
+		usb_log_warning("something went wrong while getting status of hub");
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
 		return opResult;
@@ -676,6 +692,5 @@
 	opResult = usb_endpoint_pipe_start_session(&hub_info->endpoints.control);
 	if(opResult!=EOK){
-		dprintf(USB_LOG_LEVEL_ERROR, "could not start control pipe session %d",
-				opResult);
+		usb_log_error("could not start control pipe session %d", opResult);
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
 		return opResult;
@@ -683,5 +698,5 @@
 	opResult = usb_hc_connection_open(&hub_info->connection);
 	if(opResult!=EOK){
-		dprintf(USB_LOG_LEVEL_ERROR, "could not start host controller session %d",
+		usb_log_error("could not start host controller session %d",
 				opResult);
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.control);
Index: uspace/drv/usbhub/usbhub.h
===================================================================
--- uspace/drv/usbhub/usbhub.h	(revision fc5ed5dee7e65b8744a655665eee2259fa6febc4)
+++ uspace/drv/usbhub/usbhub.h	(revision d8e61b0dff1803e2d084988ff419e8d7e75fddae)
@@ -71,4 +71,6 @@
 	/** hub endpoints */
 	usb_hub_endpoints_t endpoints;
+
+	bool is_default_address_used;
 } usb_hub_info_t;
 
