Index: uspace/app/usbinfo/dev.c
===================================================================
--- uspace/app/usbinfo/dev.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/app/usbinfo/dev.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -77,5 +77,11 @@
 	}
 
-	usb_pipe_start_long_transfer(&dev->ctrl_pipe);
+	rc = usb_pipe_start_long_transfer(&dev->ctrl_pipe);
+	if (rc != EOK) {
+		fprintf(stderr,
+		    NAME ": failed to start transfer on control pipe: %s.\n",
+		    str_error(rc));
+		goto leave;
+	}
 	transfer_started = true;
 
Index: uspace/drv/ehci-hcd/main.c
===================================================================
--- uspace/drv/ehci-hcd/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ehci-hcd/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -82,7 +82,6 @@
 	    pci_get_my_registers(device, &mem_reg_base, &mem_reg_size, &irq);
 	CHECK_RET_RETURN(ret,
-	    "Failed to get memory addresses for %" PRIun ": %s.\n",
-	    device->handle, str_error(ret));
-	usb_log_info("Memory mapped regs at 0x%" PRIxn " (size %zu), IRQ %d.\n",
+	    "Failed(%d) to get memory addresses:.\n", ret, device->handle);
+	usb_log_info("Memory mapped regs at 0x%X (size %zu), IRQ %d.\n",
 	    mem_reg_base, mem_reg_size, irq);
 
@@ -103,5 +102,5 @@
 	    str_error(ret));
 
-	usb_log_info("Controlling new EHCI device `%s' (handle %" PRIun ").\n",
+	usb_log_info("Controlling new EHCI device `%s' (handle %llu).\n",
 	    device->name, device->handle);
 
Index: uspace/drv/ehci-hcd/pci.c
===================================================================
--- uspace/drv/ehci-hcd/pci.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ehci-hcd/pci.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -117,5 +117,5 @@
 				mem_address = res->res.mem_range.address;
 				mem_size = res->res.mem_range.size;
-				usb_log_debug2("Found mem: %" PRIxn" %zu.\n",
+				usb_log_debug2("Found mem: %llx %zu.\n",
 				    mem_address, mem_size);
 				mem_found = true;
@@ -186,9 +186,9 @@
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read PCI config space.\n",
 	    ret);
-	usb_log_info("Register space BAR at %p:%" PRIxn ".\n", (void *) address, value);
+	usb_log_info("Register space BAR at %p:%x.\n", address, value);
 
 	/* clear lower byte, it's not part of the BASE address */
 	uintptr_t registers = (value & 0xffffff00);
-	usb_log_info("Memory registers BASE address:%p.\n", (void *) registers);
+	usb_log_info("Memory registers BASE address:%p.\n", registers);
 
 	/* if nothing setup the hc, we don't need to turn it off */
@@ -201,5 +201,5 @@
 	    AS_AREA_READ | AS_AREA_WRITE);
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to map registers %p:%p.\n",
-	    ret, regs, (void *) registers);
+	    ret, regs, registers);
 
 	/* calculate value of BASE */
@@ -221,5 +221,5 @@
 	    IPC_M_CONFIG_SPACE_READ_32, eecp + USBLEGCTLSTS_OFFSET, &value);
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read USBLEGCTLSTS.\n", ret);
-	usb_log_debug("USBLEGCTLSTS: %" PRIxn ".\n", value);
+	usb_log_debug("USBLEGCTLSTS: %x.\n", value);
 
 	/* Read the first EEC. i.e. Legacy Support register */
@@ -228,5 +228,5 @@
 	    IPC_M_CONFIG_SPACE_READ_32, eecp + USBLEGSUP_OFFSET, &value);
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
-	usb_log_debug2("USBLEGSUP: %" PRIxn ".\n", value);
+	usb_log_debug2("USBLEGSUP: %x.\n", value);
 
 	/* Request control from firmware/BIOS, by writing 1 to highest byte.
@@ -248,9 +248,9 @@
 
 	if ((value & USBLEGSUP_BIOS_CONTROL) == 0) {
-		usb_log_info("BIOS released control after %zu usec.\n", wait);
+		usb_log_info("BIOS released control after %d usec.\n", wait);
 	} else {
 		/* BIOS failed to hand over control, this should not happen. */
 		usb_log_warning( "BIOS failed to release control after "
-		    "%zu usecs, force it.\n", wait);
+		    "%d usecs, force it.\n", wait);
 		ret = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE),
 		    IPC_M_CONFIG_SPACE_WRITE_32, eecp + USBLEGSUP_OFFSET,
@@ -271,5 +271,5 @@
 	    IPC_M_CONFIG_SPACE_READ_32, eecp + USBLEGCTLSTS_OFFSET, &value);
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read USBLEGCTLSTS.\n", ret);
-	usb_log_debug2("USBLEGCTLSTS: %" PRIxn ".\n", value);
+	usb_log_debug2("USBLEGCTLSTS: %x.\n", value);
 
 	/* Read again Legacy Support register */
@@ -277,5 +277,5 @@
 	    IPC_M_CONFIG_SPACE_READ_32, eecp + USBLEGSUP_OFFSET, &value);
 	CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
