Index: uspace/lib/usbhost/include/usb/host/ddf_helpers.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/ddf_helpers.h	(revision 071a1ddbcc6bb2b9c6f3c1a3acc865f1f23b5fe0)
+++ uspace/lib/usbhost/include/usb/host/ddf_helpers.h	(revision b2a1fd92811bab5d05b74e0c829a43f348315cbc)
@@ -48,5 +48,5 @@
 typedef void (*driver_fini_t)(hcd_t *);
 typedef int (*claim_t)(ddf_dev_t *);
-typedef int (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *);
+typedef int (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *, int *);
 
 typedef struct {
@@ -75,5 +75,5 @@
     const hw_res_list_parsed_t *hw_res,
     interrupt_handler_t handler,
-    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *),
+    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *, int *),
     cap_handle_t *handle);
 void ddf_hcd_gen_irq_handler(ipc_call_t *call, ddf_dev_t *dev);
Index: uspace/lib/usbhost/include/usb/host/hcd.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/hcd.h	(revision 071a1ddbcc6bb2b9c6f3c1a3acc865f1f23b5fe0)
+++ uspace/lib/usbhost/include/usb/host/hcd.h	(revision b2a1fd92811bab5d05b74e0c829a43f348315cbc)
@@ -102,5 +102,5 @@
 }
 
-extern usb_address_t hcd_request_address(hcd_t *, usb_speed_t);
+extern int hcd_request_address(hcd_t *, usb_speed_t, usb_address_t *);
 
 extern int hcd_release_address(hcd_t *, usb_address_t);
@@ -123,6 +123,6 @@
     usbhc_iface_transfer_out_callback_t, void *, const char *);
 
-extern ssize_t hcd_send_batch_sync(hcd_t *, usb_target_t, usb_direction_t,
-    void *, size_t, uint64_t, const char *);
+extern int hcd_send_batch_sync(hcd_t *, usb_target_t, usb_direction_t,
+    void *, size_t, uint64_t, const char *, size_t *);
 
 #endif
Index: uspace/lib/usbhost/src/ddf_helpers.c
===================================================================
--- uspace/lib/usbhost/src/ddf_helpers.c	(revision 071a1ddbcc6bb2b9c6f3c1a3acc865f1f23b5fe0)
+++ uspace/lib/usbhost/src/ddf_helpers.c	(revision b2a1fd92811bab5d05b74e0c829a43f348315cbc)
@@ -481,9 +481,10 @@
 	}};
 
-	const usb_address_t address = hcd_request_address(hcd, speed);
-	if (address < 0) {
+	usb_address_t address;
+	ret = hcd_request_address(hcd, speed, &address);
+	if (ret != EOK) {
 		usb_log_error("Failed to reserve new address: %s.",
-		    str_error(address));
-		return address;
+		    str_error(ret));
+		return ret;
 	}
 
@@ -518,10 +519,14 @@
 	usb_log_debug("Device(%d): Requesting first 8B of device descriptor.",
 	    address);
