Index: uspace/drv/bus/usb/xhci/streams.c
===================================================================
--- uspace/drv/bus/usb/xhci/streams.c	(revision 740dafcdd0499e1f3387b2bd26ce4b4d7e9f1bae)
+++ uspace/drv/bus/usb/xhci/streams.c	(revision 0f803831a7df5a03c2de637251d1bf306a4735b7)
@@ -193,4 +193,5 @@
  * @param[in] ctx Endpoint context to configure.
  * @param[in] pstreams The value of MaxPStreams.
+ * @param[in] lsa Specifies if the stream IDs point to primary stream array.
  */
 static void setup_stream_context(xhci_endpoint_t *xhci_ep, xhci_ep_ctx_t *ctx, unsigned pstreams, unsigned lsa)
@@ -203,5 +204,4 @@
 	XHCI_EP_MAX_P_STREAMS_SET(*ctx, pstreams);
 	XHCI_EP_TR_DPTR_SET(*ctx, xhci_ep->primary_stream_ctx_dma.phys);
-	// TODO: set HID?
 	XHCI_EP_LSA_SET(*ctx, lsa);
 }
@@ -216,6 +216,11 @@
 	}
 
-	if (xhci_ep->max_streams == 1) {
+	if (xhci_ep->max_streams <= 1) {
 		usb_log_error("Streams are not supported by endpoint " XHCI_EP_FMT, XHCI_EP_ARGS(*xhci_ep));
+		return EINVAL;
+	}
+
+	if (count < 2) {
+		usb_log_error("The minumum amount of primary streams is 2.");
 		return EINVAL;
 	}
@@ -295,4 +300,10 @@
 	xhci_endpoint_t *xhci_ep, unsigned *sizes, unsigned count)
 {
+	/* Check if HC supports secondary indexing */
+	if (XHCI_REG_RD(hc->cap_regs, XHCI_CAP_NSS)) {
+		usb_log_error("The host controller doesn't support secondary streams.");
+		return ENOTSUP;
+	}
+
 	int err = verify_stream_conditions(hc, dev, xhci_ep, count);
 	if (err) {
@@ -300,6 +311,22 @@
 	}
 
-	// TODO: determine if count * secondary streams <= max_streams
-	if (count > xhci_ep->max_streams) {
+	if (count > 256) {
+		usb_log_error("The amount of primary streams cannot be higher than 256.");
+		return EINVAL;
+	}
+
+	/*
+	 * Find the largest requested secondary stream size,
+	 * that one is the maximum ID that device can receive.
+	 * We need to make sure the device can handle that ID.
+	 */
+	unsigned max = 0;
+	for (size_t index = 0; index < count; ++index) {
+		if (sizes[count] > max) {
+			max = sizes[count];
+		}
+	}
+
+	if (max * count > xhci_ep->max_streams) {
 		usb_log_error("Endpoint " XHCI_EP_FMT " supports only %" PRIu32 " streams.",
 			XHCI_EP_ARGS(*xhci_ep), xhci_ep->max_streams);
Index: uspace/lib/drv/generic/remote_usbhc.c
===================================================================
--- uspace/lib/drv/generic/remote_usbhc.c	(revision 740dafcdd0499e1f3387b2bd26ce4b4d7e9f1bae)
+++ uspace/lib/drv/generic/remote_usbhc.c	(revision 0f803831a7df5a03c2de637251d1bf306a4735b7)
@@ -558,4 +558,6 @@
 		/* .address is initialized by write itself */
 		.endpoint = ep,
+		/* streams are not given by the API call yet */
+		.stream = 0,
 	}};
 
