Index: uspace/drv/bus/usb/xhci/debug.c
===================================================================
--- uspace/drv/bus/usb/xhci/debug.c	(revision 8fe29a7c6a5d43622bf2379729504a191868d494)
+++ uspace/drv/bus/usb/xhci/debug.c	(revision 41abf3ccda2071a8e6aa6a16ce59c3a74c63e801)
@@ -264,5 +264,5 @@
 void xhci_dump_trb(const xhci_trb_t *trb)
 {
-	usb_log_debug2("TRB(%p): type %s, cycle %u", trb, xhci_trb_str_type(TRB_TYPE(*trb)), TRB_CYCLE(*trb));
+	usb_log_debug2("TRB(%p): type %s, cycle %u, status 0x%#08" PRIx32 ", parameter 0x%#016" PRIx64, trb, xhci_trb_str_type(TRB_TYPE(*trb)), TRB_CYCLE(*trb), trb->status, trb->parameter);
 }
 
@@ -341,5 +341,5 @@
 }
 
-static void xhci_dump_slot_ctx(const struct xhci_slot_ctx *ctx)
+void xhci_dump_slot_ctx(const struct xhci_slot_ctx *ctx)
 {
 #define SLOT_DUMP(name)	usb_log_debug("\t" #name ":\t0x%x", XHCI_SLOT_##name(*ctx))
@@ -356,9 +356,9 @@
 	SLOT_DUMP(INTERRUPTER);
 	SLOT_DUMP(DEVICE_ADDRESS);
-	SLOT_DUMP(SLOT_STATE);
+	SLOT_DUMP(STATE);
 #undef SLOT_DUMP
 }
 
-static void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *ctx)
+void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *ctx)
 {
 #define EP_DUMP_DW(name)	usb_log_debug("\t" #name ":\t0x%x", XHCI_EP_##name(*ctx))
Index: uspace/drv/bus/usb/xhci/debug.h
===================================================================
--- uspace/drv/bus/usb/xhci/debug.h	(revision 8fe29a7c6a5d43622bf2379729504a191868d494)
+++ uspace/drv/bus/usb/xhci/debug.h	(revision 41abf3ccda2071a8e6aa6a16ce59c3a74c63e801)
@@ -46,4 +46,6 @@
 struct xhci_trb;
 struct xhci_extcap;
+struct xhci_slot_ctx;
+struct xhci_endpoint_ctx;
 struct xhci_input_ctx;
 
@@ -59,4 +61,6 @@
 void xhci_dump_extcap(const struct xhci_extcap *);
 
+void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
+void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
 void xhci_dump_input_ctx(const struct xhci_input_ctx *);
 
Index: uspace/drv/bus/usb/xhci/endpoint.h
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.h	(revision 8fe29a7c6a5d43622bf2379729504a191868d494)
+++ uspace/drv/bus/usb/xhci/endpoint.h	(revision 41abf3ccda2071a8e6aa6a16ce59c3a74c63e801)
@@ -63,12 +63,4 @@
 	EP_TYPE_BULK_IN = 6,
 	EP_TYPE_INTERRUPT_IN = 7
-};
-
-enum {
-	EP_STATE_DISABLED = 0,
-	EP_STATE_RUNNING = 1,
-	EP_STATE_HALTED = 2,
-	EP_STATE_STOPPED = 3,
-	EP_STATE_ERROR = 4,
 };
 
Index: uspace/drv/bus/usb/xhci/hw_struct/context.h
===================================================================
--- uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision 8fe29a7c6a5d43622bf2379729504a191868d494)
+++ uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision 41abf3ccda2071a8e6aa6a16ce59c3a74c63e801)
@@ -109,4 +109,12 @@
 } __attribute__((packed)) xhci_ep_ctx_t;
 
+enum {
+	EP_STATE_DISABLED = 0,
+	EP_STATE_RUNNING = 1,
+	EP_STATE_HALTED = 2,
+	EP_STATE_STOPPED = 3,
+	EP_STATE_ERROR = 4,
+};
+
 /**
  * Slot context: section 6.2.2
@@ -148,7 +156,14 @@
 
 #define XHCI_SLOT_DEVICE_ADDRESS(ctx)   XHCI_DWORD_EXTRACT((ctx).data[3],  7,  0)
-#define XHCI_SLOT_SLOT_STATE(ctx)       XHCI_DWORD_EXTRACT((ctx).data[3], 31, 27)
+#define XHCI_SLOT_STATE(ctx)       XHCI_DWORD_EXTRACT((ctx).data[3], 31, 27)
 
 } __attribute__((packed)) xhci_slot_ctx_t;
+
+enum {
+	SLOT_STATE_DISABLED = 0,
+	SLOT_STATE_DEFAULT = 1,
+	SLOT_STATE_ADDRESS = 2,
+	SLOT_STATE_CONFIGURED = 3,
+};
 
 /**
Index: uspace/drv/bus/usb/xhci/transfers.c
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.c	(revision 8fe29a7c6a5d43622bf2379729504a191868d494)
+++ uspace/drv/bus/usb/xhci/transfers.c	(revision 41abf3ccda2071a8e6aa6a16ce59c3a74c63e801)
@@ -297,4 +297,5 @@
 	const usb_endpoint_t ep_num = ep_dci / 2;
 	const usb_endpoint_t dir = ep_dci % 2 ? USB_DIRECTION_IN : USB_DIRECTION_OUT;
+	/* Creating temporary reference */
 	endpoint_t *ep_base = bus_find_endpoint(&dev->base, ep_num, dir);
 	if (!ep_base) {
@@ -325,4 +326,5 @@
 		if (ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) {
 			isoch_handle_transfer_event(hc, ep, trb);
+			/* Dropping temporary reference */
 			endpoint_del_ref(&ep->base);
 			return EOK;
@@ -333,4 +335,5 @@
 		if (!batch) {
 			fibril_mutex_unlock(&ep->base.guard);
+			/* Dropping temporary reference */
 			endpoint_del_ref(&ep->base);
 			return ENOENT;
@@ -395,6 +398,9 @@
 	if (xhci_endpoint_get_state(ep) == EP_STATE_HALTED) {
 		usb_log_debug("Endpoint halted, resetting endpoint.");
-		xhci_endpoint_clear_halt(ep, batch->target.stream);
-		
+		const int err = xhci_endpoint_clear_halt(ep, batch->target.stream);
+		if (err)
+			usb_log_error("Failed to clear halted condition on "
+			    "endpoint " XHCI_EP_FMT ". Unexpected results "
+			    "coming.", XHCI_EP_ARGS(*ep));
 	}
 
@@ -406,4 +412,5 @@
 
 	usb_transfer_batch_finish(batch);
+	/* Dropping temporary reference */
 	endpoint_del_ref(&ep->base);
 	return EOK;
