Index: uspace/drv/ohci/batch.c
===================================================================
--- uspace/drv/ohci/batch.c	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/batch.c	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -100,5 +100,6 @@
  */
 usb_transfer_batch_t * batch_get(ddf_fun_t *fun, endpoint_t *ep,
-    char *buffer, size_t buffer_size, char* setup_buffer, size_t setup_size,
+    char *buffer, size_t buffer_size,
+    const char *setup_buffer, size_t setup_size,
     usbhc_iface_transfer_in_callback_t func_in,
     usbhc_iface_transfer_out_callback_t func_out, void *arg)
@@ -120,5 +121,5 @@
 	    ohci_transfer_batch_dispose);
 
-	hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
+	const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
 	assert(hcd_ep);
 
@@ -129,4 +130,5 @@
 	data->td_count =
 	    ((buffer_size + OHCI_TD_MAX_TRANSFER - 1) / OHCI_TD_MAX_TRANSFER);
+	/* Control transfer need Setup and Status stage */
 	if (ep->transfer_type == USB_TRANSFER_CONTROL) {
 		data->td_count += 2;
@@ -407,6 +409,6 @@
 	char *buffer = instance->data_buffer;
 	while (remain_size > 0) {
-		size_t transfer_size = remain_size > OHCI_TD_MAX_TRANSFER ?
-		    OHCI_TD_MAX_TRANSFER : remain_size;
+		const size_t transfer_size = remain_size > OHCI_TD_MAX_TRANSFER
+		    ? OHCI_TD_MAX_TRANSFER : remain_size;
 
 		td_init(data->tds[td_current], instance->ep->direction,
Index: uspace/drv/ohci/batch.h
===================================================================
--- uspace/drv/ohci/batch.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/batch.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -43,5 +43,5 @@
 usb_transfer_batch_t * batch_get(
     ddf_fun_t *fun, endpoint_t *ep, char *buffer, size_t size,
-    char *setup_buffer, size_t setup_size,
+    const char *setup_buffer, size_t setup_size,
     usbhc_iface_transfer_in_callback_t func_in,
     usbhc_iface_transfer_out_callback_t func_out,
Index: uspace/drv/ohci/endpoint_list.h
===================================================================
--- uspace/drv/ohci/endpoint_list.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/endpoint_list.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -42,6 +42,5 @@
 
 /** Structure maintains both OHCI queue and software list of active endpoints.*/
-typedef struct endpoint_list
-{
+typedef struct endpoint_list {
 	/** Guard against add/remove races */
 	fibril_mutex_t guard;
@@ -69,9 +68,6 @@
 
 int endpoint_list_init(endpoint_list_t *instance, const char *name);
-
 void endpoint_list_set_next(endpoint_list_t *instance, endpoint_list_t *next);
-
 void endpoint_list_add_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep);
-
 void endpoint_list_remove_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep);
 #endif
Index: uspace/drv/ohci/hc.c
===================================================================
--- uspace/drv/ohci/hc.c	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/hc.c	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -51,4 +51,10 @@
 static int hc_init_memory(hc_t *instance);
 /*----------------------------------------------------------------------------*/
+/** Announce OHCI root hub to the DDF
+ *
+ * @param[in] instance OHCI driver intance
+ * @param[in] hub_fun DDF fuction representing OHCI root hub
+ * @return Error code
+ */
 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun)
 {
@@ -95,4 +101,12 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Initialize OHCI hc driver structure
+ *
+ * @param[in] instance Memory place for the structure.
+ * @param[in] regs Address of the memory mapped I/O registers.
+ * @param[in] reg_size Size of the memory mapped area.
+ * @param[in] interrupts True if w interrupts should be used
+ * @return Error code
+ */
 int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts)
 {
@@ -136,4 +150,17 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Create end register endpoint structures
+ *
+ * @param[in] instance OHCI driver structure.
+ * @param[in] address USB address of the device.
+ * @param[in] endpoint USB endpoint number.
+ * @param[in] speed Communication speeed of the device.
+ * @param[in] type Endpoint's transfer type.
+ * @param[in] direction Endpoint's direction.
+ * @param[in] mps Maximum packet size the endpoint accepts.
+ * @param[in] size Maximum allowed buffer size.
+ * @param[in] interval Time between transfers(interrupt transfers only).
+ * @return Error code
+ */
 int hc_add_endpoint(
     hc_t *instance, usb_address_t address, usb_endpoint_t endpoint,
@@ -193,4 +220,12 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Dequeue and delete endpoint structures
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @param[in] address USB address of the device.
+ * @param[in] endpoint USB endpoint number.
+ * @param[in] direction Direction of the endpoint.
+ * @return Error code
+ */
 int hc_remove_endpoint(hc_t *instance, usb_address_t address,
     usb_endpoint_t endpoint, usb_direction_t direction)
@@ -243,4 +278,13 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Get access to endpoint structures
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @param[in] address USB address of the device.
+ * @param[in] endpoint USB endpoint number.
+ * @param[in] direction Direction of the endpoint.
+ * @param[out] bw Reserved bandwidth.
+ * @return Error code
+ */
 endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
     usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw)
@@ -254,4 +298,10 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Add USB transfer to the schedule.
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @param[in] batch Batch representing the transfer.
+ * @return Error code.
+ */
 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch)
 {
@@ -260,5 +310,5 @@
 	assert(batch->ep);
 
-	/* check for root hub communication */
+	/* Check for root hub communication */
 	if (batch->ep->address == instance->rh.address) {
 		return rh_request(&instance->rh, batch);
@@ -268,5 +318,8 @@
 	list_append(&batch->link, &instance->pending_batches);
 	batch_commit(batch);
-	switch (batch->ep->transfer_type) {
+
+	/* Control and bulk schedules need a kick to start working */
+	switch (batch->ep->transfer_type)
+	{
 	case USB_TRANSFER_CONTROL:
 		instance->registers->command_status |= CS_CLF;
@@ -278,9 +331,13 @@
 		break;
 	}
-
 	fibril_mutex_unlock(&instance->guard);
 	return EOK;
 }
 /*----------------------------------------------------------------------------*/
+/** Interrupt handling routine
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @param[in] status Value of the status register at the time of interrupt.
+ */
 void hc_interrupt(hc_t *instance, uint32_t status)
 {
@@ -321,4 +378,9 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Check status register regularly
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @return Error code
+ */
 int interrupt_emulator(hc_t *instance)
 {
@@ -329,9 +391,13 @@
 		instance->registers->interrupt_status = status;
 		hc_interrupt(instance, status);
-		async_usleep(50000);
+		async_usleep(10000);
 	}
 	return EOK;
 }
 /*----------------------------------------------------------------------------*/
+/** Turn off any (BIOS)driver that might be in control of the device.
+ *
+ * @param[in] instance OHCI hc driver structure.
+ */
 void hc_gain_control(hc_t *instance)
 {
@@ -383,4 +449,8 @@
 }
 /*----------------------------------------------------------------------------*/
+/** OHCI hw initialization routine.
+ *
+ * @param[in] instance OHCI hc driver structure.
+ */
 void hc_start_hw(hc_t *instance)
 {
@@ -450,4 +520,9 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Initialize schedule queues
+ *
+ * @param[in] instance OHCI hc driver structure
+ * @return Error code
+ */
 int hc_init_transfer_lists(hc_t *instance)
 {
@@ -465,4 +540,5 @@
 		endpoint_list_fini(&instance->lists[USB_TRANSFER_BULK]); \
 	} \
+	return ret; \
 } while (0)
 
@@ -478,4 +554,9 @@
 }
 /*----------------------------------------------------------------------------*/
+/** Initialize memory structures used by the OHCI hcd.
+ *
+ * @param[in] instance OHCI hc driver structure.
+ * @return Error code.
+ */
 int hc_init_memory(hc_t *instance)
 {
@@ -504,4 +585,5 @@
 	/* Init interrupt code */
 	instance->interrupt_code.cmds = instance->interrupt_commands;
+	instance->interrupt_code.cmdcount = OHCI_NEEDED_IRQ_COMMANDS;
 	{
 		/* Read status register */
@@ -523,5 +605,5 @@
 		instance->interrupt_commands[2].srcarg = 2;
 
-		/* Write clean status register */
+		/* Write-clean status register */
 		instance->interrupt_commands[3].cmd = CMD_MEM_WRITE_A_32;
 		instance->interrupt_commands[3].srcarg = 1;
@@ -531,6 +613,4 @@
 		/* Accept interrupt */
 		instance->interrupt_commands[4].cmd = CMD_ACCEPT;
-
-		instance->interrupt_code.cmdcount = OHCI_NEEDED_IRQ_COMMANDS;
 	}
 
Index: uspace/drv/ohci/hc.h
===================================================================
--- uspace/drv/ohci/hc.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/hc.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -53,17 +53,25 @@
 #define OHCI_NEEDED_IRQ_COMMANDS 5
 
+/** Main OHCI drier structure */
 typedef struct hc {
+	/** USB bus driver, devices and addresses */
+	usb_device_keeper_t manager;
+	/** USB bus driver, endpoints */
+	usb_endpoint_manager_t ep_manager;
+
+	/** Memory mapped I/O registers area */
 	ohci_regs_t *registers;
+	/** Host controller communication area structure */
 	hcca_t *hcca;
 
-	usb_address_t rh_address;
-	rh_t rh;
-
+	/** Transfer schedules */
 	endpoint_list_t lists[4];
+	/** List of active transfers */
 	link_t pending_batches;
 
-	usb_device_keeper_t manager;
-	usb_endpoint_manager_t ep_manager;
+	/** Fibril for periodic checks if interrupts can't be used */
 	fid_t interrupt_emulator;
+
+	/** Guards schedule and endpoint manipulation */
 	fibril_mutex_t guard;
 
@@ -73,10 +81,11 @@
 	/** Commands that form interrupt code */
 	irq_cmd_t interrupt_commands[OHCI_NEEDED_IRQ_COMMANDS];
+
+	/** USB hub emulation structure */
+	rh_t rh;
 } hc_t;
 
 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
-
 int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts);
-
 void hc_start_hw(hc_t *instance);
 
@@ -85,18 +94,16 @@
  * @param[in] instance Host controller structure to use.
  */
-static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
+static inline void hc_fini(hc_t *instance)
+	{ /* TODO: implement*/ };
 
 int hc_add_endpoint(hc_t *instance, usb_address_t address, usb_endpoint_t ep,
     usb_speed_t speed, usb_transfer_type_t type, usb_direction_t direction,
     size_t max_packet_size, size_t size, unsigned interval);
-
 int hc_remove_endpoint(hc_t *instance, usb_address_t address,
     usb_endpoint_t endpoint, usb_direction_t direction);
-
 endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
     usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw);
 
 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
-
 void hc_interrupt(hc_t *instance, uint32_t status);
 
@@ -107,5 +114,5 @@
  */
 static inline hc_t * fun_to_hc(ddf_fun_t *fun)
-	{ return (hc_t*)fun->driver_data; }
+	{ return fun->driver_data; }
 #endif
 /**
Index: uspace/drv/ohci/hcd_endpoint.c
===================================================================
--- uspace/drv/ohci/hcd_endpoint.c	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/hcd_endpoint.c	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -35,4 +35,9 @@
 #include "hcd_endpoint.h"
 
+/** Callback to set toggle on ED.
+ *
+ * @param[in] hcd_ep hcd endpoint structure
+ * @param[in] toggle new value of toggle bit
+ */
 static void hcd_ep_toggle_set(void *hcd_ep, int toggle)
 {
@@ -42,4 +47,10 @@
 	ed_toggle_set(instance->ed, toggle);
 }
+/*----------------------------------------------------------------------------*/
+/** Callback to get value of toggle bit.
+ *
+ * @param[in] hcd_ep hcd endpoint structure
+ * @return Current value of toggle bit.
+ */
 static int hcd_ep_toggle_get(void *hcd_ep)
 {
@@ -49,6 +60,10 @@
 	return ed_toggle_get(instance->ed);
 }
-
-
+/*----------------------------------------------------------------------------*/
+/** Creates new hcd endpoint representation.
+ *
+ * @param[in] ep USBD endpoint structure
+ * @return pointer to a new hcd endpoint structure, NULL on failure.
+ */
 hcd_endpoint_t * hcd_endpoint_assign(endpoint_t *ep)
 {
@@ -78,10 +93,8 @@
 }
 /*----------------------------------------------------------------------------*/
-hcd_endpoint_t * hcd_endpoint_get(endpoint_t *ep)
-{
-	assert(ep);
-	return ep->hc_data.data;
-}
-/*----------------------------------------------------------------------------*/
+/** Disposes assigned hcd endpoint structure
+ *
+ * @param[in] ep USBD endpoint structure
+ */
 void hcd_endpoint_clear(endpoint_t *ep)
 {
Index: uspace/drv/ohci/hcd_endpoint.h
===================================================================
--- uspace/drv/ohci/hcd_endpoint.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/hcd_endpoint.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -42,16 +42,27 @@
 #include "hw_struct/transfer_descriptor.h"
 
-typedef struct hcd_endpoint
-{
+/** Connector structure linking ED to to prepared TD. */
+typedef struct hcd_endpoint {
+	/** OHCI endpoint descriptor */
 	ed_t *ed;
+	/** Currently enqueued transfer descriptor */
 	td_t *td;
+	/** Linked list used by driver software */
 	link_t link;
 } hcd_endpoint_t;
 
 hcd_endpoint_t * hcd_endpoint_assign(endpoint_t *ep);
+void hcd_endpoint_clear(endpoint_t *ep);
 
-hcd_endpoint_t * hcd_endpoint_get(endpoint_t *ep);
+/** Get and convert assigned hcd_endpoint_t structure
+ * @param[in] ep USBD endpoint structure.
+ * @return Pointer to assigned hcd endpoint structure
+ */
+static inline hcd_endpoint_t * hcd_endpoint_get(endpoint_t *ep)
+{
+	assert(ep);
+	return ep->hc_data.data;
+}
 
-void hcd_endpoint_clear(endpoint_t *ep);
 #endif
 /**
Index: uspace/drv/ohci/ohci_regs.h
===================================================================
--- uspace/drv/ohci/ohci_regs.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/ohci/ohci_regs.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -36,6 +36,6 @@
 #include <stdint.h>
 
-typedef struct ohci_regs
-{
+/** OHCI memory mapped registers structure */
+typedef struct ohci_regs {
 	const volatile uint32_t revision;
 	volatile uint32_t control;
Index: uspace/drv/uhci-hcd/batch.c
===================================================================
--- uspace/drv/uhci-hcd/batch.c	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/uhci-hcd/batch.c	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -95,5 +95,6 @@
  */
 usb_transfer_batch_t * batch_get(ddf_fun_t *fun, endpoint_t *ep,
-    char *buffer, size_t buffer_size, char* setup_buffer, size_t setup_size,
+    char *buffer, size_t buffer_size,
+    const char* setup_buffer, size_t setup_size,
     usbhc_iface_transfer_in_callback_t func_in,
     usbhc_iface_transfer_out_callback_t func_out, void *arg)
Index: uspace/drv/uhci-hcd/batch.h
===================================================================
--- uspace/drv/uhci-hcd/batch.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/uhci-hcd/batch.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -45,5 +45,5 @@
 usb_transfer_batch_t * batch_get(
     ddf_fun_t *fun, endpoint_t *ep, char *buffer, size_t size,
-    char *setup_buffer, size_t setup_size,
+    const char *setup_buffer, size_t setup_size,
     usbhc_iface_transfer_in_callback_t func_in,
     usbhc_iface_transfer_out_callback_t func_out,
@@ -55,13 +55,10 @@
 
 void batch_control_write(usb_transfer_batch_t *instance);
-
 void batch_control_read(usb_transfer_batch_t *instance);
 
 void batch_interrupt_in(usb_transfer_batch_t *instance);
-
 void batch_interrupt_out(usb_transfer_batch_t *instance);
 
 void batch_bulk_in(usb_transfer_batch_t *instance);
-
 void batch_bulk_out(usb_transfer_batch_t *instance);
 
Index: uspace/drv/uhci-hcd/hc.c
===================================================================
--- uspace/drv/uhci-hcd/hc.c	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/uhci-hcd/hc.c	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -57,5 +57,5 @@
 static int hc_debug_checker(void *arg);
 /*----------------------------------------------------------------------------*/
-/** Initialize UHCI hcd driver structure
+/** Initialize UHCI hc driver structure
  *
  * @param[in] instance Memory place to initialize.
Index: uspace/drv/uhci-hcd/hc.h
===================================================================
--- uspace/drv/uhci-hcd/hc.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/uhci-hcd/hc.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -95,5 +95,5 @@
 #define UHCI_NEEDED_IRQ_COMMANDS 5
 
-/* Main HC driver structure */
+/** Main UHCI driver structure */
 typedef struct hc {
 	/** USB bus driver, devices and addresses */
Index: uspace/drv/uhci-hcd/transfer_list.h
===================================================================
--- uspace/drv/uhci-hcd/transfer_list.h	(revision 45e0e07ddc94a7298c2609f41b0ca949d0cb7ba9)
+++ uspace/drv/uhci-hcd/transfer_list.h	(revision 02cacce1b7b6eef707192936863e0f9ff6de38f7)
@@ -43,6 +43,5 @@
  * of currently executed transfers
  */
-typedef struct transfer_list
-{
+typedef struct transfer_list {
 	/** Guard against multiple add/remove races */
 	fibril_mutex_t guard;
