Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision 2b0db9835c1e32e672c7506f3f3c9de6201714cd)
+++ uspace/drv/usbhub/usbhub.c	(revision 6986418a911da2a0d9bbcff0c77f11874afbefb6)
@@ -468,6 +468,6 @@
 		target.address = hub_info->usb_device->address;
 		target.endpoint = 1;/// \TODO get from endpoint descriptor
-		dprintf(1,"[usb_hub] checking changes for hub at addr %d",
-		    target.address);
+		/*dprintf(1,"[usb_hub] checking changes for hub at addr %d",
+		    target.address);*/
 
 		size_t port_count = hub_info->port_count;
Index: uspace/drv/usbkbd/Makefile
===================================================================
--- uspace/drv/usbkbd/Makefile	(revision 2b0db9835c1e32e672c7506f3f3c9de6201714cd)
+++ uspace/drv/usbkbd/Makefile	(revision 6986418a911da2a0d9bbcff0c77f11874afbefb6)
@@ -34,5 +34,6 @@
 SOURCES = \
 	main.c \
-	descparser.c
+	descparser.c \
+	descdump.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/usbkbd/descparser.c
===================================================================
--- uspace/drv/usbkbd/descparser.c	(revision 2b0db9835c1e32e672c7506f3f3c9de6201714cd)
+++ uspace/drv/usbkbd/descparser.c	(revision 6986418a911da2a0d9bbcff0c77f11874afbefb6)
@@ -32,4 +32,5 @@
 #include <usb/descriptor.h>
 #include "descparser.h"
+#include "descdump.h"
 
 static void usbkbd_config_free(usb_hid_configuration_t *config)
@@ -94,4 +95,7 @@
 	    sizeof(usb_standard_configuration_descriptor_t));
 	pos += sizeof(usb_standard_configuration_descriptor_t);
+
+	printf("Parsed configuration descriptor: \n");
+	dump_standard_configuration_descriptor(0, &config->config_descriptor);
 	
 	int ret = EOK;
@@ -102,5 +106,5 @@
 		    *(pos + 1));
 		return EINVAL;
-	}	
+	}
 	
 	// prepare place for interface descriptors
@@ -112,5 +116,5 @@
 	// the respective structures
 	int ep_i = -1;
-	int hid_i = -1;
+	//int hid_i = -1;
 	
 	usb_hid_iface_t *actual_iface = NULL;
@@ -134,4 +138,7 @@
 			memcpy(&actual_iface->iface_desc, pos, desc_size);
 			pos += desc_size;
+
+			printf("Parsed interface descriptor: \n");
+			dump_standard_interface_descriptor(&actual_iface->iface_desc);
 			
 			// allocate space for endpoint descriptors
@@ -170,4 +177,7 @@
 			memcpy(&actual_iface->endpoints[ep_i], pos, desc_size);
 			pos += desc_size;
+
+			printf("Parsed endpoint descriptor: \n");
+			dump_standard_endpoint_descriptor(&actual_iface->endpoints[ep_i]);
 			++ep_i;
 			
@@ -194,4 +204,7 @@
 				goto end;
 			}
+
+			printf("Parsed HID descriptor header: \n");
+			dump_standard_hid_descriptor_header(&actual_iface->hid_desc);
 			
 			// allocate space for all class-specific descriptor info
@@ -206,5 +219,5 @@
 			
 			// allocate space for all class-specific descriptors
-			actual_iface->class_descs = (uint8_t **)calloc(
+			/*actual_iface->class_descs = (uint8_t **)calloc(
 			    actual_iface->hid_desc.class_desc_count,
 			    sizeof(uint8_t *));
@@ -212,8 +225,9 @@
 				ret = ENOMEM;
 				goto end;
-			}
+			}*/
 
 			// copy all class-specific descriptor info
 			// TODO: endianness
+			/*
 			memcpy(actual_iface->class_desc_info, pos, 
 			    actual_iface->hid_desc.class_desc_count
@@ -221,18 +235,18 @@
 			pos += actual_iface->hid_desc.class_desc_count
 			    * sizeof(usb_standard_hid_class_descriptor_info_t);
-			
-			size_t tmp = (size_t)(pos - data);
+
+			printf("Parsed HID descriptor info:\n");
+			dump_standard_hid_class_descriptor_info(
+			    actual_iface->class_desc_info);
+			*/
+			
+			/*size_t tmp = (size_t)(pos - data);
 			printf("Parser position: %d, remaining: %d\n",
-			       pos - data, size - tmp);
-			
-			/*
-			 * TODO: this is not good, only 7 bytes remaining,
-			 *       something is wrong!
-			 */
-			
-			hid_i = 0;
+			       pos - data, size - tmp);*/
+
+			//hid_i = 0;
 			
 			break;
