-/* $OpenBSD: xhci.c,v 1.56 2015/01/18 14:49:04 mpi Exp $ */
+/* $OpenBSD: xhci.c,v 1.57 2015/01/18 20:35:11 mpi Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
wakeup(xp);
}
break;
- default:
- /* All other commands are synchronous. */
+ case XHCI_CMD_CONFIG_EP:
+ case XHCI_CMD_STOP_EP:
+ case XHCI_CMD_DISABLE_SLOT:
+ case XHCI_CMD_ENABLE_SLOT:
+ case XHCI_CMD_ADDRESS_DEVICE:
+ case XHCI_CMD_EVAL_CTX:
+ case XHCI_CMD_NOOP:
+ /* All these commands are synchronous. */
KASSERT(sc->sc_cmd_trb == trb);
sc->sc_cmd_trb = NULL;
wakeup(&sc->sc_cmd_trb);
break;
+ default:
+ DPRINTF(("%s: unexpected command %x\n", DEVNAME(sc), flags));
}
}
XHCI_TRB_SET_SLOT(slot) | XHCI_CMD_CONFIG_EP
);
- return (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT));
+ return (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT));
}
int
XHCI_TRB_SET_SLOT(slot) | XHCI_TRB_SET_EP(dci) | XHCI_CMD_STOP_EP
);
- return (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT));
+ return (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT));
}
void
XHCI_TRB_SET_SLOT(*slotp) | XHCI_CMD_DISABLE_SLOT
);
- if (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT))
+ if (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT))
return (EIO);
if (enable)
XHCI_TRB_SET_SLOT(slot) | XHCI_CMD_ADDRESS_DEVICE | bsr
);
- return (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT));
+ return (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT));
}
int
XHCI_TRB_SET_SLOT(slot) | XHCI_CMD_EVAL_CTX
);
- return (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT));
+ return (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT));
}
#ifdef XHCI_DEBUG
trb.trb_status = 0;
trb.trb_flags = htole32(XHCI_CMD_NOOP);
- return (xhci_command_submit(sc, &trb, XHCI_COMMAND_TIMEOUT));
+ return (xhci_command_submit(sc, &trb, XHCI_CMD_TIMEOUT));
}
#endif
*/
xhci_cmd_set_tr_deq_async(sc, xp->slot, xp->dci,
DEQPTR(xp->ring) | xp->ring.toggle);
- error = tsleep(xp, PZERO, "xhciab", (XHCI_COMMAND_TIMEOUT*hz+999)/1000 + 1);
+ error = tsleep(xp, PZERO, "xhciab", (XHCI_CMD_TIMEOUT*hz+999)/1000 + 1);
if (error)
printf("%s: timeout aborting transfer\n", DEVNAME(sc));
}