Index: uspace/drv/bus/usb/xhci/commands.c
===================================================================
--- uspace/drv/bus/usb/xhci/commands.c	(revision fd9f4ffe9046f4159dadaaa386b188bac0191bc9)
+++ uspace/drv/bus/usb/xhci/commands.c	(revision 481af21e369c3e76530d9daf68fc418b878d5b61)
@@ -43,8 +43,20 @@
 #include "hw_struct/trb.h"
 
-static int ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)
+static inline int ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)
 {
 	uint32_t v = host2xhci(32, target & BIT_RRANGE(uint32_t, 7));
 	pio_write_32(&hc->db_arry[doorbell], v);
+	return EOK;
+}
+
+static inline int enqueue_trb(xhci_hc_t *hc, xhci_trb_t *trb,
+			      unsigned doorbell, unsigned target)
+{
+	xhci_trb_ring_enqueue(&hc->command_ring, trb);
+	ring_doorbell(hc, doorbell, target);
+
+	xhci_dump_trb(trb);
+	usb_log_debug2("HC(%p): Sent TRB", hc);
+
 	return EOK;
 }
@@ -57,10 +69,5 @@
 	trb.control = host2xhci(32, XHCI_TRB_TYPE_NO_OP_CMD << 10);
 
-	xhci_trb_ring_enqueue(&hc->command_ring, &trb);
-	ring_doorbell(hc, 0, 0);
-
-	xhci_dump_trb(&trb);
-	usb_log_debug2("HC(%p): Sent TRB", hc);
-	return EOK;
+	return enqueue_trb(hc, &trb, 0, 0);
 }
 
@@ -72,13 +79,9 @@
 	trb.control = host2xhci(32, XHCI_TRB_TYPE_ENABLE_SLOT_CMD << 10);
 	trb.control |= host2xhci(32, XHCI_REG_RD(hc->xecp, XHCI_EC_SP_SLOT_TYPE) << 16);
+	trb.control |= host2xhci(32, hc->command_ring.pcs);
 
 	// TODO: Setup input control context.
 
-	xhci_trb_ring_enqueue(&hc->command_ring, &trb);
-	ring_doorbell(hc, 0, 0);
-
-	xhci_dump_trb(&trb);
-	usb_log_debug2("HC(%p): Sent TRB", hc);
-	return EOK;
+	return enqueue_trb(hc, &trb, 0, 0);
 }
 