-		case USB_DESCTYPE_HID_REPORT:
+/*		case USB_DESCTYPE_HID_REPORT:
 		case USB_DESCTYPE_HID_PHYSICAL: {
 			// check if the type matches
@@ -262,7 +276,12 @@
 			memcpy(actual_iface->class_descs[hid_i], pos, length);
 			pos += length;
+
+			printf("Parsed class-specific descriptor:\n");
+			dump_hid_class_descriptor(hid_i, desc_type, 
+			                          actual_iface->class_descs[hid_i], length);
+			                          
 			++hid_i;
 			
-			break; }
+			break; }*/
 		default:
 			fprintf(stderr, "Got descriptor of unknown type: %u.\n",
@@ -280,116 +299,4 @@
 	
 	return ret;
-}
-
-/*----------------------------------------------------------------------------*/
-
-#define BYTES_PER_LINE 12
-
-static void dump_buffer(const char *msg, const uint8_t *buffer, size_t length)
-{
-	printf("%s\n", msg);
-
-	size_t i;
-	for (i = 0; i < length; i++) {
-		printf("  0x%02X", buffer[i]);
-		if (((i > 0) && (((i+1) % BYTES_PER_LINE) == 0))
-		    || (i + 1 == length)) {
-			printf("\n");
-		}
-	}
-}
-
-/*----------------------------------------------------------------------------*/
-
-#define INDENT "  "
-
-static void dump_standard_configuration_descriptor(
-    int index, const usb_standard_configuration_descriptor_t *d)
-{
-	bool self_powered = d->attributes & 64;
-	bool remote_wakeup = d->attributes & 32;
-	
-	printf("Standard configuration descriptor #%d\n", index);
-	printf(INDENT "bLength = %d\n", d->length);
-	printf(INDENT "bDescriptorType = 0x%02x\n", d->descriptor_type);
-	printf(INDENT "wTotalLength = %d\n", d->total_length);
-	printf(INDENT "bNumInterfaces = %d\n", d->interface_count);
-	printf(INDENT "bConfigurationValue = %d\n", d->configuration_number);
-	printf(INDENT "iConfiguration = %d\n", d->str_configuration);
-	printf(INDENT "bmAttributes = %d [%s%s%s]\n", d->attributes,
-	    self_powered ? "self-powered" : "",
-	    (self_powered & remote_wakeup) ? ", " : "",
-	    remote_wakeup ? "remote-wakeup" : "");
-	printf(INDENT "MaxPower = %d (%dmA)\n", d->max_power,
-	    2 * d->max_power);
-	// printf(INDENT " = %d\n", d->);
-}
-
-static void dump_standard_interface_descriptor(
-    const usb_standard_interface_descriptor_t *d)
-{
-	printf("Standard interface descriptor\n");
-	printf(INDENT "bLength = %d\n", d->length);
-	printf(INDENT "bDescriptorType = 0x%02x\n", d->descriptor_type);
-	printf(INDENT "bInterfaceNumber = %d\n", d->interface_number);
-	printf(INDENT "bAlternateSetting = %d\n", d->alternate_setting);
-	printf(INDENT "bNumEndpoints = %d\n", d->endpoint_count);
-	printf(INDENT "bInterfaceClass = %d\n", d->interface_class);
-	printf(INDENT "bInterfaceSubClass = %d\n", d->interface_subclass);
-	printf(INDENT "bInterfaceProtocol = %d\n", d->interface_protocol);
-	printf(INDENT "iInterface = %d", d->str_interface);
-}
-
-static void dump_standard_endpoint_descriptor(
-    const usb_standard_endpoint_descriptor_t *d)
-{
-	const char *transfer_type;
-	switch (d->attributes & 3) {
-	case USB_TRANSFER_CONTROL:
-		transfer_type = "control";
-		break;
-	case USB_TRANSFER_ISOCHRONOUS:
-		transfer_type = "isochronous";
-		break;
-	case USB_TRANSFER_BULK:
-		transfer_type = "bulk";
-		break;
-	case USB_TRANSFER_INTERRUPT:
-		transfer_type = "interrupt";
-		break;
-	}
-
-	printf("Standard endpoint descriptor\n");
-	printf(INDENT "bLength = %d\n", d->length);
-	printf(INDENT "bDescriptorType = 0x%02x\n", d->descriptor_type);
-	printf(INDENT "bmAttributes = %d [%s]\n", d->attributes, transfer_type);
-	printf(INDENT "wMaxPacketSize = %d\n", d->max_packet_size);
-	printf(INDENT "bInterval = %d\n", d->poll_interval);
-}
-
-static void dump_standard_hid_descriptor_header(
-    const usb_standard_hid_descriptor_t *d)
-{
-	printf("Standard HID descriptor\n");
-	printf(INDENT "bLength = %d\n", d->length);
-	printf(INDENT "bDescriptorType = 0x%02x\n", d->descriptor_type);
-	printf(INDENT "bcdHID = %d\n", d->spec_release);
-	printf(INDENT "bCountryCode = %d\n", d->country_code);
-	printf(INDENT "bNumDescriptors = %d\n", d->class_desc_count);
-}
-
-static void dump_standard_hid_class_descriptor_info(
-    const usb_standard_hid_class_descriptor_info_t *d)
-{
-	printf(INDENT "bDescriptorType = %d\n", d->type);
-	printf(INDENT "wDescriptorLength = %d\n", d->length);
-}
-
-static void dump_hid_class_descriptor(int index, uint8_t type, 
-                                      const uint8_t *d, size_t size )
-{
-	printf("Class-specific descriptor #%d (type: %u)\n", index, type);
-	assert(d != NULL);
-	dump_buffer("", d, size);
 }
 