-	usb_log_debug2("USBLEGSUP: %" PRIxn ".\n", value);
+	usb_log_debug2("USBLEGSUP: %x.\n", value);
 
 	/*
Index: uspace/drv/ohci/batch.c
===================================================================
--- uspace/drv/ohci/batch.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/batch.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -141,5 +141,5 @@
 	assert(data);
 	size_t tds = data->td_count;
-	usb_log_debug("Batch(%p) checking %zu td(s) for completion.\n",
+	usb_log_debug("Batch(%p) checking %d td(s) for completion.\n",
 	    instance, tds);
 	usb_log_debug("ED: %x:%x:%x:%x.\n",
@@ -150,5 +150,5 @@
 	for (; i < tds; ++i) {
 		assert(data->tds[i] != NULL);
-		usb_log_debug("TD %zu: %x:%x:%x:%x.\n", i,
+		usb_log_debug("TD %d: %x:%x:%x:%x.\n", i,
 		    data->tds[i]->status, data->tds[i]->cbp, data->tds[i]->next,
 		    data->tds[i]->be);
@@ -158,5 +158,5 @@
 		instance->error = td_error(data->tds[i]);
 		if (instance->error != EOK) {
-			usb_log_debug("Batch(%p) found error TD(%zu):%x.\n",
+			usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
 			    instance, i, data->tds[i]->status);
 			/* Make sure TD queue is empty (one TD),
Index: uspace/drv/ohci/endpoint_list.c
===================================================================
--- uspace/drv/ohci/endpoint_list.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/endpoint_list.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -55,5 +55,5 @@
 	}
 	instance->list_head_pa = addr_to_phys(instance->list_head);
-	usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).\n",
+	usb_log_debug2("Transfer list %s setup with ED: %p(%p).\n",
 	    name, instance->list_head, instance->list_head_pa);
 
@@ -121,5 +121,5 @@
 		hcd_ep, instance->name, first, first->ed);
 	if (last_ed == instance->list_head) {
-		usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.\n",
+		usb_log_debug2("%s head ED(%p-%p): %x:%x:%x:%x.\n",
 		    instance->name, last_ed, instance->list_head_pa,
 		    last_ed->status, last_ed->td_tail, last_ed->td_head,
Index: uspace/drv/ohci/hc.c
===================================================================
--- uspace/drv/ohci/hc.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/hc.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -113,10 +113,10 @@
 	    BANDWIDTH_AVAILABLE_USB11);
 	CHECK_RET_RETURN(ret, "Failed to initialize endpoint manager: %s.\n",
-	    str_error(ret));
+	    ret, str_error(ret));
 
 	hc_gain_control(instance);
 	ret = hc_init_memory(instance);
-	CHECK_RET_RETURN(ret, "Failed to create OHCI memory structures: %s.\n",
-	    str_error(ret));
+	CHECK_RET_RETURN(ret, "Failed to create OHCI memory structures:%s.\n",
+	    ret, str_error(ret));
 	hc_init_hw(instance);
 	fibril_mutex_initialize(&instance->guard);
@@ -294,8 +294,7 @@
 	if (status & IS_WDH) {
 		fibril_mutex_lock(&instance->guard);
-		usb_log_debug2("HCCA: %p-%#" PRIx32 " (%p).\n", instance->hcca,
-		    instance->registers->hcca,
-		    (void *) addr_to_phys(instance->hcca));
-		usb_log_debug2("Periodic current: %#" PRIx32 ".\n",
+		usb_log_debug2("HCCA: %p-%p(%p).\n", instance->hcca,
+		    instance->registers->hcca, addr_to_phys(instance->hcca));
+		usb_log_debug2("Periodic current: %p.\n",
 		    instance->registers->periodic_current);
 
@@ -406,5 +405,5 @@
 	instance->registers->bulk_head =
 	    instance->lists[USB_TRANSFER_BULK].list_head_pa;
-	usb_log_debug2("Bulk HEAD set to: %p (%#" PRIx32 ").\n",
+	usb_log_debug2("Bulk HEAD set to: %p(%p).\n",
 	    instance->lists[USB_TRANSFER_BULK].list_head,
 	    instance->lists[USB_TRANSFER_BULK].list_head_pa);
@@ -412,5 +411,5 @@
 	instance->registers->control_head =
 	    instance->lists[USB_TRANSFER_CONTROL].list_head_pa;
-	usb_log_debug2("Control HEAD set to: %p (%#" PRIx32 ").\n",
+	usb_log_debug2("Control HEAD set to: %p(%p).\n",
 	    instance->lists[USB_TRANSFER_CONTROL].list_head,
 	    instance->lists[USB_TRANSFER_CONTROL].list_head_pa);
@@ -488,5 +487,5 @@
 		    instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa;
 	}
-	usb_log_debug2("Interrupt HEADs set to: %p (%#" PRIx32 ").\n",
+	usb_log_debug2("Interrupt HEADs set to: %p(%p).\n",
 	    instance->lists[USB_TRANSFER_INTERRUPT].list_head,
 	    instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa);
Index: uspace/drv/ohci/iface.c
===================================================================
--- uspace/drv/ohci/iface.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/iface.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -118,5 +118,5 @@
 	hc_t *hc = fun_to_hc(fun);
 	assert(hc);
-	usb_log_debug("Address bind %d-%" PRIun ".\n", address, handle);
+	usb_log_debug("Address bind %d-%d.\n", address, handle);
 	usb_device_keeper_bind(&hc->manager, address, handle);
 	return EOK;
Index: uspace/drv/ohci/ohci.c
===================================================================
--- uspace/drv/ohci/ohci.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/ohci.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -148,8 +148,7 @@
 	    pci_get_my_registers(device, &mem_reg_base, &mem_reg_size, &irq);
 	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed to get memory addresses for %" PRIun ": %s.\n",
-	    device->handle, str_error(ret));
-	usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
-	    (void *) mem_reg_base, mem_reg_size, irq);
+	    "Failed(%d) to get memory addresses:.\n", ret, device->handle);
+	usb_log_debug("Memory mapped regs at 0x%X (size %zu), IRQ %d.\n",
+	    mem_reg_base, mem_reg_size, irq);
 
 	ret = pci_disable_legacy(device);
Index: uspace/drv/ohci/pci.c
===================================================================
--- uspace/drv/ohci/pci.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/ohci/pci.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -117,6 +117,6 @@
 				mem_address = res->res.mem_range.address;
 				mem_size = res->res.mem_range.size;
-				usb_log_debug2("Found mem: %p %zu.\n",
-				    (void *) mem_address, mem_size);
+				usb_log_debug2("Found mem: %llx %zu.\n",
+				    mem_address, mem_size);
 				mem_found = true;
 				}
Index: uspace/drv/uhci-hcd/batch.c
===================================================================
--- uspace/drv/uhci-hcd/batch.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/batch.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -162,5 +162,5 @@
 	assert(data);
 
-	usb_log_debug2("Batch(%p) checking %zu transfer(s) for completion.\n",
+	usb_log_debug2("Batch(%p) checking %d transfer(s) for completion.\n",
 	    instance, data->td_count);
 	instance->transfered_size = 0;
@@ -173,5 +173,5 @@
 		instance->error = td_status(&data->tds[i]);
 		if (instance->error != EOK) {
-			usb_log_debug("Batch(%p) found error TD(%zu):%" PRIx32 ".\n",
+			usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
 			    instance, i, data->tds[i].status);
 			td_print_status(&data->tds[i]);
Index: uspace/drv/uhci-hcd/hc.c
===================================================================
--- uspace/drv/uhci-hcd/hc.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/hc.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -101,5 +101,5 @@
 	    ret, io, str_error(ret));
 	instance->registers = io;
-	usb_log_debug("Device registers at %p (%zuB) accessible.\n",
+	usb_log_debug("Device registers at %p(%u) accessible.\n",
 	    io, reg_size);
 
@@ -423,6 +423,5 @@
 		if (frame_list != addr_to_phys(instance->frame_list)) {
 			usb_log_debug("Framelist address: %p vs. %p.\n",
-			    (void *) frame_list,
-			    (void *) addr_to_phys(instance->frame_list));
+			    frame_list, addr_to_phys(instance->frame_list));
 		}
 
@@ -433,6 +432,6 @@
 		uintptr_t real_pa = addr_to_phys(QH(interrupt));
 		if (expected_pa != real_pa) {
-			usb_log_debug("Interrupt QH: %p (frame %d) vs. %p.\n",
-			    (void *) expected_pa, frnum, (void *) real_pa);
+			usb_log_debug("Interrupt QH: %p(frame: %d) vs. %p.\n",
+			    expected_pa, frnum, real_pa);
 		}
 
@@ -441,5 +440,5 @@
 		if (expected_pa != real_pa) {
 			usb_log_debug("Control Slow QH: %p vs. %p.\n",
-			    (void *) expected_pa, (void *) real_pa);
+			    expected_pa, real_pa);
 		}
 
@@ -448,5 +447,5 @@
 		if (expected_pa != real_pa) {
 			usb_log_debug("Control Full QH: %p vs. %p.\n",
-			    (void *) expected_pa, (void *) real_pa);
+			    expected_pa, real_pa);
 		}
 
@@ -455,5 +454,5 @@
 		if (expected_pa != real_pa ) {
 			usb_log_debug("Bulk QH: %p vs. %p.\n",
-			    (void *) expected_pa, (void *) real_pa);
+			    expected_pa, real_pa);
 		}
 		async_usleep(UHCI_DEBUGER_TIMEOUT);
Index: uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.c
===================================================================
--- uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -154,5 +154,5 @@
 	assert(instance);
 	const uint32_t s = instance->status;
-	usb_log_debug2("TD(%p) status(%#" PRIx32 "):%s %d,%s%s%s%s%s%s%s%s%s%s%s %zu.\n",
+	usb_log_debug2("TD(%p) status(%#x):%s %d,%s%s%s%s%s%s%s%s%s%s%s %d.\n",
 	    instance, instance->status,
 	    (s & TD_STATUS_SPD_FLAG) ? " SPD," : "",
Index: uspace/drv/uhci-hcd/iface.c
===================================================================
--- uspace/drv/uhci-hcd/iface.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/iface.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -118,5 +118,5 @@
 	hc_t *hc = fun_to_hc(fun);
 	assert(hc);
-	usb_log_debug("Address bind %d-%" PRIun ".\n", address, handle);
+	usb_log_debug("Address bind %d-%d.\n", address, handle);
 	usb_device_keeper_bind(&hc->manager, address, handle);
 	return EOK;
Index: uspace/drv/uhci-hcd/main.c
===================================================================
--- uspace/drv/uhci-hcd/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -72,6 +72,6 @@
 	int ret = uhci_init(uhci, device);
 	if (ret != EOK) {
-		usb_log_error("Failed to initialize UHCI driver: %s.\n",
-		    str_error(ret));
+		usb_log_error("Failed(%d) to initialize UHCI driver: %s.\n",
+		    ret, str_error(ret));
 		return ret;
 	}
Index: uspace/drv/uhci-hcd/pci.c
===================================================================
--- uspace/drv/uhci-hcd/pci.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/pci.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -90,5 +90,5 @@
 			io_address = res->res.io_range.address;
 			io_size = res->res.io_range.size;
-			usb_log_debug2("Found io: %" PRIx64" %zu.\n",
+			usb_log_debug2("Found io: %llx %zu.\n",
 			    res->res.io_range.address, res->res.io_range.size);
 			io_found = true;
Index: uspace/drv/uhci-hcd/transfer_list.c
===================================================================
--- uspace/drv/uhci-hcd/transfer_list.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/transfer_list.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -58,5 +58,5 @@
 	}
 	uint32_t queue_head_pa = addr_to_phys(instance->queue_head);
-	usb_log_debug2("Transfer list %s setup with QH: %p (%#" PRIx32" ).\n",
+	usb_log_debug2("Transfer list %s setup with QH: %p(%p).\n",
 	    name, instance->queue_head, queue_head_pa);
 
Index: uspace/drv/uhci-hcd/uhci.c
===================================================================
--- uspace/drv/uhci-hcd/uhci.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-hcd/uhci.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -168,8 +168,7 @@
 	    pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq);
 	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed to get I/O addresses for %" PRIun ": %s.\n",
-	    device->handle, str_error(ret));
-	usb_log_debug("I/O regs at 0x%p (size %zu), IRQ %d.\n",
-	    (void *) io_reg_base, io_reg_size, irq);
+	    "Failed(%d) to get I/O addresses:.\n", ret, device->handle);
+	usb_log_debug("I/O regs at 0x%X (size %zu), IRQ %d.\n",
+	    io_reg_base, io_reg_size, irq);
 
 	ret = pci_disable_legacy(device);
Index: uspace/drv/uhci-rhd/main.c
===================================================================
--- uspace/drv/uhci-rhd/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-rhd/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2011 Jan Vesely
+ * Copyright (c) 2011 Vojtech Horky, Jan Vesely
  * All rights reserved.
  *
@@ -84,6 +84,5 @@
 		return EINVAL;
 
-	usb_log_debug2("uhci_rh_add_device(handle=%" PRIun ")\n",
-	    device->handle);
+	usb_log_debug2("%s called device %d\n", __FUNCTION__, device->handle);
 
 	uintptr_t io_regs = 0;
@@ -102,7 +101,6 @@
 	ret = hc_get_my_registers(device, &io_regs, &io_size);
 	CHECK_RET_FREE_RH_RETURN(ret,
-	    "Failed to get registers from HC: %s.\n", str_error(ret));
-	usb_log_debug("I/O regs at %p (size %zuB).\n",
-	    (void *) io_regs, io_size);
+	    "Failed(%d) to get registers from HC: %s.\n", ret, str_error(ret));
+	usb_log_debug("I/O regs at %#x (size %zu).\n", io_regs, io_size);
 
 	rh = malloc(sizeof(uhci_root_hub_t));
@@ -117,5 +115,5 @@
 
 	device->driver_data = rh;
-	usb_log_info("Controlling root hub '%s' (%" PRIun ").\n",
+	usb_log_info("Controlling root hub '%s' (%llu).\n",
 	    device->name, device->handle);
 	return EOK;
Index: uspace/drv/uhci-rhd/port.c
===================================================================
--- uspace/drv/uhci-rhd/port.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/uhci-rhd/port.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -89,5 +89,5 @@
 {
 	assert(port);
-	asprintf(&port->id_string, "Port (%p - %u)", port, number);
+	asprintf(&port->id_string, "Port (%p - %d)", port, number);
 	if (port->id_string == NULL) {
 		return ENOMEM;
@@ -115,5 +115,5 @@
 
 	fibril_add_ready(port->checker);
-	usb_log_debug("%s: Started polling fibril (%" PRIun ").\n",
+	usb_log_debug("%s: Started polling fibril(%x).\n",
 	    port->id_string, port->checker);
 	return EOK;
@@ -267,5 +267,5 @@
 	}
 
-	usb_log_info("New device at port %u, address %d (handle %" PRIun ").\n",
+	usb_log_info("New device at port %u, address %d (handle %llu).\n",
 	    port->number, dev_addr, port->attached_device);
 	return EOK;
@@ -283,5 +283,5 @@
 int uhci_port_remove_device(uhci_port_t *port)
 {
-	usb_log_error("%s: Don't know how to remove device %" PRIun ".\n",
+	usb_log_error("%s: Don't know how to remove device %llu.\n",
 	    port->id_string, port->attached_device);
 	return ENOTSUP;
Index: uspace/drv/usbflbk/main.c
===================================================================
--- uspace/drv/usbflbk/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbflbk/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -65,5 +65,5 @@
 
 	usb_log_info("Pretending to control %s `%s'" \
-	    " (node `%s', handle %" PRIun ").\n",
+	    " (node `%s', handle %llu).\n",
 	    dev->interface_no < 0 ? "device" : "interface",
 	    dev->ddf_dev->name, fun_name, dev->ddf_dev->handle);
Index: uspace/drv/usbhid/kbd/conv.c
===================================================================
--- uspace/drv/usbhid/kbd/conv.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/kbd/conv.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -99,6 +99,5 @@
 	[0x30] = KC_RBRACKET,
 	[0x31] = KC_BACKSLASH,
-	//[0x32] = KC_,	// TODO: HASH??? maybe same as 0x31 - backslash
-	[0x32] = KC_BACKSLASH,
+	//[0x32] = KC_,	// TODO: HASH??? maybe some as 0x31 - backslash
 	[0x33] = KC_SEMICOLON,
 	[0x34] = KC_QUOTE,  // same as APOSTROPHE? (')
Index: uspace/drv/usbhid/kbd/kbddev.c
===================================================================
--- uspace/drv/usbhid/kbd/kbddev.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/kbd/kbddev.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -177,10 +177,10 @@
 /*----------------------------------------------------------------------------*/
 
