Index: uspace/lib/usbhost/src/bandwidth.c
===================================================================
--- uspace/lib/usbhost/src/bandwidth.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/bandwidth.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -42,5 +42,6 @@
 #include "bandwidth.h"
 
-/** Calculate bandwidth that needs to be reserved for communication with EP.
+/**
+ * Calculate bandwidth that needs to be reserved for communication with EP.
  * Calculation follows USB 1.1 specification.
  * @param ep Registered endpoint
@@ -95,5 +96,6 @@
 }
 
-/** Calculate bandwidth that needs to be reserved for communication with EP.
+/** 
+ * Calculate bandwidth that needs to be reserved for communication with EP.
  * Calculation follows USB 2.0 specification, chapter 5.11.3.
  *
Index: uspace/lib/usbhost/src/bus.c
===================================================================
--- uspace/lib/usbhost/src/bus.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/bus.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -32,4 +32,9 @@
 /** @file
  *
+ * The Bus is a structure that serves as an interface of the HC driver
+ * implementation for the usbhost library. Every HC driver that uses libusbhost
+ * must use a bus_t (or its child), fill it with bus_ops and present it to the
+ * library. The library then handles the DDF interface and translates it to the
+ * bus callbacks.
  */
 
@@ -44,5 +49,5 @@
 
 /**
- * Initializes the bus structure.
+ * Initializes the base bus structure.
  */
 void bus_init(bus_t *bus, size_t device_size)
@@ -57,4 +62,7 @@
 }
 
+/**
+ * Initialize the device_t structure belonging to a bus.
+ */
 int bus_device_init(device_t *dev, bus_t *bus)
 {
@@ -72,4 +80,7 @@
 }
 
+/**
+ * Create a name of the ddf function node.
+ */
 int bus_device_set_default_name(device_t *dev)
 {
@@ -84,4 +95,7 @@
 }
 
+/**
+ * Invoke the device_enumerate bus operation.
+ */
 int bus_device_enumerate(device_t *dev)
 {
@@ -95,4 +109,7 @@
 }
 
+/**
+ * Invoke the device_remove bus operation.
+ */
 int bus_device_remove(device_t *dev)
 {
@@ -106,4 +123,7 @@
 }
 
+/**
+ * Invoke the device_online bus operation.
+ */
 int bus_device_online(device_t *dev)
 {
@@ -117,4 +137,7 @@
 }
 
+/**
+ * Invoke the device_offline bus operation.
+ */
 int bus_device_offline(device_t *dev)
 {
@@ -128,4 +151,11 @@
 }
 
+/**
+ * Create and register new endpoint to the bus.
+ *
+ * @param[in] device The device of which the endpoint shall be created
+ * @param[in] desc Endpoint descriptors as reported by the device
+ * @param[out] out_ep The resulting new endpoint reference, if any. Can be NULL.
+ */
 int bus_endpoint_add(device_t *device, const usb_endpoint_descriptors_t *desc, endpoint_t **out_ep)
 {
@@ -135,12 +165,20 @@
 	bus_t *bus = device->bus;
 
+	const bus_ops_t *register_ops = BUS_OPS_LOOKUP(bus->ops, endpoint_register);
+	if (!register_ops)
+		return ENOTSUP;
+
 	const bus_ops_t *create_ops = BUS_OPS_LOOKUP(bus->ops, endpoint_create);
-	const bus_ops_t *register_ops = BUS_OPS_LOOKUP(bus->ops, endpoint_register);
-	if (!create_ops || !register_ops)
-		return ENOTSUP;
-
-	endpoint_t *ep = create_ops->endpoint_create(device, desc);
-	if (!ep)
-		return ENOMEM;
+	endpoint_t *ep;
+	if (create_ops) {
+		ep = create_ops->endpoint_create(device, desc);
+		if (!ep)
+			return ENOMEM;
+	} else {
+		ep = calloc(1, sizeof(endpoint_t));
+		if (!ep)
+			return ENOMEM;
+		endpoint_init(ep, device, desc);
+	}
 
 	/* Bus reference */
@@ -186,5 +224,6 @@
 }
 
-/** Searches for an endpoint. Returns a reference.
+/**
+ * Search for an endpoint. Returns a reference.
  */
 endpoint_t *bus_find_endpoint(device_t *device, usb_endpoint_t endpoint)
