summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.h
diff options
context:
space:
mode:
authorAnurag Kumar Vulisha <anuragku@xilinx.com>2018-03-27 16:35:20 +0530
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-05-21 10:00:47 +0300
commita31e63b608ff78c77d8e033347239431d522fe5d (patch)
tree952ca738be9d8b99a03bbd91d8fff9c509400749 /drivers/usb/dwc3/core.h
parent5f0b74e54890c354d6ac0124ea7a96adf22845d0 (diff)
downloadlinux-a31e63b608ff78c77d8e033347239431d522fe5d.tar.gz
linux-a31e63b608ff78c77d8e033347239431d522fe5d.tar.bz2
linux-a31e63b608ff78c77d8e033347239431d522fe5d.zip
usb: dwc3: gadget: Correct handling of scattergather lists
The code logic in dwc3_prepare_one_trb() incorrectly uses the address and length fields present in req packet for mapping TRB's instead of using the address and length fields of scattergather lists. This patch correct's the code to use sg->address and sg->length when scattergather lists are present. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> 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 1765e014aa08..b6ca898a65d0 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -832,6 +832,7 @@ struct dwc3_hwparams {
* @list: a list_head used for request queueing
* @dep: struct dwc3_ep owning this request
* @sg: pointer to first incomplete sg
+ * @start_sg: pointer to the sg which should be queued next
* @num_pending_sgs: counter to pending sgs
* @remaining: amount of data remaining
* @epnum: endpoint number to which this request refers
@@ -848,6 +849,7 @@ struct dwc3_request {
struct list_head list;
struct dwc3_ep *dep;
struct scatterlist *sg;
+ struct scatterlist *start_sg;
unsigned num_pending_sgs;
unsigned remaining;