static void dwc3_ep0_xfer_complete(struct dwc3 *dwc, const struct dwc3_event_depevt *event) { struct dwc3_ep *dep = dwc->eps[event->endpoint_number]; dep->flags &= ~DWC3_EP_BUSY; dep->res_trans_idx = 0; dwc->setup_packet_pending = false; switch (dwc->ep0state) { case EP0_SETUP_PHASE: dev_vdbg(dwc->dev, "Inspecting Setup Bytes\n"); dwc3_ep0_inspect_setup(dwc, event); break; case EP0_DATA_PHASE: dev_vdbg(dwc->dev, "Data Phase\n"); dwc3_ep0_complete_data(dwc, event); break; case EP0_STATUS_PHASE: dev_vdbg(dwc->dev, "Status Phase\n"); dwc3_ep0_complete_req(dwc, event); break; case USB_REQ_SET_INTERFACE: dev_vdbg(dwc->dev, "USB_REQ_SET_INTERFACE\n"); dwc->start_config_issued = false; /* Fall through */ default: WARN(true, "UNKNOWN ep0state %d\n", dwc->ep0state); } }
static void dwc3_ep0_xfer_complete(struct dwc3 *dwc, const struct dwc3_event_depevt *event) { struct dwc3_ep *dep = dwc->eps[event->endpoint_number]; dep->flags &= ~DWC3_EP_BUSY; dep->resource_index = 0; dwc->setup_packet_pending = false; switch (dwc->ep0state) { case EP0_SETUP_PHASE: dev_vdbg(dwc->dev, "Inspecting Setup Bytes\n"); dwc3_ep0_inspect_setup(dwc, event); break; case EP0_DATA_PHASE: dev_vdbg(dwc->dev, "Data Phase\n"); dwc3_ep0_complete_data(dwc, event); break; case EP0_STATUS_PHASE: dev_vdbg(dwc->dev, "Status Phase\n"); dwc3_ep0_complete_status(dwc, event); break; default: WARN(true, "UNKNOWN ep0state %d\n", dwc->ep0state); } }
static void dwc3_ep0_xfer_complete(struct dwc3 *dwc, const struct dwc3_event_depevt *event) { switch (dwc->ep0state) { case EP0_IDLE: dwc3_ep0_inspect_setup(dwc, event); break; case EP0_IN_DATA_PHASE: case EP0_OUT_DATA_PHASE: dwc3_ep0_complete_data(dwc, event); break; case EP0_IN_STATUS_PHASE: case EP0_OUT_STATUS_PHASE: dwc3_ep0_complete_req(dwc, event); break; case EP0_IN_WAIT_NRDY: case EP0_OUT_WAIT_NRDY: case EP0_IN_WAIT_GADGET: case EP0_OUT_WAIT_GADGET: case EP0_UNCONNECTED: case EP0_STALL: break; } }