@@ -204,4 +243,7 @@
 }
 
+/**
+ * Remove an endpoint from the device. Consumes a reference.
+ */
 int bus_endpoint_remove(endpoint_t *ep)
 {
@@ -233,7 +275,16 @@
 	endpoint_del_ref(ep);
 
+	/* Given reference */
+	endpoint_del_ref(ep);
+
 	return EOK;
 }
 
+/**
+ * Reserve the default address on the bus. Also, report the speed of the device
+ * that is listening on the default address.
+ *
+ * The speed is then used for devices enumerated while the address is reserved.
+ */
 int bus_reserve_default_address(bus_t *bus, usb_speed_t speed)
 {
@@ -251,4 +302,7 @@
 }
 
+/**
+ * Release the default address.
+ */
 void bus_release_default_address(bus_t *bus)
 {
@@ -257,10 +311,15 @@
 }
 
-/** Prepare generic usb_transfer_batch and schedule it.
+/**
+ * Initiate a transfer on the bus. Finds the target endpoint, creates
+ * a transfer batch and schedules it.
+ *
  * @param device Device for which to send the batch
- * @param target address and endpoint number.
- * @param setup_data Data to use in setup stage (Control communication type)
- * @param in Callback for device to host communication.
- * @param out Callback for host to device communication.
+ * @param target The target of the transfer.
+ * @param direction A direction of the transfer.
+ * @param data A pointer to the data buffer.
+ * @param size Size of the data buffer.
+ * @param setup_data Data to use in the setup stage (Control communication type)
+ * @param on_complete Callback which is called after the batch is complete
  * @param arg Callback parameter.
  * @param name Communication identifier (for nicer output).
@@ -301,4 +360,7 @@
 } sync_data_t;
 
+/**
+ * Callback for finishing the transfer. Wake the issuing thread.
+ */
 static int sync_transfer_complete(void *arg, int error, size_t transfered_size)
 {
@@ -314,4 +376,15 @@
 }
 
+/**
+ * Issue a transfer on the bus, wait for result.
+ *
+ * @param device Device for which to send the batch
+ * @param target The target of the transfer.
+ * @param direction A direction of the transfer.
+ * @param data A pointer to the data buffer.
+ * @param size Size of the data buffer.
+ * @param setup_data Data to use in the setup stage (Control communication type)
+ * @param name Communication identifier (for nicer output).
+ */
 ssize_t bus_device_send_batch_sync(device_t *device, usb_target_t target,
     usb_direction_t direction, char *data, size_t size, uint64_t setup_data,
@@ -330,7 +403,5 @@
 	fibril_mutex_lock(&sd.done_mtx);
 	while (!sd.done) {
-		fibril_condvar_wait_timeout(&sd.done_cv, &sd.done_mtx, 3000000);
-		if (!sd.done)
-			usb_log_debug2("Still waiting...");
+		fibril_condvar_wait(&sd.done_cv, &sd.done_mtx);
 	}
 	fibril_mutex_unlock(&sd.done_mtx);
Index: uspace/lib/usbhost/src/ddf_helpers.c
===================================================================
--- uspace/lib/usbhost/src/ddf_helpers.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/ddf_helpers.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -31,5 +31,5 @@
  */
 /** @file
- *
+ * Helpers to work with the DDF interface.
  */
 
@@ -59,9 +59,11 @@
 
 
-/* DDF INTERFACE */
-
-/** Register endpoint interface function.
- * @param fun DDF function.
- * @param endpoint_desc Endpoint description.
+/**
+ * DDF usbhc_iface callback. Passes the endpoint descriptors, fills the pipe
+ * descriptor according to the contents of the endpoint.
+ *
+ * @param[in] fun DDF function of the device in question.
+ * @param[out] pipe_desc The pipe descriptor to be filled.
+ * @param[in] endpoint_desc Endpoint descriptors from the device.
  * @return Error code.
  */
@@ -92,10 +94,13 @@
 }
 
- /** Unregister endpoint interface function.
-  * @param fun DDF function.
-  * @param endpoint_desc Endpoint description.
+ /**
+  * DDF usbhc_iface callback. Unregister endpoint that makes the other end of
+  * the pipe described.
+  *
+  * @param fun DDF function of the device in question.
+  * @param pipe_desc Pipe description.
   * @return Error code.
   */
