Index: uspace/drv/uhci-hcd/iface.c
===================================================================
--- uspace/drv/uhci-hcd/iface.c	(revision 83c439ccd5bc176ae6ed6a165dcba2d795f3826d)
+++ uspace/drv/uhci-hcd/iface.c	(revision f4c87aa9e1bd6f52cdf28c377228883774f79768)
@@ -103,8 +103,8 @@
 /*----------------------------------------------------------------------------*/
 static int interrupt_out(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 8;
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_out_callback_t callback, void *arg)
+{
 	dev_speed_t speed = FULL_SPEED;
 
@@ -118,8 +118,8 @@
 /*----------------------------------------------------------------------------*/
 static int interrupt_in(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 4;
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_in_callback_t callback, void *arg)
+{
 	dev_speed_t speed = FULL_SPEED;
 
@@ -133,8 +133,8 @@
 /*----------------------------------------------------------------------------*/
 static int control_write(device_t *dev, usb_target_t target,
+    size_t max_packet_size,
     void *setup_data, size_t setup_size, void *data, size_t size,
     usbhc_iface_transfer_out_callback_t callback, void *arg)
 {
-	size_t max_packet_size = 8;
 	dev_speed_t speed = FULL_SPEED;
 
@@ -149,8 +149,8 @@
 /*----------------------------------------------------------------------------*/
 static int control_read(device_t *dev, usb_target_t target,
+    size_t max_packet_size,
     void *setup_data, size_t setup_size, void *data, size_t size,
     usbhc_iface_transfer_in_callback_t callback, void *arg)
 {
-	size_t max_packet_size = 8;
 	dev_speed_t speed = FULL_SPEED;
 
@@ -165,6 +165,37 @@
 /*----------------------------------------------------------------------------*/
 static int control_write_setup(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_out_callback_t callback, void *arg)
+{
+	dev_speed_t speed = FULL_SPEED;
+
+	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
+	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
+	    max_packet_size, speed, NULL, 0, data, size, NULL, callback, arg);
+	if (!batch)
+		return ENOMEM;
+	batch_control_setup_old(batch);
+	return EOK;
+}
+/*----------------------------------------------------------------------------*/
+static int control_write_data(device_t *dev, usb_target_t target,
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_out_callback_t callback, void *arg)
+{
+	dev_speed_t speed = FULL_SPEED;
+
+	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
+	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
+	    max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
+	if (!batch)
+		return ENOMEM;
+	batch_control_write_data_old(batch);
+	return EOK;
+}
+/*----------------------------------------------------------------------------*/
+static int control_write_status(device_t *dev, usb_target_t target,
+    usbhc_iface_transfer_in_callback_t callback, void *arg)
 {
 	size_t max_packet_size = 8;
@@ -173,4 +204,20 @@
 	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
 	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
+	    max_packet_size, speed, NULL, 0, NULL, 0, callback, NULL, arg);
+	if (!batch)
+		return ENOMEM;
+	batch_control_write_status_old(batch);
+	return EOK;
+}
+/*----------------------------------------------------------------------------*/
+static int control_read_setup(device_t *dev, usb_target_t target,
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_out_callback_t callback, void *arg)
+{
+	dev_speed_t speed = FULL_SPEED;
+
+	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
+	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
 	    max_packet_size, speed, NULL, 0, data, size, NULL, callback, arg);
 	if (!batch)
@@ -180,56 +227,9 @@
 }
 /*----------------------------------------------------------------------------*/
-static int control_write_data(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 8;
-	dev_speed_t speed = FULL_SPEED;
-
-	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
-	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
-	    max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
-	if (!batch)
-		return ENOMEM;
-	batch_control_write_data_old(batch);
-	return EOK;
-}
-/*----------------------------------------------------------------------------*/
-static int control_write_status(device_t *dev, usb_target_t target,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 8;
-	dev_speed_t speed = FULL_SPEED;
-
-	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
-	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
-	    max_packet_size, speed, NULL, 0, NULL, 0, callback, NULL, arg);
-	if (!batch)
-		return ENOMEM;
-	batch_control_write_status_old(batch);
-	return EOK;
-}
-/*----------------------------------------------------------------------------*/
-static int control_read_setup(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 8;
-	dev_speed_t speed = FULL_SPEED;
-
-	usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
-	batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
-	    max_packet_size, speed, NULL, 0, data, size, NULL, callback, arg);
-	if (!batch)
-		return ENOMEM;
-	batch_control_setup_old(batch);
-	return EOK;
-}
-/*----------------------------------------------------------------------------*/
 static int control_read_data(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	size_t max_packet_size = 8;
+    size_t max_packet_size,
+    void *data, size_t size,
+    usbhc_iface_transfer_in_callback_t callback, void *arg)
+{
 	dev_speed_t speed = FULL_SPEED;
 
