Index: uspace/lib/usb/src/hcdhubd.c
===================================================================
--- uspace/lib/usb/src/hcdhubd.c	(revision 4d31d588a74050d0044cafb7d565b7761a3b607c)
+++ uspace/lib/usb/src/hcdhubd.c	(revision 0b749a33fb8e4e1a0e9de474a7e504eace67f769)
@@ -34,4 +34,5 @@
  */
 #include <usb/hcdhubd.h>
+#include <usb/devreq.h>
 #include <usbhc_iface.h>
 #include <driver.h>
@@ -55,4 +56,6 @@
 	.interfaces[USBHC_DEV_IFACE] = &usb_interface
 };
+
+static void set_hub_address(usb_hc_device_t *hc, usb_address_t address);
 
 /** Callback when new device is detected and must be handled by this driver.
@@ -98,4 +101,7 @@
 		return EOK;
 	} else {
+		usb_hc_device_t *hc = list_get_instance(hc_list.next, usb_hc_device_t, link);
+		set_hub_address(hc, 5);
+
 		/*
 		 * We are some (probably deeply nested) hub.
@@ -103,6 +109,55 @@
 		 * connected devices.
 		 */
+
 		return ENOTSUP;
 	}
+}
+
+/** Sample usage of usb_hc_async functions.
+ * This function sets hub address using standard SET_ADDRESS request.
+ *
+ * @warning This function shall be removed once you are familiar with
+ * the usb_hc_ API.
+ *
+ * @param hc Host controller the hub belongs to.
+ * @param address New hub address.
+ */
+static void set_hub_address(usb_hc_device_t *hc, usb_address_t address)
+{
+	printf("%s: setting hub address to %d\n", hc->generic->name, address);
+	usb_target_t target = {0, 0};
+	usb_handle_t handle;
+	int rc;
+
+	usb_device_request_setup_packet_t setup_packet = {
+		.request_type = 0,
+		.request = USB_DEVREQ_SET_ADDRESS,
+		.index = 0,
+		.length = 0,
+	};
+	setup_packet.value = address;
+
+	rc = usb_hc_async_control_write_setup(hc, target,
+	    &setup_packet, sizeof(setup_packet), &handle);
+	if (rc != EOK) {
+		return;
+	}
+
+	rc = usb_hc_async_wait_for(handle);
+	if (rc != EOK) {
+		return;
+	}
+
+	rc = usb_hc_async_control_write_status(hc, target, &handle);
+	if (rc != EOK) {
+		return;
+	}
+
+	rc = usb_hc_async_wait_for(handle);
+	if (rc != EOK) {
+		return;
+	}
+
+	printf("%s: hub address changed\n", hc->generic->name);
 }
 
@@ -211,16 +266,4 @@
 
 	/*
-	 * For testing/debugging purposes only.
-	 * Try to send some data to default USB address.
-	 */
-	usb_target_t target = {0, 0};
-	usb_handle_t handle = 0;
-	char *data = (char *) "Hello, World!";
-
-
-	(void)usb_hc_async_interrupt_out(dev, target, data, str_length(data), &handle);
-	(void)usb_hc_async_wait_for(handle);
-
-	/*
 	 * Announce presence of child device.
 	 */