-static int unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *endpoint_desc)
+static int unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *pipe_desc)
 {
 	assert(fun);
@@ -106,5 +111,5 @@
 	assert(dev);
 
-	endpoint_t *ep = bus_find_endpoint(dev, endpoint_desc->endpoint_no);
+	endpoint_t *ep = bus_find_endpoint(dev, pipe_desc->endpoint_no);
 	if (!ep)
 		return ENOENT;
@@ -113,4 +118,10 @@
 }
 
+/**
+ * DDF usbhc_iface callback. Calls the bus operation directly.
+ *
+ * @param fun DDF function of the device (hub) requesting the address.
+ * @param speed An USB speed of the device for which the address is reserved.
+ */
 static int reserve_default_address(ddf_fun_t *fun, usb_speed_t speed)
 {
@@ -127,4 +138,9 @@
 }
 
+/**
+ * DDF usbhc_iface callback. Calls the bus operation directly.
+ *
+ * @param fun DDF function of the device (hub) releasing the address.
+ */
 static int release_default_address(ddf_fun_t *fun)
 {
@@ -142,4 +158,9 @@
 }
 
+/**
+ * DDF usbhc_iface callback. Calls the bus operation directly.
+ *
+ * @param fun DDF function of the device (hub) requesting the address.
+ */
 static int device_enumerate(ddf_fun_t *fun, unsigned port)
 {
Index: uspace/lib/usbhost/src/dma_buffer.c
===================================================================
--- uspace/lib/usbhost/src/dma_buffer.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/dma_buffer.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -45,5 +45,6 @@
 };
 
-/** Allocate a DMA buffer.
+/**
+ * Allocate a DMA buffer.
  *
  * @param[in] db dma_buffer_t structure to fill
@@ -80,5 +81,6 @@
 }
 
-/** Allocate a DMA buffer using the default policy.
+/**
+ * Allocate a DMA buffer using the default policy.
  *
  * @param[in] db dma_buffer_t structure to fill
@@ -92,5 +94,6 @@
 
 
-/** Free a DMA buffer.
+/**
+ * Free a DMA buffer.
  *
  * @param[in] db dma_buffer_t structure buffer of which will be freed
@@ -105,5 +108,6 @@
 }
 
-/** Convert a pointer inside a buffer to physical address.
+/**
+ * Convert a pointer inside a buffer to physical address.
  *
  * @param[in] db Buffer at which virt is pointing
Index: uspace/lib/usbhost/src/endpoint.c
===================================================================
--- uspace/lib/usbhost/src/endpoint.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/endpoint.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -49,5 +49,6 @@
 #include "endpoint.h"
 
-/** Initialize provided endpoint structure.
+/**
+ * Initialize provided endpoint structure.
  */
 void endpoint_init(endpoint_t *ep, device_t *dev, const usb_endpoint_descriptors_t *desc)
@@ -78,4 +79,7 @@
 }
 
+/**
+ * Get the bus endpoint belongs to.
+ */
 static inline const bus_ops_t *get_bus_ops(endpoint_t *ep)
 {
@@ -83,4 +87,7 @@
 }
 
+/**
+ * Increase the reference count on endpoint.
+ */
 void endpoint_add_ref(endpoint_t *ep)
 {
@@ -88,4 +95,7 @@
 }
 
+/**
+ * Call the desctruction callback. Default behavior is to free the memory directly.
+ */
 static inline void endpoint_destroy(endpoint_t *ep)
 {
@@ -101,4 +111,7 @@
 }
 
+/**
+ * Decrease the reference count.
+ */
 void endpoint_del_ref(endpoint_t *ep)
 {
@@ -110,6 +123,13 @@
 static void endpoint_toggle_reset(endpoint_t *ep, toggle_reset_mode_t mode);
 
-/** Mark the endpoint as active and block access for further fibrils.
+/**
+ * Mark the endpoint as active and block access for further fibrils. If the
+ * endpoint is already active, it will block on ep->avail condvar.
+ *
+ * Call only under endpoint guard. After you activate the endpoint and release
+ * the guard, you must assume that particular transfer is already finished/aborted.
+ *
  * @param ep endpoint_t structure.
+ * @param batch Transfer batch this endpoint is bocked by.
  */
 void endpoint_activate_locked(endpoint_t *ep, usb_transfer_batch_t *batch)
@@ -125,5 +145,7 @@
 }
 
