diff options
author | Felipe Balbi | 2018-08-01 13:53:29 +0300 |
---|---|---|
committer | Felipe Balbi | 2018-11-26 09:08:29 +0200 |
commit | d5443bbf5fc8f8389cce146b1fc2987cdd229d12 (patch) | |
tree | 820ccda60260434a28c2f2b34e02f919a0f545f8 /drivers/usb/dwc3/gadget.h | |
parent | 7746a8dfb3f9c91b3a0b63a1d5c2664410e6498d (diff) |
usb: dwc3: gadget: introduce cancelled_list
This list will host cancelled requests who still have TRBs being
processed.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.h')
-rw-r--r-- | drivers/usb/dwc3/gadget.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h index 2aacd1afd9ff..023a473648eb 100644 --- a/drivers/usb/dwc3/gadget.h +++ b/drivers/usb/dwc3/gadget.h @@ -79,6 +79,21 @@ static inline void dwc3_gadget_move_started_request(struct dwc3_request *req) list_move_tail(&req->list, &dep->started_list); } +/** + * dwc3_gadget_move_cancelled_request - move @req to the cancelled_list + * @req: the request to be moved + * + * Caller should take care of locking. This function will move @req from its + * current list to the endpoint's cancelled_list. + */ +static inline void dwc3_gadget_move_cancelled_request(struct dwc3_request *req) +{ + struct dwc3_ep *dep = req->dep; + + req->started = false; + list_move_tail(&req->list, &dep->cancelled_list); +} + void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, int status); |