Index: uspace/drv/bus/usb/xhci/commands.c
===================================================================
--- uspace/drv/bus/usb/xhci/commands.c	(revision 7bd99bfae7aabeabefaa09fab2ced431b9975c0d)
+++ uspace/drv/bus/usb/xhci/commands.c	(revision c058a388719cf7bf6599a0c394ad933ba0702271)
@@ -46,4 +46,5 @@
 static inline int ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)
 {
+	assert(hc);
 	uint32_t v = host2xhci(32, target & BIT_RRANGE(uint32_t, 7));
 	pio_write_32(&hc->db_arry[doorbell], v);
@@ -54,4 +55,7 @@
 			      unsigned doorbell, unsigned target)
 {
+	assert(hc);
+	assert(trb);
+
 	xhci_trb_ring_enqueue(&hc->command_ring, trb);
 	ring_doorbell(hc, doorbell, target);
@@ -116,4 +120,6 @@
 int xhci_send_no_op_command(xhci_hc_t *hc)
 {
+	assert(hc);
+
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(trb));
@@ -126,4 +132,6 @@
 int xhci_send_enable_slot_command(xhci_hc_t *hc)
 {
+	assert(hc);
+
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(trb));
@@ -138,4 +146,6 @@
 int xhci_send_disable_slot_command(xhci_hc_t *hc, uint32_t slot_id)
 {
+	assert(hc);
+
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(trb));
@@ -151,4 +161,7 @@
 				     xhci_input_ctx_t *ictx)
 {
+	assert(hc);
+	assert(ictx);
+
 	/**
 	 * TODO: Requirements for this command:
@@ -161,5 +174,5 @@
 
 	uint64_t phys_addr = (uint64_t) addr_to_phys(ictx);
-	trb.parameter = host2xhci(32, phys_addr & 0xFFFFFFFFFFFFFFF0);
+	trb.parameter = host2xhci(32, phys_addr & (~0xF));
 
 	/**
@@ -180,9 +193,12 @@
 					 xhci_input_ctx_t *ictx)
 {
+	assert(hc);
+	assert(ictx);
+
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(trb));
 
 	uint64_t phys_addr = (uint64_t) addr_to_phys(ictx);
-	trb.parameter = host2xhci(32, phys_addr & 0xFFFFFFFFFFFFFFF0);
+	trb.parameter = host2xhci(32, phys_addr & (~0xF));
 
 	trb.control = host2xhci(32, XHCI_TRB_TYPE_CONFIGURE_ENDPOINT_CMD << 10);
@@ -196,4 +212,7 @@
 				       xhci_input_ctx_t *ictx)
 {
+	assert(hc);
+	assert(ictx);
+
 	/**
 	 * Note: All Drop Context flags of the input context shall be 0,
@@ -206,5 +225,5 @@
 
 	uint64_t phys_addr = (uint64_t) addr_to_phys(ictx);
-	trb.parameter = host2xhci(32, phys_addr & 0xFFFFFFFFFFFFFFF0);
+	trb.parameter = host2xhci(32, phys_addr & (~0xF));
 
 	trb.control = host2xhci(32, XHCI_TRB_TYPE_EVALUATE_CONTEXT_CMD << 10);
@@ -217,4 +236,6 @@
 int xhci_send_reset_endpoint_command(xhci_hc_t *hc, uint32_t slot_id, uint32_t ep_id, uint8_t tcs)
 {
+	assert(hc);
+
 	/**
 	 * Note: TCS can have values 0 or 1. If it is set to 0, see sectuon 4.5.8 for
@@ -235,4 +256,6 @@
 int xhci_send_stop_endpoint_command(xhci_hc_t *hc, uint32_t slot_id, uint32_t ep_id, uint8_t susp)
 {
+	assert(hc);
+
 	xhci_trb_t trb;
 	memset(&trb, 0, sizeof(trb));
@@ -245,9 +268,25 @@
 
 	return enqueue_trb(hc, &trb, 0, 0);
-
+}
+
+int xhci_send_reset_device_command(xhci_hc_t *hc, uint32_t slot_id)
+{
+	assert(hc);
+
+	xhci_trb_t trb;
+	memset(&trb, 0, sizeof(trb));
+
+	trb.control = host2xhci(32, XHCI_TRB_TYPE_RESET_DEVICE_CMD << 10);
+	trb.control |= host2xhci(32, hc->command_ring.pcs);
+	trb.control |= host2xhci(32, slot_id << 24);
+
+	return enqueue_trb(hc, &trb, 0, 0);
 }
 
 int xhci_handle_command_completion(xhci_hc_t *hc, xhci_trb_t *trb)
 {
+	assert(hc);
+	assert(trb);
+
 	usb_log_debug("HC(%p) Command completed.", hc);
 	xhci_dump_trb(trb);
@@ -290,4 +329,6 @@
 		//       handle it appropriately!
 		return EOK;
+	case XHCI_TRB_TYPE_RESET_DEVICE_CMD:
+		return EOK;
 	default:
 		usb_log_debug2("Unsupported command trb.");
Index: uspace/drv/bus/usb/xhci/commands.h
===================================================================
--- uspace/drv/bus/usb/xhci/commands.h	(revision 7bd99bfae7aabeabefaa09fab2ced431b9975c0d)
+++ uspace/drv/bus/usb/xhci/commands.h	(revision c058a388719cf7bf6599a0c394ad933ba0702271)
@@ -49,4 +49,11 @@
 int xhci_send_reset_endpoint_command(xhci_hc_t *, uint32_t, uint32_t, uint8_t);
 int xhci_send_stop_endpoint_command(xhci_hc_t *, uint32_t, uint32_t, uint8_t);
+// TODO: Set dequeue ptr (section 4.6.10).
+int xhci_send_reset_device_command(xhci_hc_t *, uint32_t);
+// TODO: Force event (optional normative, for VMM, section 4.6.12).
+// TODO: Negotiate bandwidth (optional normative, section 4.6.13).
+// TODO: Set latency tolerance value (optional normative, section 4.6.14).
+// TODO: Get port bandwidth (mandatory, but needs root hub implementation, section 4.6.15).
+// TODO: Force header (mandatory, but needs root hub implementation, section 4.6.16).
 
 int xhci_handle_command_completion(xhci_hc_t *, xhci_trb_t *);
