aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.h
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-10-25 13:47:21 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-03 10:38:40 +0200
commite62c5bc57367ac277b932571943c9a09e737ad88 (patch)
tree0e0b3131783d3aef3f13a9d18acf7ef58a6b0489 /drivers/usb/dwc3/core.h
parentusb: dwc3: gadget: cope with XferNotReady before usb_ep_queue() (diff)
downloadlinux-dev-e62c5bc57367ac277b932571943c9a09e737ad88.tar.xz
linux-dev-e62c5bc57367ac277b932571943c9a09e737ad88.zip
usb: dwc3: gadget: tracking per-TRB remaining bytes
This will give us a simpler way of figuring out how many bytes were left in each TRB. It's useful for cases where we queue only part of an SG-list due to amount of available TRBs at the time of kicking the transfer. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r--drivers/usb/dwc3/core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index ebc8a542407f..2322863e3cf7 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -715,6 +715,7 @@ struct dwc3_hwparams {
* @dep: struct dwc3_ep owning this request
* @sg: pointer to first incomplete sg
* @num_pending_sgs: counter to pending sgs
+ * @remaining: amount of data remaining
* @epnum: endpoint number to which this request refers
* @trb: pointer to struct dwc3_trb
* @trb_dma: DMA address of @trb
@@ -729,6 +730,7 @@ struct dwc3_request {
struct scatterlist *sg;
unsigned num_pending_sgs;
+ unsigned remaining;
u8 epnum;
struct dwc3_trb *trb;
dma_addr_t trb_dma;