Index: uspace/lib/usb/include/usb/request.h
===================================================================
--- uspace/lib/usb/include/usb/request.h	(revision 971fbfde42e4f6bf631f39c42a213c00d4fd1719)
+++ uspace/lib/usb/include/usb/request.h	(revision 6326155bdae5f8b5856d725405ed6a588e23d79f)
@@ -37,5 +37,4 @@
 
 #include <sys/types.h>
-#include <usb/usb.h>
 
 /** Standard device request. */
@@ -54,4 +53,19 @@
 	USB_DEVREQ_LAST_STD
 } usb_stddevreq_t;
+
+/** USB device status - device is self powered (opposed to bus powered). */
+#define USB_DEVICE_STATUS_SELF_POWERED ((uint16_t)(1 << 0))
+
+/** USB device status - remote wake-up signaling is enabled. */
+#define USB_DEVICE_STATUS_REMOTE_WAKEUP ((uint16_t)(1 << 1))
+
+/** USB endpoint status - endpoint is halted (stalled). */
+#define USB_ENDPOINT_STATUS_HALTED ((uint16_t)(1 << 0))
+
+/** USB feature selector - endpoint halt (stall). */
+#define USB_FEATURE_SELECTOR_ENDPOINT_HALT (0)
+
+/** USB feature selector - device remote wake-up. */
+#define USB_FEATURE_SELECTOR_REMOTE_WAKEUP (1)
 
 /** Device request setup packet.
@@ -93,4 +107,6 @@
 int assert[(sizeof(usb_device_request_setup_packet_t) == 8) ? 1: -1];
 
+int usb_request_needs_toggle_reset(
+    const usb_device_request_setup_packet_t *request);
 
 #endif
Index: uspace/lib/usb/src/usb.c
===================================================================
--- uspace/lib/usb/src/usb.c	(revision 971fbfde42e4f6bf631f39c42a213c00d4fd1719)
+++ uspace/lib/usb/src/usb.c	(revision 6326155bdae5f8b5856d725405ed6a588e23d79f)
@@ -34,5 +34,8 @@
  */
 #include <usb/usb.h>
+#include <usb/request.h>
+
 #include <errno.h>
+#include <assert.h>
 
 #define ARR_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
@@ -116,4 +119,40 @@
 }
 
+/** Check setup packet data for signs of toggle reset.
+ *
+ * @param[in] requst Setup requst data.
+ * @retval -1 No endpoints need reset.
+ * @retval 0 All endpoints need reset.
+ * @retval >0 Specified endpoint needs reset.
+ */
+int usb_request_needs_toggle_reset(
+    const usb_device_request_setup_packet_t *request)
+{
+	assert(request);
+	switch (request->request)
+	{
+	/* Clear Feature ENPOINT_STALL */
+	case USB_DEVREQ_CLEAR_FEATURE: /*resets only cleared ep */
+		/* 0x2 ( HOST to device | STANDART | TO ENPOINT) */
+		if ((request->request_type == 0x2) &&
+		    (request->value == USB_FEATURE_SELECTOR_ENDPOINT_HALT))
+			return uint16_usb2host(request->index);
+		break;
+	case USB_DEVREQ_SET_CONFIGURATION:
+	case USB_DEVREQ_SET_INTERFACE:
+		/* Recipient must be device, this resets all endpoints,
+		 * In fact there should be no endpoints but EP 0 registered
+		 * as different interfaces use different endpoints,
+		 * unless you're changing configuration or alternative
+		 * interface of an already setup device. */
+		if (!(request->request_type & SETUP_REQUEST_TYPE_DEVICE_TO_HOST))
+			return 0;
+		break;
+	default:
+		break;
+	}
+	return -1;
+}
+
 /**
  * @}