-/** Mark the endpoint as inactive and allow access for further fibrils.
+/**
+ * Mark the endpoint as inactive and allow access for further fibrils.
+ *
  * @param ep endpoint_t structure.
  */
@@ -140,5 +162,6 @@
 }
 
-/** Abort an active batch on endpoint, if any.
+/**
+ * Abort an active batch on endpoint, if any.
  *
  * @param[in] ep endpoint_t structure.
@@ -157,4 +180,11 @@
 }
 
+/**
+ * The transfer on an endpoint can trigger a reset of the toggle bit. This
+ * function calls the respective bus callbacks to resolve it.
+ *
+ * @param ep The endpoint that triggered the reset
+ * @param mode Whether to reset no, one or all endpoints on a device.
+ */
 static void endpoint_toggle_reset(endpoint_t *ep, toggle_reset_mode_t mode)
 {
@@ -168,7 +198,7 @@
 		return;
 
-	device_t *dev = ep->device;
 
 	if (mode == RESET_ALL) {
+		const device_t *dev = ep->device;
 		for (usb_endpoint_t i = 0; i < USB_ENDPOINT_MAX; ++i) {
 			if (dev->endpoints[i])
@@ -180,5 +210,11 @@
 }
 
-ssize_t endpoint_count_bw(endpoint_t *ep, size_t packet_size)
+/**
+ * Call the bus operation to count bandwidth.
+ *
+ * @param ep Endpoint on which the transfer will take place.
+ * @param size The payload size.
+ */
+ssize_t endpoint_count_bw(endpoint_t *ep, size_t size)
 {
 	assert(ep);
@@ -188,16 +224,20 @@
 		return 0;
 
-	return ops->endpoint_count_bw(ep, packet_size);
-}
-
-/** Prepare generic usb_transfer_batch and schedule it.
- * @param ep Endpoint for which the batch shall be created.
- * @param target address and endpoint number.
- * @param setup_data Data to use in setup stage (Control communication type)
- * @param in Callback for device to host communication.
- * @param out Callback for host to device communication.
+	return ops->endpoint_count_bw(ep, size);
+}
+
+/**
+ * Initiate a transfer on an endpoint. Creates a transfer batch, checks the
+ * bandwidth requirements and schedules the batch.
+ *
+ * @param endpoint Endpoint for which to send the batch
+ * @param target The target of the transfer.
+ * @param direction A direction of the transfer.
+ * @param data A pointer to the data buffer.
+ * @param size Size of the data buffer.
+ * @param setup_data Data to use in the setup stage (Control communication type)
+ * @param on_complete Callback which is called after the batch is complete
  * @param arg Callback parameter.
  * @param name Communication identifier (for nicer output).
- * @return Error code.
  */
 int endpoint_send_batch(endpoint_t *ep, usb_target_t target,
Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/hcd.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -32,4 +32,6 @@
 /** @file
  *
+ * Host controller driver framework. Encapsulates DDF device of HC to an
+ * hc_device_t, which is passed to driver implementing hc_driver_t.
  */
 
@@ -68,4 +70,7 @@
 static const hc_driver_t *hc_driver;
 
+/**
+ * The main HC driver routine.
+ */
 int hc_driver_main(const hc_driver_t *driver)
 {
@@ -81,9 +86,12 @@
 }
 
-/** IRQ handling callback, forward status from call to diver structure.
- *
- * @param[in] dev DDF instance of the device to use.
- * @param[in] iid (Unused).
- * @param[in] call Pointer to the call from kernel.
+/**
+ * IRQ handling callback. Call the bus operation.
+ *
+ * Currently, there is a bus ops lookup to find the interrupt handler. So far,
+ * the mechanism is too flexible, as it allows different instances of HC to
+ * have different IRQ handlers, disallowing us to optimize the lookup here.
+ * TODO: Make the bus mechanism less flexible in irq handling and remove the
+ * lookup.
  */
 static void irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev)
@@ -99,5 +107,6 @@
 }
 
-/** Worker for the HW interrupt replacement fibril.
+/**
+ * Worker for the HW interrupt replacement fibril.
  */
 static int interrupt_polling(void *arg)
@@ -123,4 +132,7 @@
 }
 
