提交 0b7836a9 编写于 作者: F Felipe Balbi

usb: dwc3: drop EP0_STALL state

Whenever we issue a Set Stall command on EP0,
the state machine will be restarted and Stall
is cleared automatically, when core receives
the next SETUP packet.

There's no need to track that EP0_STALL state.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 76cb323f
...@@ -375,7 +375,6 @@ enum dwc3_ep0_state { ...@@ -375,7 +375,6 @@ enum dwc3_ep0_state {
EP0_SETUP_PHASE, EP0_SETUP_PHASE,
EP0_DATA_PHASE, EP0_DATA_PHASE,
EP0_STATUS_PHASE, EP0_STATUS_PHASE,
EP0_STALL,
}; };
enum dwc3_link_state { enum dwc3_link_state {
......
...@@ -68,8 +68,6 @@ static const char *dwc3_ep0_state_string(enum dwc3_ep0_state state) ...@@ -68,8 +68,6 @@ static const char *dwc3_ep0_state_string(enum dwc3_ep0_state state)
return "Data Phase"; return "Data Phase";
case EP0_STATUS_PHASE: case EP0_STATUS_PHASE:
return "Status Phase"; return "Status Phase";
case EP0_STALL:
return "Stall";
default: default:
return "UNKNOWN"; return "UNKNOWN";
} }
......
...@@ -872,8 +872,14 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value) ...@@ -872,8 +872,14 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value)
memset(&params, 0x00, sizeof(params)); memset(&params, 0x00, sizeof(params));
if (value) { if (value) {
if (dep->number == 0 || dep->number == 1) if (dep->number == 0 || dep->number == 1) {
dwc->ep0state = EP0_STALL; /*
* Whenever EP0 is stalled, we will restart
* the state machine, thus moving back to
* Setup Phase
*/
dwc->ep0state = EP0_SETUP_PHASE;
}
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
DWC3_DEPCMD_SETSTALL, &params); DWC3_DEPCMD_SETSTALL, &params);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册