-//static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count,
-//    uint8_t report_id, void *arg);
-
-//static const usb_hid_report_in_callbacks_t usb_kbd_parser_callbacks = {
-//	.keyboard = usb_kbd_process_keycodes
-//};
+static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count,
+    uint8_t report_id, void *arg);
+
+static const usb_hid_report_in_callbacks_t usb_kbd_parser_callbacks = {
+	.keyboard = usb_kbd_process_keycodes
+};
 
 /*----------------------------------------------------------------------------*/
@@ -336,6 +336,4 @@
 		return;
 	}
-	
-	// TODO: output translating does not work!!
 	
 	usb_log_debug("Output report buffer: %s\n", 
@@ -490,5 +488,5 @@
  */
 static void usb_kbd_check_key_changes(usb_hid_dev_t *hid_dev, 
-    usb_kbd_t *kbd_dev/*, const uint8_t *key_codes, size_t count*/)
+    usb_kbd_t *kbd_dev, const uint8_t *key_codes, size_t count)
 {
 	unsigned int key;
@@ -504,27 +502,30 @@
 	 */
 	i = 0;
-	while (i < kbd_dev->key_count && kbd_dev->keys[i] != ERROR_ROLLOVER) {
+	while (i < count && key_codes[i] != ERROR_ROLLOVER) {
 		++i;
 	}
-	if (i != kbd_dev->key_count) {
+	if (i != count) {
 		usb_log_debug("Phantom state occured.\n");
 		// phantom state, do nothing
 		return;
 	}
+	
+	/* TODO: quite dummy right now, think of better implementation */
+	assert(count == kbd_dev->key_count);
 	
 	/*
 	 * 1) Key releases
 	 */
-	for (j = 0; j < kbd_dev->key_count; ++j) {
+	for (j = 0; j < count; ++j) {
 		// try to find the old key in the new key list
 		i = 0;
 		while (i < kbd_dev->key_count
-		    && kbd_dev->keys[i] != kbd_dev->keys_old[j]) {
+		    && key_codes[i] != kbd_dev->keys[j]) {
 			++i;
 		}
 		
-		if (i == kbd_dev->key_count) {
+		if (i == count) {
 			// not found, i.e. the key was released
-			key = usbhid_parse_scancode(kbd_dev->keys_old[j]);
+			key = usbhid_parse_scancode(kbd_dev->keys[j]);
 			if (!usb_kbd_is_lock(key)) {
 				usb_kbd_repeat_stop(kbd_dev, key);
@@ -543,15 +544,15 @@
 		// try to find the new key in the old key list
 		j = 0;
-		while (j < kbd_dev->key_count 
-		    && kbd_dev->keys_old[j] != kbd_dev->keys[i]) { 
+		while (j < count && kbd_dev->keys[j] != key_codes[i]) { 
 			++j;
 		}
 		
-		if (j == kbd_dev->key_count) {
+		if (j == count) {
 			// not found, i.e. new key pressed
-			key = usbhid_parse_scancode(kbd_dev->keys[i]);
+			key = usbhid_parse_scancode(key_codes[i]);
 			usb_log_debug2("Key pressed: %d (keycode: %d)\n", key,
-			    kbd_dev->keys[i]);
-			usb_kbd_push_ev(hid_dev, kbd_dev, KEY_PRESS, key);
+			    key_codes[i]);
+			usb_kbd_push_ev(hid_dev, kbd_dev, KEY_PRESS, 
+			    key);
 			if (!usb_kbd_is_lock(key)) {
 				usb_kbd_repeat_start(kbd_dev, key);
@@ -562,24 +563,8 @@
 	}
 	
-//	usb_log_debug("Old keys: ");
-//	for (i = 0; i < kbd_dev->key_count; ++i) {
-//		usb_log_debug("%d ", kbd_dev->keys_old[i]);
-//	}
-//	usb_log_debug("\n");
-	
-	
-//	usb_log_debug("New keys: ");
-//	for (i = 0; i < kbd_dev->key_count; ++i) {
-//		usb_log_debug("%d ", kbd_dev->keys[i]);
-//	}
-//	usb_log_debug("\n");
-	
-	memcpy(kbd_dev->keys_old, kbd_dev->keys, kbd_dev->key_count * 4);
-	
-	usb_log_debug2("New stored keys: ");
-	for (i = 0; i < kbd_dev->key_count; ++i) {
-		usb_log_debug2("%d ", kbd_dev->keys_old[i]);
-	}
-	usb_log_debug2("\n");
+	memcpy(kbd_dev->keys, key_codes, count);
+
+	usb_log_debug("New stored keycodes: %s\n", 
+	    usb_debug_str_buffer(kbd_dev->keys, kbd_dev->key_count, 0));
 }
 
@@ -603,34 +588,34 @@
  * @sa usb_kbd_check_key_changes(), usb_kbd_check_modifier_changes()
  */
-//static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count,
-//    uint8_t report_id, void *arg)
-//{
-//	if (arg == NULL) {
-//		usb_log_warning("Missing argument in callback "
-//		    "usbhid_process_keycodes().\n");
-//		return;
-//	}
-	
-//	usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)arg;
-	
-//	if (hid_dev->data == NULL) {
-//		usb_log_warning("Missing KBD device structure in callback.\n");
-//		return;
-//	}
-	
-//	usb_kbd_t *kbd_dev = (usb_kbd_t *)hid_dev->data;
-
-//	usb_log_debug("Got keys from parser (report id: %u): %s\n", 
-//	    report_id, usb_debug_str_buffer(key_codes, count, 0));
-	
-//	if (count != kbd_dev->key_count) {
-//		usb_log_warning("Number of received keycodes (%zu) differs from"
-//		    " expected (%zu).\n", count, kbd_dev->key_count);
-//		return;
-//	}
-	
-//	///usb_kbd_check_modifier_changes(kbd_dev, key_codes, count);
-//	usb_kbd_check_key_changes(hid_dev, kbd_dev, key_codes, count);
-//}
+static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count,
+    uint8_t report_id, void *arg)
+{
+	if (arg == NULL) {
+		usb_log_warning("Missing argument in callback "
+		    "usbhid_process_keycodes().\n");
+		return;
+	}
+	
+	usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)arg;
+	
+	if (hid_dev->data == NULL) {
+		usb_log_warning("Missing KBD device structure in callback.\n");
+		return;
+	}
+	
+	usb_kbd_t *kbd_dev = (usb_kbd_t *)hid_dev->data;
+
+	usb_log_debug("Got keys from parser (report id: %u): %s\n", 
+	    report_id, usb_debug_str_buffer(key_codes, count, 0));
+	
+	if (count != kbd_dev->key_count) {
+		usb_log_warning("Number of received keycodes (%d) differs from"
+		    " expected number (%d).\n", count, kbd_dev->key_count);
+		return;
+	}
+	
+	///usb_kbd_check_modifier_changes(kbd_dev, key_codes, count);
+	usb_kbd_check_key_changes(hid_dev, kbd_dev, key_codes, count);
+}
 
 /*----------------------------------------------------------------------------*/
@@ -656,9 +641,5 @@
                                  uint8_t *buffer, size_t actual_size)
 {
-	assert(hid_dev->report != NULL);
-	assert(hid_dev != NULL);
-	assert(hid_dev->data != NULL);
-	
-	usb_kbd_t *kbd_dev = (usb_kbd_t *)hid_dev->data;
+	assert(hid_dev->parser != NULL);
 
 	usb_log_debug("Calling usb_hid_parse_report() with "
@@ -678,47 +659,24 @@
 						USB_HID_REPORT_TYPE_INPUT);
 
+	unsigned i=0;
+	usb_kbd_t *kbd_dev = (usb_kbd_t *)hid_dev->data;
+
+	memset(kbd_dev->keys, 0, kbd_dev->key_count);
+	while(field != NULL) {
+		if((i < kbd_dev->key_count) && (field->value != 0)){
+			kbd_dev->keys[i++] = (uint8_t)field->usage;
+		}
+		field = usb_hid_report_get_sibling(hid_dev->parser, field, path, 
+		                                   USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
+		                                   USB_HID_REPORT_TYPE_INPUT);
+	}
+	usb_kbd_process_keycodes(kbd_dev->keys, kbd_dev->key_count, report_id, hid_dev);
+	
 	usb_hid_report_path_free(path);
 	
 	if (rc != EOK) {
-		usb_log_warning("Error in usb_hid_parse_report():"
+		usb_log_warning("Error in usb_hid_boot_keyboard_input_report():"
 		    "%s\n", str_error(rc));
 	}
-	
-	// fill in the currently pressed keys
-	
-	usb_hid_report_field_t *field = usb_hid_report_get_sibling(
-	    hid_dev->report, NULL, path, USB_HID_PATH_COMPARE_END 
-	    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, USB_HID_REPORT_TYPE_INPUT);
-	unsigned i = 0;
-	
-	// TODO: remove this hack - skipping first field
-	field = usb_hid_report_get_sibling(hid_dev->report, field, path, 
-	    USB_HID_PATH_COMPARE_END 
-	    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
-	    USB_HID_REPORT_TYPE_INPUT);
-	
-	while (field != NULL) {
-		usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)\n", 
-		    field, field->value, field->usage);
-		
-		assert(i < kbd_dev->key_count);
-//		if (i == kbd_dev->key_count) {
-//			break;
-//		}
-		
-		// save the key usage
-		kbd_dev->keys[i] = field->usage;
-		usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]);
-		
-		++i;
-		field = usb_hid_report_get_sibling(hid_dev->report, field, path, 
-		    USB_HID_PATH_COMPARE_END 
-		    | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 
-		    USB_HID_REPORT_TYPE_INPUT);
-	}
-	
-	usb_hid_report_path_free(path);
-	
-	usb_kbd_check_key_changes(hid_dev, kbd_dev);
 }
 
@@ -808,5 +766,5 @@
 	
 	kbd_dev->key_count = usb_hid_report_input_length(
-	    hid_dev->report, path, 
+	    hid_dev->parser, path, 
 	    USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
 	usb_hid_report_path_free(path);
@@ -814,5 +772,5 @@
 	usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count);
 	
-	kbd_dev->keys = (int32_t *)calloc(kbd_dev->key_count, sizeof(int32_t));
+	kbd_dev->keys = (uint8_t *)calloc(kbd_dev->key_count, sizeof(uint8_t));
 	
 	if (kbd_dev->keys == NULL) {
@@ -822,20 +780,10 @@
 	}
 	
-	kbd_dev->keys_old = 
-		(int32_t *)calloc(kbd_dev->key_count, sizeof(int32_t));
-	
-	if (kbd_dev->keys_old == NULL) {
-		usb_log_fatal("No memory!\n");
-		free(kbd_dev->keys);
-		free(kbd_dev);
-		return ENOMEM;
-	}
-	
 	/*
 	 * Output report
 	 */
 	kbd_dev->output_size = 0;
-	kbd_dev->output_buffer = usb_hid_report_output(hid_dev->report, 
-	    &kbd_dev->output_size, 0);
+	kbd_dev->output_buffer = usb_hid_report_output(hid_dev->parser, 
+	    &kbd_dev->output_size, 0x00);
 	if (kbd_dev->output_buffer == NULL) {
 		usb_log_warning("Error creating output report buffer.\n");
@@ -850,5 +798,5 @@
 	    kbd_dev->led_path, USB_HIDUT_PAGE_LED, 0);
 	
-	kbd_dev->led_output_size = usb_hid_report_output_size(hid_dev->report, 
+	kbd_dev->led_output_size = usb_hid_report_output_size(hid_dev->parser, 
 	    kbd_dev->led_path, 
 	    USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
@@ -1007,5 +955,5 @@
 int usb_kbd_set_boot_protocol(usb_hid_dev_t *hid_dev)
 {
-	int rc = usb_hid_parse_report_descriptor(hid_dev->report, 
+	int rc = usb_hid_parse_report_descriptor(hid_dev->parser, 
 	    USB_KBD_BOOT_REPORT_DESCRIPTOR, 
 	    USB_KBD_BOOT_REPORT_DESCRIPTOR_SIZE);
Index: uspace/drv/usbhid/kbd/kbddev.h
===================================================================
--- uspace/drv/usbhid/kbd/kbddev.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/kbd/kbddev.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -65,8 +65,6 @@
  */
 typedef struct usb_kbd_t {
-	/** Previously pressed keys (not translated to key codes). */
-	int32_t *keys_old;
 	/** Currently pressed keys (not translated to key codes). */
-	int32_t *keys;
+	uint8_t *keys;
 	/** Count of stored keys (i.e. number of keys in the report). */
 	size_t key_count;
Index: uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c
===================================================================
--- uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/lgtch-ultrax/lgtch-ultrax.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -86,5 +86,5 @@
 	usb_hid_report_path_set_report_id(path, report_id);
 
-	usb_hid_report_field_t *field = usb_hid_report_get_sibling(hid_dev->report, NULL, path, USB_HID_PATH_COMPARE_END , USB_HID_REPORT_TYPE_INPUT);
+	usb_hid_report_field_t *field = usb_hid_report_get_sibling(hid_dev->parser, NULL, path, USB_HID_PATH_COMPARE_END , USB_HID_REPORT_TYPE_INPUT);
 	while(field != NULL) {
 		usb_log_debug("KEY VALUE(%X) USAGE(%X)\n", field->value, field->usage);
Index: uspace/drv/usbhid/mouse/mousedev.c
===================================================================
--- uspace/drv/usbhid/mouse/mousedev.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/mouse/mousedev.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -296,5 +296,5 @@
 int usb_mouse_set_boot_protocol(usb_hid_dev_t *hid_dev)
 {
-	int rc = usb_hid_parse_report_descriptor(hid_dev->report, 
+	int rc = usb_hid_parse_report_descriptor(hid_dev->parser, 
 	    USB_MOUSE_BOOT_REPORT_DESCRIPTOR, 
 	    USB_MOUSE_BOOT_REPORT_DESCRIPTOR_SIZE);
Index: uspace/drv/usbhid/subdrivers.c
===================================================================
--- uspace/drv/usbhid/subdrivers.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/subdrivers.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -55,6 +55,6 @@
 		USB_HID_PATH_COMPARE_END 
 		| USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
-		-1,
-		-1,
+		0,
+		0,
 		{
 			.init = usb_kbd_init,
@@ -79,5 +79,5 @@
 		}
 	},
-	{NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL}}
+	{NULL, -1, 0, 0, 0, {NULL, NULL, NULL, NULL}}
 };
 
Index: uspace/drv/usbhid/subdrivers.h
===================================================================
--- uspace/drv/usbhid/subdrivers.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/subdrivers.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -56,6 +56,6 @@
 	int report_id;
 	int compare;
-	int vendor_id;
-	int product_id;
+	uint16_t vendor_id;
+	uint16_t product_id;
 	usb_hid_subdriver_t subdriver;
 } usb_hid_subdriver_mapping_t;
Index: uspace/drv/usbhid/usbhid.c
===================================================================
--- uspace/drv/usbhid/usbhid.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/usbhid.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -158,11 +158,5 @@
     const usb_hid_subdriver_mapping_t *mapping)
 {
-	assert(hid_dev != NULL);
-	assert(hid_dev->usb_dev != NULL);
-	
-	return (hid_dev->usb_dev->descriptors.device.vendor_id 
-	    == mapping->vendor_id
-	    && hid_dev->usb_dev->descriptors.device.product_id 
-	    == mapping->product_id);
+	return false;
 }
 
@@ -198,10 +192,10 @@
 	}
 	
-	assert(hid_dev->report != NULL);
+	assert(hid_dev->parser != NULL);
 	
 	usb_log_debug("Compare flags: %d\n", mapping->compare);
-	size_t size = usb_hid_report_input_length(hid_dev->report, usage_path, 
+	size_t size = usb_hid_report_input_length(hid_dev->parser, usage_path, 
 	    mapping->compare);
-	usb_log_debug("Size of the input report: %zuB\n", size);
+	usb_log_debug("Size of the input report: %d\n", size);
 	
 	usb_hid_report_path_free(usage_path);
@@ -257,13 +251,13 @@
 	while (count < USB_HID_MAX_SUBDRIVERS &&
 	    (mapping->usage_path != NULL
-	    || mapping->vendor_id >= 0 || mapping->product_id >= 0)) {
+	    || mapping->vendor_id != 0 || mapping->product_id != 0)) {
 		// check the vendor & product ID
-		if (mapping->vendor_id >= 0 && mapping->product_id < 0) {
-			usb_log_warning("Missing Product ID for Vendor ID %d\n",
+		if (mapping->vendor_id != 0 && mapping->product_id == 0) {
+			usb_log_warning("Missing Product ID for Vendor ID %u\n",
 			    mapping->vendor_id);
 			return EINVAL;
 		}
-		if (mapping->product_id >= 0 && mapping->vendor_id < 0) {
-			usb_log_warning("Missing Vendor ID for Product ID %d\n",
+		if (mapping->product_id != 0 && mapping->vendor_id == 0) {
+			usb_log_warning("Missing Vendor ID for Product ID %u\n",
 			    mapping->product_id);
 			return EINVAL;
@@ -273,6 +267,6 @@
 		matched = false;
 		
-		if (mapping->vendor_id >= 0) {
-			assert(mapping->product_id >= 0);
+		if (mapping->vendor_id != 0) {
+			assert(mapping->product_id != 0);
 			usb_log_debug("Comparing device against vendor ID %u"
 			    " and product ID %u.\n", mapping->vendor_id,
@@ -347,7 +341,7 @@
 	}
 	
-	hid_dev->report = (usb_hid_report_t *)(malloc(sizeof(
+	hid_dev->parser = (usb_hid_report_t *)(malloc(sizeof(
 	    usb_hid_report_t)));
-	if (hid_dev->report == NULL) {
+	if (hid_dev->parser == NULL) {
 		usb_log_fatal("No memory!\n");
 		free(hid_dev);
@@ -391,5 +385,5 @@
 	/* Get the report descriptor and parse it. */
 	rc = usb_hid_process_report_descriptor(hid_dev->usb_dev, 
-	    hid_dev->report);
+	    hid_dev->parser);
 	
 	bool fallback = false;
@@ -589,6 +583,6 @@
 
 	// destroy the parser
-	if ((*hid_dev)->report != NULL) {
-		usb_hid_free_report((*hid_dev)->report);
+	if ((*hid_dev)->parser != NULL) {
+		usb_hid_free_report((*hid_dev)->parser);
 	}
 
Index: uspace/drv/usbhid/usbhid.h
===================================================================
--- uspace/drv/usbhid/usbhid.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhid/usbhid.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -91,5 +91,5 @@
 	
 	/** HID Report parser. */
-	usb_hid_report_t *report;
+	usb_hid_report_t *parser;
 	
 	/** Arbitrary data (e.g. a special structure for handling keyboard). */
Index: uspace/drv/usbhub/ports.c
===================================================================
--- uspace/drv/usbhub/ports.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhub/ports.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -83,5 +83,5 @@
 void usb_hub_process_interrupt(usb_hub_info_t * hub,
 	uint16_t port) {
-	usb_log_debug("interrupt at port %zu\n", (size_t) port);
+	usb_log_debug("interrupt at port %d\n", port);
 	//determine type of change
 	//usb_pipe_t *pipe = hub->control_pipe;
@@ -93,5 +93,5 @@
 	if (opResult != EOK) {
 		usb_log_error("Failed to get port %zu status: %s.\n",
-		    (size_t) port, str_error(opResult));
+		    port, str_error(opResult));
 		return;
 	}
@@ -100,6 +100,5 @@
 		bool device_connected = usb_port_is_status(status,
 		    USB_HUB_FEATURE_PORT_CONNECTION);
-		usb_log_debug("Connection change on port %zu: %s.\n",
-		    (size_t) port,
+		usb_log_debug("Connection change on port %zu: %s.\n", port,
 		    device_connected ? "device attached" : "device removed");
 
@@ -110,5 +109,5 @@
 				usb_log_error(
 				    "Cannot handle change on port %zu: %s.\n",
-				    (size_t) port, str_error(opResult));
+				    str_error(opResult));
 			}
 		} else {
@@ -211,5 +210,5 @@
 static void usb_hub_port_reset_completed(usb_hub_info_t * hub,
 	uint16_t port, uint32_t status){
-	usb_log_debug("Port %zu reset complete.\n", (size_t) port);
+	usb_log_debug("Port %zu reset complete.\n", port);
 	if (usb_port_is_status(status, USB_HUB_FEATURE_PORT_ENABLE)) {
 		/* Finalize device adding. */
@@ -223,5 +222,5 @@
 		usb_log_warning(
 		    "Port %zu reset complete but port not enabled.\n",
-		    (size_t) port);
+		    port);
 	}
 }
Index: uspace/drv/usbhub/usbhub.c
===================================================================
--- uspace/drv/usbhub/usbhub.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbhub/usbhub.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -264,6 +264,6 @@
 				    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));
+					usb_log_error("cannot power on port %d;  %d\n",
+					    port+1, opResult);
 				}
 			}
@@ -273,6 +273,6 @@
 			    USB_HUB_FEATURE_C_HUB_LOCAL_POWER);
 			if (opResult != EOK) {
-				usb_log_error("cannot power hub: %s\n",
-				    str_error(opResult));
+				usb_log_error("cannot power hub;  %d\n",
+				  opResult);
 			}
 		}
@@ -362,5 +362,5 @@
 	}
 
-	usb_log_info("Controlling hub `%s' (%zu ports).\n",
+	usb_log_info("Controlling hub `%s' (%d ports).\n",
 	    hub_info->usb_device->ddf_dev->name, hub_info->port_count);
 	return EOK;
@@ -430,6 +430,6 @@
 			    port, USB_HUB_FEATURE_PORT_POWER);
 			if (opResult != EOK) {
-				usb_log_error("Cannot power on port %zu: %s.\n",
-				    port, str_error(opResult));
+				usb_log_error("cannot power on port %d;  %d\n",
+				    port, opResult);
 			}
 		}
Index: uspace/drv/usbkbd/kbddev.c
===================================================================
--- uspace/drv/usbkbd/kbddev.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbkbd/kbddev.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -570,6 +570,6 @@
 	
 	if (count != kbd_dev->key_count) {
-		usb_log_warning("Number of received keycodes (%zu) differs from"
-		    " expected (%zu).\n", count, kbd_dev->key_count);
+		usb_log_warning("Number of received keycodes (%d) differs from"
+		    " expected number (%d).\n", count, kbd_dev->key_count);
 		return;
 	}
Index: uspace/drv/usbmid/main.c
===================================================================
--- uspace/drv/usbmid/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbmid/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -53,5 +53,12 @@
 	usb_log_info("Taking care of new MID `%s'.\n", dev->ddf_dev->name);
 
-	usb_pipe_start_long_transfer(&dev->ctrl_pipe);
+	int rc;
+
+	rc = usb_pipe_start_long_transfer(&dev->ctrl_pipe);
+	if (rc != EOK) {
+		usb_log_error("Failed to start transfer on control pipe: %s.\n",
+		    str_error(rc));
+		return rc;
+	}
 
 	bool accept = usbmid_explore_device(dev);
Index: uspace/drv/usbmouse/init.c
===================================================================
--- uspace/drv/usbmouse/init.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbmouse/init.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -125,4 +125,10 @@
 	}
 	
+	/* Open the control pipe. */
+	rc = usb_pipe_start_session(&dev->ctrl_pipe);
+	if (rc != EOK) {
+		goto leave;
+	}
+	
 	/* Set the boot protocol. */
 	rc = usb_control_request_set(&dev->ctrl_pipe,
@@ -134,5 +140,9 @@
 	}
 	
-	/* Everything all right. */
+	/* Close the control pipe (ignore errors). */
+	usb_pipe_end_session(&dev->ctrl_pipe);
+
+
+	/* Everything allright. */
 	dev->driver_data = mouse;
 	mouse->mouse_fun->driver_data = mouse;
Index: uspace/drv/usbmouse/main.c
===================================================================
--- uspace/drv/usbmouse/main.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/usbmouse/main.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -54,6 +54,5 @@
 	}
 
-	usb_log_debug("Polling pipe at endpoint %d.\n",
-	    dev->pipes[0].pipe->endpoint_no);
+	usb_log_debug("Polling pipe at endpoint %d.\n", dev->pipes[0].pipe->endpoint_no);
 
 	rc = usb_device_auto_poll(dev, 0,
@@ -67,5 +66,5 @@
 	}
 
-	usb_log_info("controlling new mouse (handle %" PRIun ").\n",
+	usb_log_info("controlling new mouse (handle %llu).\n",
 	    dev->ddf_dev->handle);
 
Index: uspace/drv/vhc/conndev.c
===================================================================
--- uspace/drv/vhc/conndev.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/drv/vhc/conndev.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -99,5 +99,5 @@
 		int rc = get_device_name(callback, devname, DEVICE_NAME_MAXLENGTH);
 
-		usb_log_info("New virtual device `%s' (id = %" PRIxn ").\n",
+		usb_log_info("New virtual device `%s' (id = %x).\n",
 		    rc == EOK ? devname : "<unknown>", dev->id);
 
@@ -122,6 +122,5 @@
 	}
 
-	usb_log_info("Virtual device disconnected (id = %" PRIxn ").\n",
-	    dev->id);
+	usb_log_info("Virtual device disconnected (id = %x).\n", dev->id);
 	virtdev_destroy_device(dev);
 }
Index: uspace/lib/usb/include/usb/debug.h
===================================================================
--- uspace/lib/usb/include/usb/debug.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/include/usb/debug.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -36,5 +36,4 @@
 #define LIBUSB_DEBUG_H_
 #include <stdio.h>
-#include <inttypes.h>
 #include <usb/usb.h>
 #include <assert.h>
@@ -86,6 +85,5 @@
 void usb_log_enable(usb_log_level_t, const char *);
 
-void usb_log_printf(usb_log_level_t, const char *, ...)
-	PRINTF_ATTRIBUTE(2, 3);
+void usb_log_printf(usb_log_level_t, const char *, ...);
 
 /** Log fatal error. */
Index: uspace/lib/usb/include/usb/pipes.h
===================================================================
--- uspace/lib/usb/include/usb/pipes.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/include/usb/pipes.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -99,18 +99,4 @@
 	/** Number of active transfers over the pipe. */
 	int refcount;
-	/** Number of failed attempts to open the HC phone.
-	 * When user requests usb_pipe_start_long_transfer() and the operation
-	 * fails, there is no way to report this to the user.
-	 * That the soft reference counter is increased to record the attempt.
-	 * When the user then request e.g. usb_pipe_read(), it will try to
-	 * add reference as well.
-	 * If that fails, it is reported to the user. If it is okay, the
-	 * real reference counter is incremented.
-	 * The problem might arise when ending the long transfer (since
-	 * the number of references would be only 1, but logically it shall be
-	 * two).
-	 * Decrementing the soft counter first shall solve this.
-	 */
-	int refcount_soft;
 
 	/** Whether to automatically reset halt on the endpoint.
@@ -177,5 +163,9 @@
 int usb_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *);
 
-void usb_pipe_start_long_transfer(usb_pipe_t *);
+int usb_pipe_start_session(usb_pipe_t *);
+int usb_pipe_end_session(usb_pipe_t *);
+bool usb_pipe_is_session_started(usb_pipe_t *);
+
+int usb_pipe_start_long_transfer(usb_pipe_t *);
 void usb_pipe_end_long_transfer(usb_pipe_t *);
 
Index: uspace/lib/usb/src/devdrv.c
===================================================================
--- uspace/lib/usb/src/devdrv.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/devdrv.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -236,5 +236,8 @@
 
 	/* It is worth to start a long transfer. */
-	usb_pipe_start_long_transfer(ctrl_pipe);
+	rc = usb_pipe_start_long_transfer(ctrl_pipe);
+	if (rc != EOK) {
+		return rc;
+	}
 
 	/* Get the device descriptor. */
Index: uspace/lib/usb/src/devpoll.c
===================================================================
--- uspace/lib/usb/src/devpoll.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/devpoll.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -78,5 +78,5 @@
 		usb_endpoint_mapping_t *mapping
 		    = &polling_data->dev->pipes[polling_data->pipe_index];
-		usb_log_debug("Poll%p: started polling of `%s' - " \
+		usb_log_debug("Poll0x%x: started polling of `%s' - " \
 		    "interface %d (%s,%d,%d), %zuB/%zu.\n",
 		    polling_data,
@@ -100,5 +100,5 @@
 			if (rc == EOK) {
 				usb_log_debug(
-				    "Poll%p: received: '%s' (%zuB).\n",
+				    "Poll0x%x: received: '%s' (%zuB).\n",
 				    polling_data,
 				    usb_debug_str_buffer(polling_data->buffer,
@@ -107,5 +107,5 @@
 			} else {
 				usb_log_debug(
-				    "Poll%p: polling failed: %s.\n",
+				    "Poll0x%x: polling failed: %s.\n",
 				    polling_data, str_error(rc));
 			}
Index: uspace/lib/usb/src/hidreport.c
===================================================================
--- uspace/lib/usb/src/hidreport.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/hidreport.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -109,5 +109,5 @@
 	
 	if (*d != sizeof(usb_standard_hid_descriptor_t)) {
-		usb_log_error("HID descriptor has wrong size (%u, expected %zu"
+		usb_log_error("HID descriptor hass wrong size (%u, expected %u"
 		    ")\n", *d, sizeof(usb_standard_hid_descriptor_t));
 		return EINVAL;
@@ -149,5 +149,5 @@
 		free(*report_desc);
 		*report_desc = NULL;
-		usb_log_error("Report descriptor has wrong size (%zu, expected "
+		usb_log_error("Report descriptor has wrong size (%u, expected "
 		    "%u)\n", actual_size, length);
 		return EINVAL;
Index: uspace/lib/usb/src/pipepriv.c
===================================================================
--- uspace/lib/usb/src/pipepriv.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/pipepriv.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -77,11 +77,10 @@
  *
  * @param pipe The USB pipe.
- * @param hide_failure Whether to hide failure when adding reference
- *	(use soft refcount).
  * @return Error code.
  * @retval EOK Currently always.
  */
-int pipe_add_ref(usb_pipe_t *pipe, bool hide_failure)
+int pipe_add_ref(usb_pipe_t *pipe)
 {
+another_try:
 	pipe_acquire(pipe);
 
@@ -90,10 +89,8 @@
 		int phone = devman_device_connect(pipe->wire->hc_handle, 0);
 		if (phone < 0) {
-			if (hide_failure) {
-				pipe->refcount_soft++;
-				phone = EOK;
-			}
+			// TODO: treat some error as non-recoverable
+			// and return error from here
 			pipe_release(pipe);
-			return phone;
+			goto another_try;
 		}
 		/*
@@ -117,9 +114,4 @@
 {
 	pipe_acquire(pipe);
-	if (pipe->refcount_soft > 0) {
-		pipe->refcount_soft--;
-		pipe_release(pipe);
-		return;
-	}
 	assert(pipe->refcount > 0);
 	pipe->refcount--;
Index: uspace/lib/usb/src/pipepriv.h
===================================================================
--- uspace/lib/usb/src/pipepriv.h	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/pipepriv.h	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -37,5 +37,4 @@
 
 #include <usb/pipes.h>
-#include <bool.h>
 
 void pipe_acquire(usb_pipe_t *);
@@ -45,5 +44,5 @@
 void pipe_end_transaction(usb_pipe_t *);
 
-int pipe_add_ref(usb_pipe_t *, bool);
+int pipe_add_ref(usb_pipe_t *);
 void pipe_drop_ref(usb_pipe_t *);
 
Index: uspace/lib/usb/src/pipes.c
===================================================================
--- uspace/lib/usb/src/pipes.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/pipes.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -229,4 +229,62 @@
 }
 
+
+/** Start a session on the endpoint pipe.
+ *
+ * A session is something inside what any communication occurs.
+ * It is expected that sessions would be started right before the transfer
+ * and ended - see usb_pipe_end_session() - after the last
+ * transfer.
+ * The reason for this is that session actually opens some communication
+ * channel to the host controller (or to the physical hardware if you
+ * wish) and thus it involves acquiring kernel resources.
+ * Since they are limited, sessions shall not be longer than strictly
+ * necessary.
+ *
+ * @deprecated
+ * Obsoleted with introduction of usb_pipe_start_long_transfer
+ *
+ * @param pipe Endpoint pipe to start the session on.
+ * @return Error code.
+ */
+int usb_pipe_start_session(usb_pipe_t *pipe)
+{
+	usb_log_warning("usb_pipe_start_session() was deprecated.\n");
+	return EOK;
+}
+
+
+/** Ends a session on the endpoint pipe.
+ *
+ * @deprecated
+ * Obsoleted with introduction of usb_pipe_end_long_transfer
+ *
+ * @see usb_pipe_start_session
+ *
+ * @param pipe Endpoint pipe to end the session on.
+ * @return Error code.
+ */
+int usb_pipe_end_session(usb_pipe_t *pipe)
+{
+	usb_log_warning("usb_pipe_end_session() was deprecated.\n");
+	return EOK;
+}
+
+/** Tell whether a session is started (open) on the endpoint pipe.
+ *
+ * The expected usage of this function is in assertions for some
+ * nested functions.
+ *
+ * @param pipe Endpoint pipe in question.
+ * @return Whether @p pipe has opened a session.
+ */
+bool usb_pipe_is_session_started(usb_pipe_t *pipe)
+{
+	pipe_acquire(pipe);
+	bool started = pipe->refcount > 0;
+	pipe_release(pipe);
+	return started;
+}
+
 /** Prepare pipe for a long transfer.
  *
@@ -239,7 +297,7 @@
  * @return Error code.
  */
-void usb_pipe_start_long_transfer(usb_pipe_t *pipe)
-{
-	(void) pipe_add_ref(pipe, true);
+int usb_pipe_start_long_transfer(usb_pipe_t *pipe)
+{
+	return pipe_add_ref(pipe);
 }
 
Index: uspace/lib/usb/src/pipesinit.c
===================================================================
--- uspace/lib/usb/src/pipesinit.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/pipesinit.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -365,5 +365,4 @@
 	pipe->direction = direction;
 	pipe->refcount = 0;
-	pipe->refcount_soft = 0;
 	pipe->auto_reset_halt = false;
 
@@ -420,5 +419,9 @@
 	int rc;
 
-	usb_pipe_start_long_transfer(pipe);
+	rc = usb_pipe_start_long_transfer(pipe);
+	if (rc != EOK) {
+		return rc;
+	}
+
 
 	uint8_t dev_descr_start[CTRL_PIPE_MIN_PACKET_SIZE];
Index: uspace/lib/usb/src/pipesio.c
===================================================================
--- uspace/lib/usb/src/pipesio.c	(revision eb393ad5593c125b3b9d58400209c162dcdec017)
+++ uspace/lib/usb/src/pipesio.c	(revision c7c0984abd146b8b0c0fe4967d83486b28accc5d)
@@ -173,5 +173,5 @@
 
 	int rc;
-	rc = pipe_add_ref(pipe, false);
+	rc = pipe_add_ref(pipe);
 	if (rc != EOK) {
 		return rc;
@@ -296,5 +296,5 @@
 	int rc;
 
-	rc = pipe_add_ref(pipe, false);
+	rc = pipe_add_ref(pipe);
 	if (rc != EOK) {
 		return rc;
@@ -447,5 +447,5 @@
 	int rc;
 
-	rc = pipe_add_ref(pipe, false);
+	rc = pipe_add_ref(pipe);
 	if (rc != EOK) {
 		return rc;
@@ -579,5 +579,5 @@
 	int rc;
 
-	rc = pipe_add_ref(pipe, false);
+	rc = pipe_add_ref(pipe);
 	if (rc != EOK) {
 		return rc;
