mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 12:08:16 +00:00
drivers/usbhost: Take an xHCI command result from its completion event.
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
xhci_command() returned -ETIMEDOUT when a completion arrived without an interrupt, although the fallback poll had already retrieved the event, so callers unwound work the controller had completed. Use the event's completion code whichever path retrieved it. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <justin@dynam.ac>
This commit is contained in:
parent
440d5f7f87
commit
3b7e453012
1 changed files with 9 additions and 1 deletions
|
|
@ -1938,7 +1938,15 @@ static int xhci_command(FAR struct usbhost_xhci_s *priv,
|
|||
trb->d1 = priv->cmdres.d1;
|
||||
trb->d2 = priv->cmdres.d2;
|
||||
|
||||
if (XHCI_TRB_D1_CC_GET(trb->d1) != XHCI_TRB_CC_SUCCESS)
|
||||
if (XHCI_TRB_D1_CC_GET(trb->d1) == XHCI_TRB_CC_SUCCESS)
|
||||
{
|
||||
/* The completion event decides the result, whether it arrived by
|
||||
* interrupt or was found by the poll above.
|
||||
*/
|
||||
|
||||
ret = OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
pcierr("event CC = %d\n", XHCI_TRB_D1_CC_GET(trb->d1));
|
||||
ret = -EIO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue