diff options
author | Felipe Balbi <balbi@ti.com> | 2011-08-30 15:50:40 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-09-09 13:02:18 +0300 |
commit | b53c772d16a9751554aabb05f95cef7b0b7fa2e9 (patch) | |
tree | d802d180d9d06675d2c9c2786a724a3cf9ff2a20 /drivers/usb/dwc3 | |
parent | 0b7836a9eb32f626ffd3fe3045e8c618cb8ed965 (diff) | |
download | linux-b53c772d16a9751554aabb05f95cef7b0b7fa2e9.tar.gz linux-b53c772d16a9751554aabb05f95cef7b0b7fa2e9.tar.bz2 linux-b53c772d16a9751554aabb05f95cef7b0b7fa2e9.zip |
usb: dwc3: core: add ep0_next_event field
this field will hold the next expected event.
In certain cases, host might fall into some error
condition and ask from us the wrong Control phase.
On such situations, we should stall and restart.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 72388d8eda32..2e73d33e171d 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -370,6 +370,14 @@ enum dwc3_phy { DWC3_PHY_USB2, }; +enum dwc3_ep0_next { + DWC3_EP0_UNKNOWN = 0, + DWC3_EP0_COMPLETE, + DWC3_EP0_NRDY_SETUP, + DWC3_EP0_NRDY_DATA, + DWC3_EP0_NRDY_STATUS, +}; + enum dwc3_ep0_state { EP0_UNCONNECTED = 0, EP0_SETUP_PHASE, @@ -520,6 +528,7 @@ static inline void dwc3_trb_to_nat(struct dwc3_trb_hw *hw, struct dwc3_trb *nat) * @three_stage_setup: set if we perform a three phase setup * @ep0_status_pending: ep0 status response without a req is pending * @ep0_bounced: true when we used bounce buffer + * @ep0_next_event: hold the next expected event * @ep0state: state of endpoint zero * @link_state: link state * @speed: device speed (super, high, full, low) @@ -566,6 +575,7 @@ struct dwc3 { unsigned ep0_status_pending:1; unsigned ep0_bounced:1; + enum dwc3_ep0_next ep0_next_event; enum dwc3_ep0_state ep0state; enum dwc3_link_state link_state; enum dwc3_device_state dev_state; |