+/**
+ * Clean the IRQ code bottom-half.
+ */
 static inline void irq_code_clean(irq_code_t *code)
 {
@@ -135,11 +147,12 @@
 }
 
-/** Register interrupt handler
- *
- * @param[in] device Host controller DDF device
- * @param[in] regs Register range
- * @param[in] irq Interrupt number
- * @paran[in] handler Interrupt handler
- * @param[in] gen_irq_code IRQ code generator.
+/**
+ * Register an interrupt handler. If there is a callback to setup the bottom half,
+ * invoke it and register it. Register for notifications.
+ *
+ * If this method fails, a polling fibril is started instead.
+ *
+ * @param[in] hcd Host controller device.
+ * @param[in] hw_res Resources to be used.
  *
  * @return IRQ capability handle on success.
@@ -181,8 +194,6 @@
 }
 
-/** Initialize HC in memory of the driver.
- *
- * @param device DDF instance of the device to use
- * @return Error code
+/**
+ * Initialize HC in memory of the driver.
  *
  * This function does all the preparatory work for hc and rh drivers:
@@ -192,4 +203,7 @@
  *  - calls driver specific initialization
  *  - registers root hub
+ *
+ * @param device DDF instance of the device to use
+ * @return Error code
  */
 int hc_dev_add(ddf_dev_t *device)
Index: uspace/lib/usbhost/src/usb2_bus.c
===================================================================
--- uspace/lib/usbhost/src/usb2_bus.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/usb2_bus.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -31,5 +31,7 @@
  */
 /** @file
- * HC Endpoint management.
+ *
+ * A bus_t implementation for USB 2 and lower. Implements USB 2 enumeration and
+ * configurable bandwidth counting.
  */
 
@@ -50,5 +52,7 @@
 #include "usb2_bus.h"
 
-/** Ops receive generic bus_t pointer. */
+/**
+ * Ops receive generic bus_t pointer.
+ */
 static inline usb2_bus_t *bus_to_usb2_bus(bus_t *bus_base)
 {
@@ -57,26 +61,12 @@
 }
 
-/** Unregister and destroy all endpoints using given address.
- * @param bus usb_bus structure, non-null.
- * @param address USB address.
- * @param endpoint USB endpoint number.
- * @param direction Communication direction.
- * @return Error code.
- */
-static int release_address(usb2_bus_t *bus, usb_address_t address)
-{
-	if (!usb_address_is_valid(address))
-		return EINVAL;
-
-	const int ret = bus->address_occupied[address] ? EOK : ENOENT;
-	bus->address_occupied[address] = false;
-	return ret;
-}
-
-/** Request USB address.
+/**
+ * Request a new address. A free address is found and marked as occupied.
+ *
+ * There's no need to synchronize this method, because it is called only with
+ * default address reserved.
+ *
  * @param bus usb_device_manager
  * @param addr Pointer to requested address value, place to store new address
- * @return Error code.
- * @note Default address is only available in strict mode.
  */
 static int request_address(usb2_bus_t *bus, usb_address_t *addr)
@@ -99,4 +89,12 @@
 }
 
+/**
+ * Mark address as free.
+ */
+static void release_address(usb2_bus_t *bus, usb_address_t address)
+{
+	bus->address_occupied[address] = false;
+}
+
 static const usb_target_t usb2_default_target = {{
 	.address = USB_ADDRESS_DEFAULT,
@@ -104,4 +102,10 @@
 }};
 
+/**
+ * Transition the device to the addressed state.
+ *
+ * Reserve address, configure the control EP, issue a SET_ADDRESS command.
+ * Configure the device with the new address, mark the device as online.
+ */
 static int address_device(device_t *dev)
 {
@@ -184,5 +188,7 @@
 }
 
-/** Enumerate a new USB device
+/**
+ * Enumerate a USB device. Move it to the addressed state, then explore it
+ * to create a DDF function node with proper characteristics.
  */
 static int usb2_bus_device_enumerate(device_t *dev)
