Index: uspace/drv/ohci/root_hub.c
===================================================================
--- uspace/drv/ohci/root_hub.c	(revision 32aef25bde2fd119ba847cf729b2da97bd768ad6)
+++ uspace/drv/ohci/root_hub.c	(revision c7d19d840c4ca27ea44ddd1bc142f115e1b56128)
@@ -217,5 +217,4 @@
 	instance->registers->rh_desc_a |= RHDA_NPS_FLAG;
 	instance->unfinished_interrupt_transfer = NULL;
-	instance->interrupt_buffer = malloc((instance->port_count + 8)/8);
 	usb_log_info("OHCI root hub with %d ports.\n", instance->port_count);
 	return EOK;
@@ -472,7 +471,7 @@
 	size_t * buffer_size) {
 	int bit_count = instance->port_count + 1;
-	(*buffer_size) = (bit_count+7 / 8);
-
-	(*buffer) = instance->interrupt_buffer;//malloc(*buffer_size);
+	(*buffer_size) = (bit_count / 8) + ((bit_count % 8 == 0) ? 0 : 1);
+
+	(*buffer) = malloc(*buffer_size);
 	uint8_t * bitmap = (uint8_t*) (*buffer);
 	uint32_t mask = (1 << (USB_HUB_FEATURE_C_HUB_LOCAL_POWER + 16))
Index: uspace/drv/ohci/root_hub.h
===================================================================
--- uspace/drv/ohci/root_hub.h	(revision 32aef25bde2fd119ba847cf729b2da97bd768ad6)
+++ uspace/drv/ohci/root_hub.h	(revision c7d19d840c4ca27ea44ddd1bc142f115e1b56128)
@@ -56,10 +56,4 @@
 	/** interrupt transfer waiting for an actual interrupt to occur */
 	usb_transfer_batch_t * unfinished_interrupt_transfer;
-	/** pre-allocated interrupt mask
-	 *
-	 * This is allocated when initializing instance, so that memory
-	 * allocation is not needed when processing request.
-	 */
-	uint8_t * interrupt_buffer;
 } rh_t;
 
Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision 32aef25bde2fd119ba847cf729b2da97bd768ad6)
+++ uspace/drv/usbhub/usbhub.c	(revision c7d19d840c4ca27ea44ddd1bc142f115e1b56128)
@@ -105,4 +105,5 @@
 	}
 
+	//usb_pipe_start_session(hub_info->control_pipe);
 	//set hub configuration
 	opResult = usb_hub_set_configuration(hub_info);
@@ -121,4 +122,6 @@
 		return opResult;
 	}
+	//usb_pipe_end_session(hub_info->control_pipe);
+
 
 	usb_log_debug("Creating 'hub' function in DDF.\n");
@@ -173,5 +176,5 @@
 leave:
 	/* FIXME: proper interval. */
-	async_usleep(1000 * 250);
+	async_usleep(1000 * 1000 * 10);
 
 	return true;
@@ -215,4 +218,5 @@
 	// get hub descriptor
 	usb_log_debug("creating serialized descriptor\n");
+	//void * serialized_descriptor = malloc(USB_HUB_MAX_DESCRIPTOR_SIZE);
 	uint8_t serialized_descriptor[USB_HUB_MAX_DESCRIPTOR_SIZE];
 	usb_hub_descriptor_t * descriptor;
@@ -249,20 +253,20 @@
 	    sizeof (usb_hub_port_t) * (hub_info->port_count + 1));
 	size_t port;
-	for (port = 0; port < hub_info->port_count + 1; ++port) {
+	for (port = 0; port < hub_info->port_count + 1; port++) {
 		usb_hub_port_init(&hub_info->ports[port]);
 	}
 	if(is_power_switched){
 		usb_log_debug("is_power_switched\n");
-		
-		for (port = 1; port <= hub_info->port_count; ++port) {
-			usb_log_debug("powering port %d\n",port);
-			opResult = usb_hub_set_port_feature(hub_info->control_pipe,
-			    port, USB_HUB_FEATURE_PORT_POWER);
-			if (opResult != EOK) {
-				usb_log_error("cannot power on port %zu: %s.\n",
-				    port, str_error(opResult));
+		if(has_individual_port_powering){
+			usb_log_debug("has_individual_port_powering\n");
+			for (port = 0; port < hub_info->port_count; port++) {
+				opResult = usb_hub_set_port_feature(hub_info->control_pipe,
+				    port+1, USB_HUB_FEATURE_PORT_POWER);
+				if (opResult != EOK) {
+					usb_log_error("cannot power on port %zu: %s.\n",
+					    port+1, str_error(opResult));
+				}
 			}
-		}
-		if(!has_individual_port_powering){
+		}else{
 			usb_log_debug("!has_individual_port_powering\n");
 			opResult = usb_hub_set_feature(hub_info->control_pipe,
@@ -277,4 +281,6 @@
 	}
 	usb_log_debug2("freeing data\n");
+	//free(serialized_descriptor);
+	//free(descriptor->devices_removable);
 	free(descriptor);
 	return EOK;
@@ -409,5 +415,5 @@
     usb_hub_status_t status) {
 	int opResult;
-	if (!usb_hub_is_status(status,USB_HUB_FEATURE_HUB_LOCAL_POWER)) {
+	if (usb_hub_is_status(status,USB_HUB_FEATURE_HUB_LOCAL_POWER)) {
 		//restart power on hub
 		opResult = usb_hub_set_feature(hub_info->control_pipe,
@@ -419,5 +425,5 @@
 	} else {//power reestablished on hub- restart ports
 		size_t port;
-		for (port = 1; port <= hub_info->port_count; ++port) {
+		for (port = 0; port < hub_info->port_count; ++port) {
 			opResult = usb_hub_set_port_feature(
 			    hub_info->control_pipe,
@@ -428,11 +434,4 @@
 			}
 		}
-		opResult = usb_hub_clear_feature(hub_info->control_pipe,
-		    USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
-		if (opResult != EOK) {
-			usb_log_error("cannnot clear hub power change flag: "
-			    "%d\n",
-			    opResult);
-		}
 	}
 	return opResult;