Index: uspace/drv/usbkbd/descparser.h
===================================================================
--- uspace/drv/usbkbd/descparser.h	(revision 2b0db9835c1e32e672c7506f3f3c9de6201714cd)
+++ uspace/drv/usbkbd/descparser.h	(revision 6986418a911da2a0d9bbcff0c77f11874afbefb6)
@@ -26,4 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+#ifndef USBHID_DESCPARSER_H_
+#define USBHID_DESCPARSER_H_
+
 #include <usb/classes/hid.h>
 
@@ -32,2 +35,4 @@
 
 void usbkbd_print_config(const usb_hid_configuration_t *config);
+
+#endif
Index: uspace/drv/usbkbd/main.c
===================================================================
--- uspace/drv/usbkbd/main.c	(revision 2b0db9835c1e32e672c7506f3f3c9de6201714cd)
+++ uspace/drv/usbkbd/main.c	(revision 6986418a911da2a0d9bbcff0c77f11874afbefb6)
@@ -107,4 +107,23 @@
  * Kbd functions
  */
+static int usbkbd_get_report_descriptor(usb_hid_dev_kbd_t *kbd_dev)
+{
+	// iterate over all configurations and interfaces
+	// TODO: more configurations!!
+	unsigned i;
+	for (i = 0; i < kbd_dev->conf->config_descriptor.interface_count; ++i) {
+		uint8_t type = 
+		    kbd_dev->conf->interfaces[i].hid_desc.report_desc_info.type;
+		// TODO: endianness
+		uint16_t length = 
+		    kbd_dev->conf->interfaces[i].hid_desc.report_desc_info.length;
+
+		// allocate space for the report descriptor
+		kbd_dev->conf->interfaces[i].report_desc = (uint8_t *)malloc(length);
+		// get the descriptor from the device
+		
+	}
+}
+
 static int usbkbd_process_descriptors(usb_hid_dev_kbd_t *kbd_dev)
 {
@@ -147,6 +166,9 @@
 	rc = usbkbd_parse_descriptors(descriptors, transferred, kbd_dev->conf);
 	free(descriptors);
-	
-	//usbkbd_print_config(kbd_dev->conf);
+
+	// get and report descriptors
+	rc = usbkbd_get_report_descriptor(kbd_dev);
+	
+	usbkbd_print_config(kbd_dev->conf);
 	
 	return rc;
@@ -223,4 +245,6 @@
 static void usbkbd_poll_keyboard(usb_hid_dev_kbd_t *kbd_dev)
 {
+	return;
+	
 	int rc;
 	usb_handle_t handle;
