Index: uspace/drv/bus/usb/xhci/transfers.c
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.c	(revision 63adb1838e9362cf42099cd6f36d98e96f8cc005)
+++ uspace/drv/bus/usb/xhci/transfers.c	(revision 7e749112b819fef86c72a9b9f38799d1e29b9476)
@@ -123,4 +123,6 @@
 	transfer->batch = batch;
 	link_initialize(&transfer->link);
+	transfer->hc_buffer = malloc32(batch->buffer_size);
+
 	return transfer;
 }
@@ -128,4 +130,5 @@
 void xhci_transfer_fini(xhci_transfer_t* transfer) {
 	if (transfer) {
+		free32(transfer->hc_buffer);
 		free(transfer);
 	}
@@ -152,4 +155,5 @@
 	/* For the TRB formats, see xHCI specification 6.4.1.2 */
 	xhci_transfer_t *transfer = xhci_transfer_alloc(batch);
+	memcpy(transfer->hc_buffer, batch->buffer, batch->buffer_size);
 
 	xhci_trb_t trb_setup;
@@ -177,5 +181,5 @@
 
 	if (setup->length > 0) {
-		trb_data.parameter = (uintptr_t) addr_to_phys(batch->buffer);
+		trb_data.parameter = addr_to_phys(transfer->hc_buffer);
 
 		// data size (sent for OUT, or buffer size)
@@ -230,8 +234,9 @@
 
 	xhci_transfer_t *transfer = xhci_transfer_alloc(batch);
+	memcpy(transfer->hc_buffer, batch->buffer, batch->buffer_size);
 
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(xhci_trb_t));
-	trb.parameter = (uintptr_t) addr_to_phys(batch->buffer);
+	trb.parameter = addr_to_phys(transfer->hc_buffer);
 
 	// data size (sent for OUT, or buffer size)
@@ -292,66 +297,2 @@
 	return EOK;
 }
-
-xhci_transfer_block_t* xhci_transfer_block_alloc(size_t buffer_size)
-{
-	assert(buffer_size);
-
-	xhci_transfer_block_t *block = malloc(sizeof(xhci_transfer_block_t));
-	block->buffer = (uintptr_t) malloc32(buffer_size);
-	block->total_size = buffer_size;
-	block->filled_size = 0;
-
-	return block;
-}
-
-void xhci_transfer_block_fini(xhci_transfer_block_t* block)
-{
-	assert(block);
-
-	free32((void*) block->buffer);
-	free(block);
-}
-
-int xhci_dequeue_transfer_block(xhci_hc_t* hc, size_t size, xhci_transfer_block_t** block)
-{
-	// TODO: obtain block from some global structure at HC
-
-	*block = xhci_transfer_block_alloc(size);
-	return EOK;
-}
-
-int xhci_free_transfer_block(xhci_hc_t* hc, xhci_transfer_block_t* block)
-{
-	assert(block);
-
-	// TODO: check if the block is not used?
-	// TODO: recycle block in some global structure at HC
-	xhci_transfer_block_fini(block);
-
-	return EOK;
-}
-
-int xhci_schedule_transfer_block(xhci_hc_t* hc, xhci_transfer_block_t* block)
-{
-	usb_transfer_batch_t* batch = block->transfer->batch;
-	uint8_t slot_id = batch->ep->hc_data.slot_id;
-	xhci_trb_ring_t* ring = hc->dcbaa_virt[slot_id].trs[batch->ep->endpoint];
-
-	xhci_trb_t trb;
-	memset(&trb, 0, sizeof(xhci_trb_t));
-	trb.parameter = block->buffer;
-
-	TRB_CTRL_SET_XFER_LEN(trb, block->filled_size);
-	// FIXME: TD size 4.11.2.4
-	TRB_CTRL_SET_TD_SIZE(trb, 1);
-
-	// we want an interrupt after this td is done
-	TRB_CTRL_SET_IOC(trb, 1);
-	TRB_CTRL_SET_TRB_TYPE(trb, XHCI_TRB_TYPE_NORMAL);
-	xhci_trb_ring_enqueue(ring, &trb, &block->transfer->interrupt_trb_phys);
-
-	// FIXME: Check return from xhci_trb_ring_enqueue.
-
-	hc_ring_doorbell(hc, slot_id, 1);
-	return EOK;
-}
Index: uspace/drv/bus/usb/xhci/transfers.h
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.h	(revision 63adb1838e9362cf42099cd6f36d98e96f8cc005)
+++ uspace/drv/bus/usb/xhci/transfers.h	(revision 7e749112b819fef86c72a9b9f38799d1e29b9476)
@@ -45,18 +45,6 @@
 	usb_transfer_batch_t* batch;
 
-	size_t completed_size;       /* Number of successfully transferred bytes. */
-	size_t scheduled_size;       /* Number of bytes scheduled for transfer. */
-	list_t active_blocks;        /* List of data blocks transferred right now. */
+	void* hc_buffer;                    /* Virtual address of the buffer start. */
 } xhci_transfer_t;
-
-typedef struct {
-	link_t link;
-
-	uintptr_t buffer;            /* Physical address of the buffer start. */
-	size_t total_size;           /* Total size available in the block. */
-	size_t filled_size;          /* Size of the data in the block. */
-
-	xhci_transfer_t* transfer;   /* Current transfer or NULL. */
-} xhci_transfer_block_t;
 
 int xhci_init_transfers(xhci_hc_t*);
@@ -67,8 +55,2 @@
 int xhci_schedule_bulk_transfer(xhci_hc_t*, usb_transfer_batch_t*);
 int xhci_handle_transfer_event(xhci_hc_t*, xhci_trb_t*);
-
-xhci_transfer_block_t* xhci_transfer_block_alloc(size_t);
-void xhci_transfer_block_fini(xhci_transfer_block_t*);
-int xhci_dequeue_transfer_block(xhci_hc_t*, size_t, xhci_transfer_block_t**);
-int xhci_free_transfer_block(xhci_hc_t*, xhci_transfer_block_t*);
-int xhci_schedule_transfer_block(xhci_hc_t*, xhci_transfer_block_t*);
