/* control transfers always start with SETUP */
is_in = 0;
hw_ep->out_qh = qh;
- musb->bEnd0Stage = MGC_END0_START;
+ musb->ep0_stage = MGC_END0_START;
pBuffer = urb->setup_packet;
dwLength = 8;
break;
struct musb_qh *qh = hw_ep->in_qh;
struct usb_ctrlrequest *pRequest;
- switch (musb->bEnd0Stage) {
+ switch (musb->ep0_stage) {
case MGC_END0_IN:
pFifoDest = pUrb->transfer_buffer + pUrb->actual_length;
fifo_count = min(len, ((u16) (pUrb->transfer_buffer_length
break;
} else if (pRequest->bRequestType & USB_DIR_IN) {
DBG(4, "start IN-DATA\n");
- musb->bEnd0Stage = MGC_END0_IN;
+ musb->ep0_stage = MGC_END0_IN;
bMore = TRUE;
break;
} else {
DBG(4, "start OUT-DATA\n");
- musb->bEnd0Stage = MGC_END0_OUT;
+ musb->ep0_stage = MGC_END0_OUT;
bMore = TRUE;
}
/* FALLTHROUGH */
}
break;
default:
- ERR("bogus ep0 stage %d\n", musb->bEnd0Stage);
+ ERR("bogus ep0 stage %d\n", musb->ep0_stage);
break;
}
: 0;
DBG(4, "<== csr0 %04x, qh %p, count %d, urb %p, stage %d\n",
- wCsrVal, qh, len, pUrb, musb->bEnd0Stage);
+ wCsrVal, qh, len, pUrb, musb->ep0_stage);
/* if we just did status stage, we are done */
- if (MGC_END0_STATUS == musb->bEnd0Stage) {
+ if (MGC_END0_STATUS == musb->ep0_stage) {
retval = IRQ_HANDLED;
bComplete = TRUE;
}
/* call common logic and prepare response */
if (musb_h_ep0_continue(musb, len, pUrb)) {
/* more packets required */
- wCsrVal = (MGC_END0_IN == musb->bEnd0Stage)
+ wCsrVal = (MGC_END0_IN == musb->ep0_stage)
? MGC_M_CSR0_H_REQPKT : MGC_M_CSR0_TXPKTRDY;
} else {
/* data transfer complete; perform status phase */
| MGC_M_CSR0_TXPKTRDY;
/* flag status stage */
- musb->bEnd0Stage = MGC_END0_STATUS;
+ musb->ep0_stage = MGC_END0_STATUS;
DBG(5, "ep0 STATUS, csr %04x\n", wCsrVal);
musb_writew(epio, MGC_O_HDRC_CSR0, wCsrVal);
retval = IRQ_HANDLED;
} else
- musb->bEnd0Stage = MGC_END0_IDLE;
+ musb->ep0_stage = MGC_END0_IDLE;
/* call completion handler if done */
if (bComplete)
* a_wait_vrise_tmout triggers VBUS_ERROR transitions
*/
musb_writeb(mbase, MGC_O_HDRC_DEVCTL, MGC_M_DEVCTL_SESSION);
- musb->bEnd0Stage = MGC_END0_START;
+ musb->ep0_stage = MGC_END0_START;
musb->xceiv.state = OTG_STATE_A_IDLE;
MUSB_HST_MODE(musb);
musb_set_vbus(musb, 1);
musb->is_active = 1;
set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
- musb->bEnd0Stage = MGC_END0_START;
+ musb->ep0_stage = MGC_END0_START;
#ifdef CONFIG_USB_MUSB_OTG
/* flush endpoints when transitioning from Device Mode */