/* Give the slot context for the passed container context */
struct xhci_slot_ctx* xhci_get_slot_ctx(struct xhci_ctrl *ctrl, struct xhci_container_ctx *ctx)
/* Give the slot context for the passed container context */
struct xhci_slot_ctx* xhci_get_slot_ctx(struct xhci_ctrl *ctrl, struct xhci_container_ctx *ctx)
{
	if (ctx->type == XHCI_CTX_TYPE_DEVICE)
		return (struct xhci_slot_ctx *)ctx->bytes;
	return (struct xhci_slot_ctx *)
		(ctx->bytes + CTX_SIZE(readl(&ctrl->hccr->cr_hccparams)));
}