Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision 72af8da9b8a1c4b2070e322bb32a8d379d171455)
+++ uspace/drv/usbhub/usbhub.c	(revision 42a3a577fdefe029b1e5a02033455cef5832c014)
@@ -72,8 +72,12 @@
 int usb_hub_control_loop(void * hub_info_param){
 	usb_hub_info_t * hub_info = (usb_hub_info_t*)hub_info_param;
-	while(true){
-		usb_hub_check_hub_changes(hub_info);
+	int errorCode = EOK;
+
+	while(errorCode == EOK){
+		errorCode = usb_hub_check_hub_changes(hub_info);
 		async_usleep(1000 * 1000 );/// \TODO proper number once
 	}
+	dprintf(USB_LOG_LEVEL_ERROR,
+				"something in ctrl loop went wrong, errno %d",errorCode);
 	return 0;
 }
@@ -380,5 +384,6 @@
  * @param target
  */
-static void usb_hub_init_add_device(usb_hub_info_t * hub, uint16_t port) {
+static void usb_hub_init_add_device(usb_hub_info_t * hub, uint16_t port,
+		bool isLowSpeed) {
 	usb_device_request_setup_packet_t request;
 	int opResult;
@@ -386,6 +391,6 @@
 	assert(hub->endpoints.control.hc_phone);
 	//get default address
-	//opResult = usb_drv_reserve_default_address(hc);
-	opResult = usb_hc_reserve_default_address(&hub->connection, USB_SPEED_LOW);
+	usb_speed_t speed = isLowSpeed?USB_SPEED_LOW:USB_SPEED_FULL;
+	opResult = usb_hc_reserve_default_address(&hub->connection, speed);
 	
 	if (opResult != EOK) {
@@ -510,7 +515,5 @@
 static void usb_hub_removed_device(
     usb_hub_info_t * hub,uint16_t port) {
-	//usb_device_request_setup_packet_t request;
-	int opResult;
-	
+		
 	/** \TODO remove device from device manager - not yet implemented in
 	 * devide manager
@@ -519,5 +522,5 @@
 	//close address
 	if(hub->attached_devs[port].address!=0){
-		//opResult = usb_drv_release_address(hc,hub->attached_devs[port].address);
+		/*uncomment this code to use it when DDF allows device removal
 		opResult = usb_hc_unregister_device(
 				&hub->connection, hub->attached_devs[port].address);
@@ -528,4 +531,5 @@
 		hub->attached_devs[port].address = 0;
 		hub->attached_devs[port].handle = 0;
+		 */
 	}else{
 		dprintf(USB_LOG_LEVEL_WARNING, "this is strange, disconnected device had no address");
@@ -597,5 +601,5 @@
 		if (usb_port_dev_connected(&status)) {
 			dprintf(USB_LOG_LEVEL_INFO, "some connection changed");
-			usb_hub_init_add_device(hub, port);
+			usb_hub_init_add_device(hub, port, usb_port_low_speed(&status));
 		} else {
 			usb_hub_removed_device(hub, port);
@@ -635,7 +639,9 @@
 /**
  * Check changes on particular hub
- * @param hub_info_param
- */
-void usb_hub_check_hub_changes(usb_hub_info_t * hub_info){
+ * @param hub_info_param pointer to usb_hub_info_t structure
+ * @return error code if there is problem when initializing communication with
+ * hub, EOK otherwise
+ */
+int usb_hub_check_hub_changes(usb_hub_info_t * hub_info){
 	int opResult;
 	opResult = usb_endpoint_pipe_start_session(&hub_info->endpoints.status_change);
@@ -643,5 +649,5 @@
 		dprintf(USB_LOG_LEVEL_ERROR,
 				"could not initialize communication for hub; %d", opResult);
-		return;
+		return opResult;
 	}
 
@@ -665,5 +671,5 @@
 		dprintf(USB_LOG_LEVEL_WARNING, "something went wrong while getting status of hub");
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
-		return;
+		return opResult;
 	}
 	unsigned int port;
@@ -673,5 +679,5 @@
 				opResult);
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
-		return;
+		return opResult;
 	}
 	opResult = usb_hc_connection_open(&hub_info->connection);
@@ -681,5 +687,5 @@
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.control);
 		usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
-		return;
+		return opResult;
 	}
 
@@ -697,4 +703,5 @@
 	usb_endpoint_pipe_end_session(&hub_info->endpoints.status_change);
 	free(change_bitmap);
+	return EOK;
 }
 
Index: uspace/drv/usbhub/usbhub.h
===================================================================
--- uspace/drv/usbhub/usbhub.h	(revision 72af8da9b8a1c4b2070e322bb32a8d379d171455)
+++ uspace/drv/usbhub/usbhub.h	(revision 42a3a577fdefe029b1e5a02033455cef5832c014)
@@ -87,8 +87,10 @@
 
 /**
- * check changes on specified hub
+ * Check changes on specified hub
  * @param hub_info_param pointer to usb_hub_info_t structure
+ * @return error code if there is problem when initializing communication with
+ * hub, EOK otherwise
  */
-void usb_hub_check_hub_changes(usb_hub_info_t * hub_info_param);
+int usb_hub_check_hub_changes(usb_hub_info_t * hub_info_param);
 
 