-	ssize_t got = hcd_send_batch_sync(hcd, default_target, USB_DIRECTION_IN,
+	size_t got;
+	ret = hcd_send_batch_sync(hcd, default_target, USB_DIRECTION_IN,
 	    &desc, CTRL_PIPE_MIN_PACKET_SIZE, *(uint64_t *)&get_device_desc_8,
-	    "read first 8 bytes of dev descriptor");
-
-	if (got != CTRL_PIPE_MIN_PACKET_SIZE) {
-		ret = got < 0 ? got : EOVERFLOW;
+	    "read first 8 bytes of dev descriptor", &got);
+
+	if (ret == EOK && got != CTRL_PIPE_MIN_PACKET_SIZE) {
+		ret = EOVERFLOW;
+	}
+
+	if (ret != EOK) {
 		usb_log_error("Device(%d): Failed to get 8B of dev descr: %s.",
 		    address, str_error(ret));
@@ -552,16 +557,16 @@
 
 	usb_log_debug("Device(%d): Setting USB address.", address);
-	got = hcd_send_batch_sync(hcd, default_target, USB_DIRECTION_OUT,
-	    NULL, 0, *(uint64_t *)&set_address, "set address");
+	ret = hcd_send_batch_sync(hcd, default_target, USB_DIRECTION_OUT,
+	    NULL, 0, *(uint64_t *)&set_address, "set address", &got);
 
 	usb_log_debug("Device(%d): Removing default (0:0) EP.", address);
 	hcd_remove_ep(hcd, default_target, USB_DIRECTION_BOTH);
 
-	if (got != 0) {
+	if (ret != EOK) {
 		usb_log_error("Device(%d): Failed to set new address: %s.",
-		    address, str_error(got));
+		    address, str_error(ret));
 		hcd_remove_ep(hcd, target, USB_DIRECTION_BOTH);
 		hcd_release_address(hcd, address);
-		return got;
+		return ret;
 	}
 
@@ -572,7 +577,7 @@
 	usb_log_debug("Device(%d): Requesting full device descriptor.",
 	    address);
-	got = hcd_send_batch_sync(hcd, target, USB_DIRECTION_IN,
+	ret = hcd_send_batch_sync(hcd, target, USB_DIRECTION_IN,
 	    &desc, sizeof(desc), *(uint64_t *)&get_device_desc,
-	    "read device descriptor");
+	    "read device descriptor", &got);
 	if (ret != EOK) {
 		usb_log_error("Device(%d): Failed to set get dev descriptor: %s",
@@ -749,5 +754,5 @@
     const hw_res_list_parsed_t *hw_res,
     interrupt_handler_t handler,
-    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *hw_res),
+    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *, int *),
     cap_handle_t *handle)
 {
@@ -759,13 +764,14 @@
 	irq_code_t irq_code = {0};
 
-	const int irq = gen_irq_code(&irq_code, hw_res);
-	if (irq < 0) {
+	int irq;
+	int ret = gen_irq_code(&irq_code, hw_res, &irq);
+	if (ret != EOK) {
 		usb_log_error("Failed to generate IRQ code: %s.\n",
-		    str_error(irq));
-		return irq;
+		    str_error(ret));
+		return ret;
 	}
 
 	/* Register handler to avoid interrupt lockup */
-	int ret = register_interrupt_handler(device, irq, handler,
+	ret = register_interrupt_handler(device, irq, handler,
 	    &irq_code, handle);
 	irq_code_clean(&irq_code);
Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision 071a1ddbcc6bb2b9c6f3c1a3acc865f1f23b5fe0)
+++ uspace/lib/usbhost/src/hcd.c	(revision b2a1fd92811bab5d05b74e0c829a43f348315cbc)
@@ -102,13 +102,8 @@
 }
 
-usb_address_t hcd_request_address(hcd_t *hcd, usb_speed_t speed)
-{
-	assert(hcd);
-	usb_address_t address = 0;
-	const int ret = usb_bus_request_address(
-	    &hcd->bus, &address, false, speed);
-	if (ret != EOK)
-		return ret;
-	return address;
+int hcd_request_address(hcd_t *hcd, usb_speed_t speed, usb_address_t *address)
+{
+	assert(hcd);
+	return usb_bus_request_address(&hcd->bus, address, false, speed);
 }
 
@@ -271,7 +266,7 @@
 
 /** this is really ugly version of sync usb communication */
-ssize_t hcd_send_batch_sync(
+int hcd_send_batch_sync(
     hcd_t *hcd, usb_target_t target, usb_direction_t dir,
-    void *data, size_t size, uint64_t setup_data, const char* name)
+    void *data, size_t size, uint64_t setup_data, const char* name, size_t *out_size)
 {
 	assert(hcd);
@@ -289,5 +284,5 @@
 
 	if (sd.ret == EOK)
-		return sd.size;
+		*out_size = sd.size;
 	return sd.ret;
 }
