Index: uspace/app/virtusbkbd/virtusbkbd.c
===================================================================
--- uspace/app/virtusbkbd/virtusbkbd.c	(revision 0e419571bdba43a9888b077d1994f873314353d3)
+++ uspace/app/virtusbkbd/virtusbkbd.c	(revision d97d209c18bf35b3ed31ea88b0e799993f84e2b8)
@@ -47,4 +47,5 @@
 #include <usb/hcd.h>
 #include <usb/device.h>
+#include <usb/hid.h>
 #include <usbvirt/device.h>
 #include <usbvirt/hub.h>
@@ -70,4 +71,12 @@
 }
 
+static int on_class_request(struct usbvirt_device *dev,
+    usb_device_request_setup_packet_t *request, uint8_t *data)
+{
+	printf("%s: class request (%d)\n", NAME, (int) request->request);
+	
+	return EOK;
+}
+
 static usb_standard_device_descriptor_t std_descriptor = {
 	.length = sizeof(usb_standard_device_descriptor_t),
@@ -85,4 +94,5 @@
  */
 static usbvirt_device_ops_t keyboard_ops = {
+	.on_devreq_class = on_class_request,
 	.on_data = on_incoming_data
 };
Index: uspace/lib/usbvirt/ctrlpipe.c
===================================================================
--- uspace/lib/usbvirt/ctrlpipe.c	(revision 0e419571bdba43a9888b077d1994f873314353d3)
+++ uspace/lib/usbvirt/ctrlpipe.c	(revision d97d209c18bf35b3ed31ea88b0e799993f84e2b8)
@@ -45,10 +45,4 @@
 	((value & GET_MIDBITS_MASK(size, shift)) >> shift)
 
-static usb_direction_t request_get_direction(uint8_t request_type)
-{
-	int bit7 = GET_MIDBITS(request_type, 1, 7);
-	return bit7 ? USB_DIRECTION_IN : USB_DIRECTION_OUT;
-}
-
 static int request_get_type(uint8_t request_type)
 {
@@ -56,46 +50,25 @@
 }
 
-static int request_get_recipient(uint8_t request_type)
-{
-	return GET_MIDBITS(request_type, 5, 0);
-}
 
-
-typedef struct {
-	uint8_t request_type;
-	uint8_t request;
-	uint16_t value;
-	uint16_t index;
-	uint16_t length;
-} __attribute__ ((packed)) devreq_setup_packet_t;
 
 int control_pipe(void *buffer, size_t size)
 {
-	if (size < sizeof(devreq_setup_packet_t)) {
+	if (size < sizeof(usb_device_request_setup_packet_t)) {
 		return ENOMEM;
 	}
 	
-	devreq_setup_packet_t *request = (devreq_setup_packet_t *) buffer;
-	uint8_t *remaining_data = ((uint8_t *) request) + sizeof(devreq_setup_packet_t);
+	usb_device_request_setup_packet_t *request = (usb_device_request_setup_packet_t *) buffer;
+	uint8_t *remaining_data = ((uint8_t *) request) + sizeof(usb_device_request_setup_packet_t);
 	
-	usb_direction_t direction = request_get_direction(request->request_type);
 	int type = request_get_type(request->request_type);
-	int recipient = request_get_recipient(request->request_type);
-	
 	
 	switch (type) {
 		case REQUEST_TYPE_STANDARD:
-			return handle_std_request(direction, recipient,
-			    request->request, request->value,
-			    request->index, request->length,
-			    remaining_data);
+			return handle_std_request(request, remaining_data);
 			break;
 		case REQUEST_TYPE_CLASS:
 			if (DEVICE_HAS_OP(device, on_devreq_class)) {
 				return device->ops->on_devreq_class(device,
-				    direction, recipient,
-				    request->request, request->value,
-				    request->index, request->length,
-				    remaining_data);
+				    request, remaining_data);
 			}
 			break;
Index: uspace/lib/usbvirt/device.h
===================================================================
--- uspace/lib/usbvirt/device.h	(revision 0e419571bdba43a9888b077d1994f873314353d3)
+++ uspace/lib/usbvirt/device.h	(revision d97d209c18bf35b3ed31ea88b0e799993f84e2b8)
@@ -42,12 +42,11 @@
 struct usbvirt_device;
 
-typedef int (*usbvirt_on_devreq_t)(struct usbvirt_device *dev,
-    usb_direction_t, int recipient,
-    uint8_t request, uint16_t value, uint16_t index, uint16_t length,
-    uint8_t *remaining_data);
+typedef int (*usbvirt_on_device_request_t)(struct usbvirt_device *dev,
+	usb_device_request_setup_packet_t *request,
+	uint8_t *data);
 
 typedef struct {
-	usbvirt_on_devreq_t on_devreq_std;
-	usbvirt_on_devreq_t on_devreq_class;
+	usbvirt_on_device_request_t on_devreq_std;
+	usbvirt_on_device_request_t on_devreq_class;
 	int (*on_data)(struct usbvirt_device *dev,
 	    usb_endpoint_t endpoint, void *buffer, size_t size);
Index: uspace/lib/usbvirt/private.h
===================================================================
--- uspace/lib/usbvirt/private.h	(revision 0e419571bdba43a9888b077d1994f873314353d3)
+++ uspace/lib/usbvirt/private.h	(revision d97d209c18bf35b3ed31ea88b0e799993f84e2b8)
@@ -55,7 +55,5 @@
 int control_pipe(void *buffer, size_t size);
 
-int handle_std_request(usb_direction_t direction, int recipient,
-    uint16_t request, uint16_t value, uint16_t index, uint16_t length,
-    uint8_t *remaining_data);
+int handle_std_request(usb_device_request_setup_packet_t *request, uint8_t *data);
 
 #endif
Index: uspace/lib/usbvirt/stdreq.c
===================================================================
--- uspace/lib/usbvirt/stdreq.c	(revision 0e419571bdba43a9888b077d1994f873314353d3)
+++ uspace/lib/usbvirt/stdreq.c	(revision d97d209c18bf35b3ed31ea88b0e799993f84e2b8)
@@ -81,18 +81,18 @@
 }
 
-int handle_std_request(usb_direction_t direction, int recipient,
-    uint16_t request, uint16_t value, uint16_t index, uint16_t length,
-    uint8_t *remaining_data)
+int handle_std_request(usb_device_request_setup_packet_t *request, uint8_t *data)
 {
 	int rc;
 	
-	switch (request) {
+	switch (request->request) {
 		case USB_DEVREQ_GET_DESCRIPTOR:
-			rc = handle_get_descriptor(value >> 8, (uint8_t) value,
-			    index, length);
+			rc = handle_get_descriptor(
+			    request->value_low, request->value_high,
+			    request->index, request->length);
 			break;
 		
 		case USB_DEVREQ_SET_ADDRESS:
-			rc = handle_set_address(value, index, length);
+			rc = handle_set_address(request->value,
+			    request->index, request->length);
 			break;
 		
@@ -108,8 +108,6 @@
 	if (rc == EFORWARD) {
 		if (DEVICE_HAS_OP(device, on_devreq_std)) {
-			return device->ops->on_devreq_std(device, direction,
-			    recipient,
-			    request, value, index,
-			    length, remaining_data);
+			return device->ops->on_devreq_std(device,
+			    request, data);
 		}
 	}
