Index: uspace/lib/usbvirt/src/virthub_base.c
===================================================================
--- uspace/lib/usbvirt/src/virthub_base.c	(revision 2a5a7711d9d3ead04b4c659b73b132aaaddaf653)
+++ uspace/lib/usbvirt/src/virthub_base.c	(revision 205261f43889bacefc7f9533f7d8562779a303fb)
@@ -37,4 +37,5 @@
 #include <macros.h>
 #include <str.h>
+#include <usb/classes/hub.h>
 
 #include "virthub_base.h"
@@ -56,11 +57,10 @@
     usbvirt_device_ops_t *ops, void *data,
     const usb_standard_device_descriptor_t *device_desc,
-    const usb_hub_descriptor_header_t *hub_desc,
-    usb_endpoint_t ep, unsigned port_count)
+    const usb_hub_descriptor_header_t *hub_desc, usb_endpoint_t ep)
 {
 	assert(instance);
 	assert(hub_desc);
 	assert(name);
-	
+
 	if (!usb_endpoint_is_valid(ep) || (ep == USB_ENDPOINT_DEFAULT_CONTROL))
 		return EINVAL;
@@ -73,5 +73,5 @@
 	instance->endpoint_descriptor.endpoint_address = 128 | ep;
 	instance->endpoint_descriptor.max_packet_size =
-	    (1 + port_count + 7) / 8;
+	    STATUS_BYTES(hub_desc->port_count);
 
 	instance->descriptors.device =
