Index: uspace/drv/bus/usb/usbhub/Makefile
===================================================================
--- uspace/drv/bus/usb/usbhub/Makefile	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ uspace/drv/bus/usb/usbhub/Makefile	(revision 621ba8c72c47c5f1923ba935db018719bca0dc05)
@@ -44,5 +44,4 @@
 SOURCES = \
 	main.c \
-	utils.c \
 	usbhub.c \
 	port.c
Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision 621ba8c72c47c5f1923ba935db018719bca0dc05)
@@ -45,5 +45,4 @@
 #include "port.h"
 #include "usbhub.h"
-#include "utils.h"
 #include "port_status.h"
 
Index: uspace/drv/bus/usb/usbhub/usbhub.c
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.c	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ uspace/drv/bus/usb/usbhub/usbhub.c	(revision 621ba8c72c47c5f1923ba935db018719bca0dc05)
@@ -54,5 +54,4 @@
 
 #include "usbhub.h"
-#include "utils.h"
 #include "port_status.h"
 
@@ -242,13 +241,11 @@
 	usb_log_debug("Retrieving descriptor\n");
 	usb_pipe_t *control_pipe = &hub_info->usb_device->ctrl_pipe;
-	uint8_t serialized_descriptor[USB_HUB_MAX_DESCRIPTOR_SIZE];
-	int opResult;
-
+
+	usb_hub_descriptor_header_t descriptor;
 	size_t received_size;
-	opResult = usb_request_get_descriptor(control_pipe,
+	int opResult = usb_request_get_descriptor(control_pipe,
 	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_DEVICE,
-	    USB_DESCTYPE_HUB, 0, 0, serialized_descriptor,
-	    USB_HUB_MAX_DESCRIPTOR_SIZE, &received_size);
-
+	    USB_DESCTYPE_HUB, 0, 0, &descriptor,
+	    sizeof(usb_hub_descriptor_t), &received_size);
 	if (opResult != EOK) {
 		usb_log_error("Failed to receive hub descriptor: %s.\n",
@@ -256,15 +253,7 @@
 		return opResult;
 	}
-	usb_log_debug2("Parsing descriptor\n");
-	usb_hub_descriptor_t descriptor;
-	opResult = usb_deserialize_hub_desriptor(
-	        serialized_descriptor, received_size, &descriptor);
-	if (opResult != EOK) {
-		usb_log_error("Could not parse descriptor: %s\n",
-		    str_error(opResult));
-		return opResult;
-	}
-	usb_log_debug("Setting port count to %d.\n", descriptor.ports_count);
-	hub_info->port_count = descriptor.ports_count;
+
+	usb_log_debug("Setting port count to %d.\n", descriptor.port_count);
+	hub_info->port_count = descriptor.port_count;
 
 	// TODO Why +1 ?
@@ -281,8 +270,8 @@
 
 	const bool is_power_switched =
-	    !(descriptor.hub_characteristics & HUB_CHAR_NO_POWER_SWITCH_FLAG);
+	    !(descriptor.characteristics & HUB_CHAR_NO_POWER_SWITCH_FLAG);
 	if (is_power_switched) {
 		usb_log_debug("Hub power switched\n");
-		const bool per_port_power = descriptor.hub_characteristics
+		const bool per_port_power = descriptor.characteristics
 		    & HUB_CHAR_POWER_PER_PORT_FLAG;
 
@@ -303,5 +292,4 @@
 			}
 		}
