The xHCI driver can handle only a single command TRB in progress at
any one time. Immediately fail any attempts to issue concurrent
commands (which should not occur in normal operation).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
unsigned int i;
int rc;
+ /* Sanity check */
+ if ( xhci->pending != NULL ) {
+ DBGC ( xhci, "XHCI %s command ring busy\n", xhci->name );
+ rc = -EBUSY;
+ goto err_pending;
+ }
+
/* Record the pending command */
xhci->pending = trb;
err_enqueue:
xhci->pending = NULL;
+ err_pending:
return rc;
}