mirror of https://github.com/ipxe/ipxe.git
[xhci] Fail attempts to issue concurrent commands
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>pull/204/head
parent
988d2c13cd
commit
017b345d5a
|
@ -1813,6 +1813,13 @@ static int xhci_command ( struct xhci_device *xhci, union xhci_trb *trb ) {
|
|||
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;
|
||||
|
||||
|
@ -1855,6 +1862,7 @@ static int xhci_command ( struct xhci_device *xhci, union xhci_trb *trb ) {
|
|||
|
||||
err_enqueue:
|
||||
xhci->pending = NULL;
|
||||
err_pending:
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue