OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d25744
)
usb: dwc3: gadget: Don't prepare TRBs if no space
author
John Youn
<johnyoun@synopsys.com>
Fri, 20 May 2016 00:26:10 +0000
(17:26 -0700)
committer
Felipe Balbi
<felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:44 +0000
(12:32 +0300)
If trbs_left == 0, we don't have any space left in the TRB ring so don't
prepare anything.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index
6408f7f
..
663ea9e
100644
(file)
--- a/
drivers/usb/dwc3/gadget.c
+++ b/
drivers/usb/dwc3/gadget.c
@@
-942,6
+942,8
@@
static void dwc3_prepare_trbs(struct dwc3_ep *dep)
BUILD_BUG_ON_NOT_POWER_OF_2(DWC3_TRB_NUM);
trbs_left = dwc3_calc_trbs_left(dep);
+ if (!trbs_left)
+ return;
list_for_each_entry_safe(req, n, &dep->pending_list, list) {
if (req->request.num_mapped_sgs > 0)