Index: uspace/lib/usbhost/include/usb/host/bus.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/bus.h	(revision 0f6b50f8f7c45af4a886d0766e10103b27242002)
+++ uspace/lib/usbhost/include/usb/host/bus.h	(revision 2e5aea1793c59721de23e0320a1e7f8f2aebc260)
@@ -33,5 +33,5 @@
  *
  * The purpose of this structure is to keep information about connected devices
- * and enpoints, manage available bandwidth and the toggle bit flipping.
+ * and endpoints, manage available bandwidth and the toggle bit flipping.
  *
  * The generic implementation is provided for USB 1 and 2 in usb2_bus.c. Some
@@ -53,4 +53,5 @@
 typedef struct bus bus_t;
 typedef struct ddf_fun ddf_fun_t;
+typedef struct usb_transfer_batch usb_transfer_batch_t;
 
 typedef struct device {
@@ -85,4 +86,7 @@
 	int (*release_endpoint)(bus_t *, endpoint_t *);
 	endpoint_t *(*find_endpoint)(bus_t *, usb_target_t, usb_direction_t);
+	void (*destroy_endpoint)(endpoint_t *);			/**< Optional */
+	bool (*endpoint_get_toggle)(endpoint_t *);		/**< Optional */
+	void (*endpoint_set_toggle)(endpoint_t *, bool);	/**< Optional */
 
 	int (*request_address)(bus_t *, usb_address_t*, bool, usb_speed_t);
@@ -93,8 +97,6 @@
 	size_t (*count_bw) (endpoint_t *, size_t);
 
-	/* Endpoint ops, optional (have generic fallback) */
-	void (*destroy_endpoint)(endpoint_t *);
-	bool (*endpoint_get_toggle)(endpoint_t *);
-	void (*endpoint_set_toggle)(endpoint_t *, bool);
+	usb_transfer_batch_t *(*create_batch)(bus_t *, endpoint_t *); /**< Optional */
+	void (*destroy_batch)(usb_transfer_batch_t *);	/**< Optional */
 } bus_ops_t;
 
@@ -135,4 +137,5 @@
 int bus_release_address(bus_t *, usb_address_t);
 
+
 static inline int bus_reserve_default_address(bus_t *bus, usb_speed_t speed) {
 	usb_address_t addr = USB_ADDRESS_DEFAULT;
Index: uspace/lib/usbhost/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 0f6b50f8f7c45af4a886d0766e10103b27242002)
+++ uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 2e5aea1793c59721de23e0320a1e7f8f2aebc260)
@@ -48,4 +48,5 @@
 typedef struct bus bus_t;
 typedef struct device device_t;
+typedef struct usb_transfer_batch usb_transfer_batch_t;
 
 /** Host controller side endpoint structure. */
Index: uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 0f6b50f8f7c45af4a886d0766e10103b27242002)
+++ uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 2e5aea1793c59721de23e0320a1e7f8f2aebc260)
@@ -37,8 +37,7 @@
 #define LIBUSBHOST_HOST_USB_TRANSFER_BATCH_H
 
-#include <usb/host/endpoint.h>
 #include <usb/usb.h>
+#include <usb/request.h>
 
-#include <assert.h>
 #include <stddef.h>
 #include <stdint.h>
@@ -47,36 +46,44 @@
 #define USB_SETUP_PACKET_SIZE 8
 
