Index: uspace/drv/uhci-hcd/iface.c
===================================================================
--- uspace/drv/uhci-hcd/iface.c	(revision 6427cf67e61dac03ff95a479691282c98e8bd5f3)
+++ uspace/drv/uhci-hcd/iface.c	(revision 50ba203e98ce570f05993da83249a116cfffceab)
@@ -104,8 +104,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;
 
@@ -119,8 +119,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;
 
@@ -134,8 +134,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;
 
@@ -150,8 +150,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;
 
@@ -166,6 +166,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;
@@ -174,4 +205,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)
@@ -181,56 +228,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;
 
