Index: uspace/lib/usbvirt/device.h
===================================================================
--- uspace/lib/usbvirt/device.h	(revision 73301a04b2f378b64dab507cd0acf088ce3fc9c3)
+++ uspace/lib/usbvirt/device.h	(revision 47e3a8e044a8e6b9decaf6c981da8d4cc6ece6c6)
@@ -106,5 +106,14 @@
 } usbvirt_descriptors_t;
 
+/** Possible states of virtual USB device.
+ * Notice that these are not 1:1 mappings to those in USB specification.
+ */
+typedef enum {
+	USBVIRT_STATE_DEFAULT,
+	USBVIRT_STATE_ADDRESS,
+	USBVIRT_STATE_CONFIGURED
+} usbvirt_device_state_t;
 
+/** Virtual USB device. */
 typedef struct usbvirt_device {
 	/** Callback device operations. */
@@ -126,4 +135,8 @@
 	usbvirt_descriptors_t *descriptors;
 	
+	/** Current device state. */
+	usbvirt_device_state_t state;
+	/** Device address. */
+	usb_address_t address;
 	
 	/* Private attributes. */
Index: uspace/lib/usbvirt/main.c
===================================================================
--- uspace/lib/usbvirt/main.c	(revision 73301a04b2f378b64dab507cd0acf088ce3fc9c3)
+++ uspace/lib/usbvirt/main.c	(revision 47e3a8e044a8e6b9decaf6c981da8d4cc6ece6c6)
@@ -50,5 +50,11 @@
 static void handle_data_to_device(ipc_callid_t iid, ipc_call_t icall)
 {
-	usb_endpoint_t endpoint = IPC_GET_ARG1(icall);
+	usb_address_t address = IPC_GET_ARG1(icall);
+	usb_endpoint_t endpoint = IPC_GET_ARG2(icall);
+	
+	if (address != device->address) {
+		ipc_answer_0(iid, EADDRNOTAVAIL);
+		return;
+	}
 	
 	size_t len;
@@ -95,4 +101,11 @@
 }
 
+static void device_init(usbvirt_device_t *dev)
+{
+	dev->send_data = usbvirt_data_to_host;
+	dev->state = USBVIRT_STATE_DEFAULT;
+	dev->address = 0;
+}
+
 int usbvirt_data_to_host(struct usbvirt_device *dev,
     usb_endpoint_t endpoint, void *buffer, size_t size)
@@ -112,6 +125,7 @@
 	int rc;
 	
-	req = async_send_1(phone,
+	req = async_send_2(phone,
 	    IPC_M_USBVIRT_DATA_FROM_DEVICE,
+	    dev->address,
 	    endpoint,
 	    &answer_data);
@@ -174,5 +188,5 @@
 	
 	dev->vhcd_phone_ = hcd_phone;
-	dev->send_data = usbvirt_data_to_host;
+	device_init(dev);
 	
 	device = dev;
Index: uspace/lib/usbvirt/stdreq.c
===================================================================
--- uspace/lib/usbvirt/stdreq.c	(revision 73301a04b2f378b64dab507cd0acf088ce3fc9c3)
+++ uspace/lib/usbvirt/stdreq.c	(revision 47e3a8e044a8e6b9decaf6c981da8d4cc6ece6c6)
@@ -118,6 +118,15 @@
 	
 	/*
-	 * TODO: inform the HC that device has new address assigned.
+	 * TODO: handle when this request is invalid (e.g.
+	 * setting address when in configured state).
 	 */
+	if (new_address == 0) {
+		device->state = USBVIRT_STATE_DEFAULT;
+	} else {
+		device->state = USBVIRT_STATE_ADDRESS;
+	}
+	
+	device->address = new_address;
+	
 	return EOK;
 }
