diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-12 12:10:10 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-22 09:45:37 +0200 |
commit | 0b3e4af3c740937d1e0f7d444f75d087c29a2d1b (patch) | |
tree | 56497aa556d589fd97355dbf9a4f13f9629d4058 /drivers/usb/dwc3 | |
parent | usb: dwc3: gadget: avoid while (1) loop on completion (diff) | |
download | linux-0b3e4af3c740937d1e0f7d444f75d087c29a2d1b.tar.xz linux-0b3e4af3c740937d1e0f7d444f75d087c29a2d1b.zip |
usb: dwc3: gadget: add sg and num_pending_sgs to dwc3_request
These two fields will be used in a follow-up patch
to track how many entries of request's sglist we
have already processed. The reason is that if a
gadget driver sends an sglist with more entries then
we can fit in the ring, we will have to continue
processing remaining afterwards.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 45d6de5107c7..1a6cc48fc7c4 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -685,6 +685,8 @@ struct dwc3_hwparams { * @request: struct usb_request to be transferred * @list: a list_head used for request queueing * @dep: struct dwc3_ep owning this request + * @sg: pointer to first incomplete sg + * @num_pending_sgs: counter to pending sgs * @first_trb_index: index to first trb used by this request * @epnum: endpoint number to which this request refers * @trb: pointer to struct dwc3_trb @@ -697,7 +699,9 @@ struct dwc3_request { struct usb_request request; struct list_head list; struct dwc3_ep *dep; + struct scatterlist *sg; + unsigned num_pending_sgs; u8 first_trb_index; u8 epnum; struct dwc3_trb *trb; |