/* It protects the ep0 request queue as well as ep0_state, not just the controller and indexed registers. And that lock stays held unless it needs to be dropped to allow reentering this driver ... like upcalls to the gadget driver, or adjusting endpoint halt status.  */
static char* decode_ep0stage(u8 stage)
/* It protects the ep0 request queue as well as ep0_state, not just the controller and indexed registers. And that lock stays held unless it needs to be dropped to allow reentering this driver ... like upcalls to the gadget driver, or adjusting endpoint halt status.  */
static char* decode_ep0stage(u8 stage)
{
	switch (stage) {
	case MUSB_EP0_STAGE_IDLE:	return "idle";
	case MUSB_EP0_STAGE_SETUP:	return "setup";
	case MUSB_EP0_STAGE_TX:		return "in";
	case MUSB_EP0_STAGE_RX:		return "out";
	case MUSB_EP0_STAGE_ACKWAIT:	return "wait";
	case MUSB_EP0_STAGE_STATUSIN:	return "in/status";
	case MUSB_EP0_STAGE_STATUSOUT:	return "out/status";
	default:			return "?";
	}
}