-
 	} else {
 		usb_log_debug("Power not switched, ports always powered\n");
Index: uspace/drv/bus/usb/usbhub/utils.c
===================================================================
--- uspace/drv/bus/usb/usbhub/utils.c	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- * Copyright (c) 2010 Matus Dekanek
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup drvusbhub
- * @{
- */
-/** @file
- * @brief various utilities
- */
-#include <ddf/driver.h>
-#include <errno.h>
-
-#include <usbhc_iface.h>
-#include <usb/descriptor.h>
-#include <usb/classes/hub.h>
-#include <usb/debug.h>
-
-#include "usbhub.h"
-#include "utils.h"
-
-
-/**
- * Deserialize descriptor into given pointer
- *
- * @param serialized_descriptor
- * @param descriptor
- * @return
- */
-int usb_deserialize_hub_desriptor(
-    void *serialized_descriptor, size_t size, usb_hub_descriptor_t *descriptor)
-{
-	uint8_t *sdescriptor = serialized_descriptor;
-
-	if (sdescriptor[1] != USB_DESCTYPE_HUB) {
-		usb_log_error("Trying to deserialize wrong descriptor %x\n",
-		    sdescriptor[1]);
-		return EINVAL;
-	}
-	if (size < 7) {
-		usb_log_error("Serialized descriptor too small.\n");
-		return EOVERFLOW;
-	}
-
-	descriptor->ports_count = sdescriptor[2];
-	descriptor->hub_characteristics = sdescriptor[3] + 256 * sdescriptor[4];
-	descriptor->pwr_on_2_good_time = sdescriptor[5];
-	descriptor->current_requirement = sdescriptor[6];
-	const size_t var_size = (descriptor->ports_count + 7) / 8;
-
-	if (size < (7 + var_size)) {
-		usb_log_error("Serialized descriptor too small.\n");
-		return EOVERFLOW;
-	}
-	size_t i = 0;
-	for (; i < var_size; ++i) {
-		descriptor->devices_removable[i] = sdescriptor[7 + i];
-	}
-	return EOK;
-}
-/*----------------------------------------------------------------------------*/
-/**
- * @}
- */
Index: uspace/drv/bus/usb/usbhub/utils.h
===================================================================
--- uspace/drv/bus/usb/usbhub/utils.h	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2010 Matus Dekanek
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup drvusbhub
- * @{
- */
-/** @file
- * @brief Hub driver private definitions
- */
-
-#ifndef USBHUB_UTILS_H
-#define USBHUB_UTILS_H
-
-#include <usb/usb.h>
-
-#define USB_HUB_MAX_DESCRIPTOR_SIZE 71
-
-int usb_deserialize_hub_desriptor(
-    void *serialized_descriptor, size_t size, usb_hub_descriptor_t *descriptor);
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usb/include/usb/classes/hub.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hub.h	(revision 3b6175794afb9a5540ec62641eacec8acebec760)
+++ uspace/lib/usb/include/usb/classes/hub.h	(revision 621ba8c72c47c5f1923ba935db018719bca0dc05)
@@ -72,5 +72,9 @@
 	uint8_t port_count;
 	/** Characteristics bitmask. */
-	uint16_t characteristics;
+	uint8_t characteristics;
+#define HUB_CHAR_POWER_PER_PORT_FLAG  (1 << 0)
+#define HUB_CHAR_NO_POWER_SWITCH_FLAG (1 << 1)
+	/* Unused part of characteristics field */
+	uint8_t characteristics_reservered;
 	/** Time from power-on to stabilization of current on the port. */
 	uint8_t power_good_time;
@@ -92,5 +96,5 @@
 
     /** Number of downstream ports that this hub supports */
-    uint8_t ports_count;
+    uint8_t port_count;
 
     /**
@@ -119,6 +123,4 @@
      */
     uint16_t hub_characteristics;
-#define HUB_CHAR_POWER_PER_PORT_FLAG  (1 << 0)
-#define HUB_CHAR_NO_POWER_SWITCH_FLAG (1 << 1)
 
     /**
@@ -214,11 +216,6 @@
  *	Maximum size of usb hub descriptor in bytes
  */
-extern size_t USB_HUB_MAX_DESCRIPTOR_SIZE;
-
-
-
-
-
-
+/* 7 (basic size) + 2*32 (port bitmasks) */
+#define USB_HUB_MAX_DESCRIPTOR_SIZE 71
 
 #endif