+typedef struct endpoint endpoint_t;
+typedef struct bus bus_t;
+typedef struct usb_transfer_batch usb_transfer_batch_t;
+
+/** Callback to be called on transfer. */
+typedef int (*usb_transfer_batch_callback_t)(usb_transfer_batch_t *);
+
 /** Structure stores additional data needed for communication with EP */
 typedef struct usb_transfer_batch {
 	/** Endpoint used for communication */
 	endpoint_t *ep;
-	/** Function called on completion (IN version) */
-	usbhc_iface_transfer_in_callback_t callback_in;
-	/** Function called on completion (OUT version) */
-	usbhc_iface_transfer_out_callback_t callback_out;
-	/** Argument to pass to the completion function */
-	void *arg;
+	/** Size reported to be sent */
+	size_t expected_size;
+
+	/** Direction of the transfer */
+	usb_direction_t dir;
+
+	/** Function called on completion */
+	usb_transfer_batch_callback_t on_complete;
+	/** Arbitrary data for the handler */
+	void *on_complete_data;
+
+	/** Place to store SETUP data needed by control transfers */
+	union {
+		char buffer [USB_SETUP_PACKET_SIZE];
+		usb_device_request_setup_packet_t packet;
+		uint64_t packed;
+	} setup;
+
+	/** Resetting the Toggle */
+	toggle_reset_mode_t toggle_reset_mode;
+
 	/** Place for data to send/receive */
 	char *buffer;
 	/** Size of memory pointed to by buffer member */
 	size_t buffer_size;
-	/** Place to store SETUP data needed by control transfers */
-	char setup_buffer[USB_SETUP_PACKET_SIZE];
-	/** Used portion of setup_buffer member
-	 *
-	 * SETUP buffer must be 8 bytes for control transfers and is left
-	 * unused for all other transfers. Thus, this field is either 0 or 8.
-	 */
-	size_t setup_size;
 
-	/** Actually used portion of the buffer
-	 * This member is never accessed by functions provided in this header,
-	 * with the exception of usb_transfer_batch_finish. For external use.
-	 */
+	/** Actually used portion of the buffer */
 	size_t transfered_size;
-	/** Indicates success/failure of the communication
-	 * This member is never accessed by functions provided in this header,
-	 * with the exception of usb_transfer_batch_finish. For external use.
-	 */
+	/** Indicates success/failure of the communication */
 	int error;
 } usb_transfer_batch_t;
@@ -95,56 +102,15 @@
 	(batch).buffer_size, (batch).ep->max_packet_size
 
+void usb_transfer_batch_init(usb_transfer_batch_t *, endpoint_t *);
+void usb_transfer_batch_finish(usb_transfer_batch_t *);
 
-usb_transfer_batch_t * usb_transfer_batch_create(
-    endpoint_t *ep,
-    char *buffer,
-    size_t buffer_size,
-    uint64_t setup_buffer,
-    usbhc_iface_transfer_in_callback_t func_in,
-    usbhc_iface_transfer_out_callback_t func_out,
-    void *arg
-);
-void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance);
+usb_transfer_batch_t *usb_transfer_batch_create(endpoint_t *);
+void usb_transfer_batch_destroy(usb_transfer_batch_t *);
 
-void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance,
-    const void* data, size_t size, int error);
-
-/** Finish batch using stored error value and transferred size.
- *
- * @param[in] instance Batch structure to use.
- * @param[in] data Data to copy to the output buffer.
+/** Provided to ease the transition. Wraps old-style handlers into a new one.
  */
-static inline void usb_transfer_batch_finish(
-    const usb_transfer_batch_t *instance, const void* data)
-{
-	assert(instance);
-	usb_transfer_batch_finish_error(
-	    instance, data, instance->transfered_size, instance->error);
-}
-
-/** Determine batch direction based on the callbacks present
- * @param[in] instance Batch structure to use, non-null.
- * @return USB_DIRECTION_IN, or USB_DIRECTION_OUT.
- */
-static inline usb_direction_t usb_transfer_batch_direction(
-    const usb_transfer_batch_t *instance)
-{
-	assert(instance);
-	if (instance->callback_in) {
-		assert(instance->callback_out == NULL);
-		assert(instance->ep == NULL
-		    || instance->ep->transfer_type == USB_TRANSFER_CONTROL
-		    || instance->ep->direction == USB_DIRECTION_IN);
-		return USB_DIRECTION_IN;
-	}
-	if (instance->callback_out) {
-		assert(instance->callback_in == NULL);
-		assert(instance->ep == NULL
-		    || instance->ep->transfer_type == USB_TRANSFER_CONTROL
-		    || instance->ep->direction == USB_DIRECTION_OUT);
-		return USB_DIRECTION_OUT;
-	}
-	assert(false);
-}
+extern void usb_transfer_batch_set_old_handlers(usb_transfer_batch_t *,
+	usbhc_iface_transfer_in_callback_t,
+	usbhc_iface_transfer_out_callback_t, void *);
 
 #endif