@@ -223,17 +229,6 @@
 }
 
-static endpoint_t *usb2_bus_create_ep(device_t *dev, const usb_endpoint_descriptors_t *desc)
-{
-	endpoint_t *ep = malloc(sizeof(endpoint_t));
-	if (!ep)
-		return NULL;
-
-	endpoint_init(ep, dev, desc);
-	return ep;
-}
-
-/** Register an endpoint to the bus. Reserves bandwidth.
- * @param bus usb_bus structure, non-null.
- * @param endpoint USB endpoint number.
+/**
+ * Register an endpoint to the bus. Reserves bandwidth.
  */
 static int usb2_bus_register_ep(endpoint_t *ep)
@@ -252,5 +247,6 @@
 }
 
-/** Release bandwidth reserved by the given endpoint.
+/**
+ * Release bandwidth reserved by the given endpoint.
  */
 static int usb2_bus_unregister_ep(endpoint_t *ep)
@@ -266,5 +262,4 @@
 const bus_ops_t usb2_bus_ops = {
 	.device_enumerate = usb2_bus_device_enumerate,
-	.endpoint_create = usb2_bus_create_ep,
 	.endpoint_register = usb2_bus_register_ep,
 	.endpoint_unregister = usb2_bus_unregister_ep,
@@ -275,6 +270,4 @@
  * @param bus usb_bus structure, non-null.
  * @param available_bandwidth Size of the bandwidth pool.
- * @param bw_count function to use to calculate endpoint bw requirements.
- * @return Error code.
  */
 void usb2_bus_init(usb2_bus_t *bus, size_t available_bandwidth)
@@ -287,4 +280,5 @@
 	bus->free_bw = available_bandwidth;
 }
+
 /**
  * @}
Index: uspace/lib/usbhost/src/usb_transfer_batch.c
===================================================================
--- uspace/lib/usbhost/src/usb_transfer_batch.c	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/src/usb_transfer_batch.c	(revision 1102eca56d6f6100e87aeb0fd1d28fa6dac503bc)
@@ -44,5 +44,8 @@
 #include "usb_transfer_batch.h"
 
-/** Create a batch on given endpoint.
+/**
+ * Create a batch on a given endpoint.
+ *
+ * If the bus callback is not defined, it just creates a default batch.
  */
 usb_transfer_batch_t *usb_transfer_batch_create(endpoint_t *ep)
@@ -55,4 +58,6 @@
 	if (!ops) {
 		usb_transfer_batch_t *batch = calloc(1, sizeof(usb_transfer_batch_t));
+		if (!batch)
+			return NULL;
 		usb_transfer_batch_init(batch, ep);
 		return batch;
@@ -62,16 +67,17 @@
 }
 
-/** Initialize given batch structure.
+/**
+ * Initialize given batch structure.
  */
 void usb_transfer_batch_init(usb_transfer_batch_t *batch, endpoint_t *ep)
 {
 	assert(ep);
+	/* Batch reference */
 	endpoint_add_ref(ep);
 	batch->ep = ep;
 }
 
-/** Destroy the batch.
- *
- * @param[in] batch Batch structure to use.
+/**
+ * Destroy the batch. If there's no bus callback, just free it.
  */
 void usb_transfer_batch_destroy(usb_transfer_batch_t *batch)
@@ -83,4 +89,5 @@
 	const bus_ops_t *ops = BUS_OPS_LOOKUP(bus->ops, batch_destroy);
 
+	/* Batch reference */
 	endpoint_del_ref(batch->ep);
 
@@ -97,9 +104,8 @@
 }
 
-/** Finish a transfer batch: call handler, destroy batch, release endpoint.
+/**
+ * Finish a transfer batch: call handler, destroy batch, release endpoint.
  *
  * Call only after the batch have been scheduled && completed!
- *
- * @param[in] batch Batch structure to use.
  */
 void usb_transfer_batch_finish(usb_transfer_batch_t *batch)
@@ -121,7 +127,6 @@
 }
 
-/** Finish a transfer batch as an aborted one.
- *
- * @param[in] batch Batch structure to use.
+/**
+ * Finish a transfer batch as an aborted one.
  */
 void usb_transfer_batch_abort(usb_transfer_batch_t *batch)
