Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264974
b: refs/heads/master
c: 0b7836a
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi committed Sep 9, 2011
1 parent ed95c95 commit ecee811
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76cb323f80ac32833109e2c089842be2b99d8d2b
refs/heads/master: 0b7836a9eb32f626ffd3fe3045e8c618cb8ed965
1 change: 0 additions & 1 deletion trunk/drivers/usb/dwc3/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ enum dwc3_ep0_state {
EP0_SETUP_PHASE,
EP0_DATA_PHASE,
EP0_STATUS_PHASE,
EP0_STALL,
};

enum dwc3_link_state {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ static const char *dwc3_ep0_state_string(enum dwc3_ep0_state state)
return "Data Phase";
case EP0_STATUS_PHASE:
return "Status Phase";
case EP0_STALL:
return "Stall";
default:
return "UNKNOWN";
}
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,14 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value)
memset(&params, 0x00, sizeof(params));

if (value) {
if (dep->number == 0 || dep->number == 1)
dwc->ep0state = EP0_STALL;
if (dep->number == 0 || dep->number == 1) {
/*
* 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,
DWC3_DEPCMD_SETSTALL, &params);
Expand Down

0 comments on commit ecee811

Please sign in to comment.